Pensieve Documentation
Pensieve is a LangChain-based writing agent that guides content through a multi-stage pipeline — from a raw idea to a publication-ready piece. It combines a FastAPI backend with a React frontend to provide a real-time, interactive writing experience.
Getting Started
New to Pensieve? Choose the setup method that fits your workflow:
| Guide | Best for |
|---|---|
| Local Setup | Development, full control over Python and Node environments |
| Docker | Running isolated containers without installing Python or Node locally |
| Docker Compose | One-command deployment of both frontend and backend |
Configuration
Pensieve uses a two-tier YAML configuration model. Dive into the details:
| Guide | What it covers |
|---|---|
| Global Configuration | LLM providers, search provider, server settings, workspaces root |
| Workspace Configuration | Pipeline stages, iteration budgets, execution control, presets |
| Environment Variables | All environment variables for backend, frontend, and Docker |
Tutorials
Step-by-step guides that walk you through real-world tasks:
| Guide | Description |
|---|---|
| Writing Your First Article | End-to-end walkthrough: create a workspace, configure your identity, run the pipeline, and review your finished draft |
| Understanding the 10-Stage Pipeline | What each stage does, how agents build on each other’s work, and how to control execution |
| Working with Memory | Set up your author identity, build a topics library, and let Pensieve learn your voice over time |
Reference
| Reference | Description |
|---|---|
| Pipeline Stage Reference | Inputs, outputs, configuration options, and skip conditions for all 10 writing stages |
| Agent Tools Reference | All 7 agent tools — parameters, return values, and per-agent assignment matrix |
Architecture
For a deeper understanding of how Pensieve works, see the architecture documentation:
- Architecture Overview — high-level design, component diagram, and key decisions
- Pipeline — the 10 writing stages, execution control, and resumability
- Agents — all 10 agent specifications with inputs, outputs, and tools
- Memory System — three-layer markdown memory (identity, topics, project artifacts)
- Tools — catalog of all agent tools
- Configuration (Architecture) — design-level configuration reference
- WebSocket Protocol — complete message reference for real-time communication
- Frontend — React SPA architecture, component tree, and state management
Quick Links
- Health check:
GET /health— returns{"status": "ok"}when the backend is running - API base:
GET /api/...— REST endpoints for workspaces, projects, artifacts, and memory - WebSocket:
ws://<host>:<port>/ws— live pipeline streaming - GitHub: 5000K/pensieve