How saya-ch/sayacode works
SAYACODE is a local coding-agent workbench: a user submits a task in the browser, the local API routes it through a workspace host into an assembled LangGraph agent, and the workbench presents the run, approvals, collaboration, and delivery. The CLI also supports headless single-run tasks. The README documents the major capabilities and state boundaries; sampled source confirms the web/API and host/app ownership, while some feature wiring below follows README descriptions rather than inspected implementation excerpts.
Main entry points: sayacode/application.py App Assembly · host/application.py Workspace Host · app.py FastAPI API · runtime.py Agent And Graph
Components 19
Web Workbench
- React Workbench
frontend/src/App.tsx - Workspace State
frontend/src/state/useWorkspace.ts - API Client
frontend/src/api/client.ts - FastAPI API
src/sayacode/web/app.py - Workspace Host
src/sayacode/host/application.py - CLI Entry
src/sayacode/cli/main.py
Agent Runtime
- App Assembly
src/sayacode/application.py - Agent And Graph
src/sayacode/agent/runtime.py - Trust And Approval
src/sayacode/approvals/middleware.py
Tasks And Delivery
- Subagent Tasks
src/sayacode/tasks/manager.py - Worktree Delivery
src/sayacode/tasks/worktree.py
Agent Capabilities
- Coding Tools
src/sayacode/tools/catalog.py - MCP Skills Hooks
src/sayacode/extensions/mcp.py - Long-Term Memory
src/sayacode/memory/service.py - Diagnostics
src/sayacode/diagnostics.py
State And Persistence
- Sessions And Workspaces
src/sayacode/host/workspaces.py - Checkpoints And Store
src/sayacode/agent/runtime.py
Other components
- Developer
- Configured Model Endpoint
Connections 21
- Developer → React Workbench: submits task
- React Workbench → Workspace State: manages view
- Workspace State → API Client: requests data
- API Client → FastAPI API: HTTP and SSE
- FastAPI API → Workspace Host: dispatches requests
- Workspace Host → App Assembly: assembles workspace
- CLI Entry → App Assembly: creates app
- App Assembly → Agent And Graph: runs agent
- Agent And Graph → Configured Model Endpoint: requests model
- App Assembly → Trust And Approval: applies trust policy
- App Assembly → Coding Tools: provides tools
- App Assembly → MCP Skills Hooks: loads extensions
- App Assembly → Long-Term Memory: uses memory
- App Assembly → Subagent Tasks: dispatches tasks
- Subagent Tasks → Worktree Delivery: inspects and applies
- Workspace Host → Sessions And Workspaces: manages workspace sessions
- Agent And Graph → Checkpoints And Store: saves run state
- Long-Term Memory → Checkpoints And Store: stores memory
- Workspace Host → Diagnostics: serves diagnostics
- Workspace Host → FastAPI API: publishes events
- FastAPI API → Workspace State: streams run events