How abarbesgaard/sara works
Sara is a local-first task and knowledge-memory system for AI agents, driven through a CLI or MCP tools. The main workflow is to capture project/task context, organize and execute work, then preserve findings for later recall; SQLite keeps that state across sessions. A separate web interface visualizes the memory graph. The graph emphasizes documented capabilities and sampled wiring; unsampled command internals are represented at their exact directories, and uncertain web-to-server wiring is left unasserted.
Main entry points: commands Task commands · App.tsx Graph viewer app · db SQLite persistence · index.ts Graph service
Components 26
Agent interfaces
- CLI parsing
src/cli.rs - Command dispatch
src/dispatch.rs - MCP tools
src/mcp/server.rs
Task workflow
- Task commands
src/commands - Guided work
src/commands/guide/mod.rs - Task models
src/infrastructure/model.rs - Urgency and ordering
src/commands/list/mod.rs
Knowledge memory
- Learn memories
src/commands/learn/mod.rs - Recall and search
src/commands/recall - Memory relationships
src/infrastructure/memory/graph.rs - Embedding index
src/infrastructure/memory/embedding.rs - Memory reflection
src/commands/reflect/mod.rs
Persistence and project context
- Project profiles
src/commands/init/mod.rs - Git integration
src/infrastructure/git.rs - SQLite persistence
src/infrastructure/db - Configuration
src/infrastructure/config.rs
Memory graph viewer
- Graph viewer app
dream-web/src/App.tsx - Graph API client
dream-web/src/api.ts - 3D graph
dream-web/src/components/Graph3D.tsx - Graph filters
dream-web/src/components/Filters.tsx - Memory details
dream-web/src/components/SidePanel.tsx - Graph service
dream-web/server/index.ts - Graph assembly
dream-web/server/graph.ts - Viewer database access
dream-web/server/db.ts - Database location
dream-web/server/dbPath.ts
Other components
- Agent or human
Connections 23
- Agent or human → CLI parsing: invokes
README.md - CLI parsing → Command dispatch: parses and routes
src/main.rs - Command dispatch → Task commands: dispatches commands
src/dispatch.rs - Agent or human → MCP tools: calls tools
README.md - MCP tools → Task commands: routes tools
src/mcp/guide.rs - Task commands → SQLite persistence: persists task state
README.md - Task commands → Task models: uses task records
src/commands/recall/search/query.rs - Task commands → Urgency and ordering: orders tasks
README.md - Task commands → Guided work: supports guided work
README.md - Project profiles → SQLite persistence: stores project context
README.md - Project profiles → Git integration: detects project
README.md - Learn memories → SQLite persistence: stores memories
src/commands/learn/mod.rs - Learn memories → Embedding index: indexes findings
src/commands/learn/mod.rs - Recall and search → SQLite persistence: searches stored context
src/commands/recall/search/query.rs - Recall and search → Embedding index: supports semantic search
README.md - Memory reflection → Memory relationships: uses memory graph
src/commands/reflect/mod.rs - Graph viewer app → Graph API client: fetches graph
dream-web/src/App.tsx - Graph viewer app → 3D graph: renders graph
dream-web/src/App.tsx - Graph viewer app → Graph filters: filters graph
dream-web/src/App.tsx - Graph viewer app → Memory details: shows selection
dream-web/src/App.tsx - Graph service → Graph assembly: assembles response
dream-web/server/index.ts - Graph service → Viewer database access: accesses database
dream-web/server/index.ts - Graph service → Database location: resolves location
dream-web/server/index.ts