How It Works
How It Works
Section titled “How It Works”8-Stage Agent Pipeline
Section titled “8-Stage Agent Pipeline”Every interaction flows through internal/pipeline/:
- Context: Resolve workspace context files and tenant identity (
store.WithTenantID(ctx)). - History: Fetch session history with token-budget boundaries.
- Prompt: Render system prompt using the active Prompt Mode (Full, Task, Minimal, None).
- Think: Execute reasoning turn with provider adapter (supports Extended Thinking).
- Act: Execute approved tool calls (filesystem, exec, web, memory, subagents, MCP).
- Observe: Collect tool execution results and append to history.
- Memory: Auto-extract semantic insights into pgvector working/episodic memory.
- Summarize: Perform session compaction if token threshold is exceeded.
4-Mode Prompt System
Section titled “4-Mode Prompt System”- Full: Complete system persona and capabilities (
SOUL.md,IDENTITY.md). - Task: Lean task-oriented instructions for autonomous background jobs.
- Minimal: Ultra-low token footprint for high-volume webhook handlers.
- None: Pure raw prompt pass-through.