How nurasss/ai-office works
AI Office is a personal multi-agent office with web/API and Telegram entry points, a task and project runtime, and an autonomous planning/approval loop. A typical request enters through the product API, is routed to an agent, and returns a result; autonomous work additionally plans and runs tasks, with guarded actions requiring approval. The graph preserves documented RAG, memory, integrations, and scheduling capabilities. Some subsystem paths and links are based on README or source-index references rather than inspected implementation excerpts.
Main entry points: autonomy_service.py Autonomy loop · autonomous.py Autonomy API · task_service.py Task engine · base_agent.py Agent runtime
Components 23
Product interfaces
- Product API
api/office.py - Autonomy API
api/autonomous.py - Web and bot app
web/app.py
Agent work
- Agent routing
orchestrator.py - Specialist agents
agents - Agent runtime
agents/base/base_agent.py - LLM routing
core/llm_router.py
Autonomous runtime
- Task engine
services/task_service.py - Project service
services/project_service.py - Autonomy loop
services/autonomy_service.py - PMO planner
services/pmo_planner.py - Approval service
services/approval_service.py - Action policy
core/action_policy.py - Scheduler
services/scheduler.py - SQL database
core/db.py - Runtime records
core/models.py
Knowledge and integrations
- RAG retriever
rag/retriever.py - Vector store
rag/vector_store.py - Long-term memory
memory/long_term_memory.py - External tools
tools/external - Public web tools
tools/external/web_tools.py
Other components
- User
- Telegram
Connections 31
- User → Product API: submits task
- User → Autonomy API: manages runtime
- Telegram → Web and bot app: sends commands
- Product API → Specialist agents: routes requests
api/office.py - Product API → RAG retriever: queries context
api/office.py - Web and bot app → Autonomy API: routes runtime API
web/app.py - Web and bot app → Specialist agents: dispatches tasks
web/app.py - Agent routing → Specialist agents: routes work
orchestrator.py - Specialist agents → Agent runtime: inherit runtime
agents/__init__.py - Agent runtime → LLM routing: selects models
agents/base/base_agent.py - Agent runtime → RAG retriever: retrieves knowledge
agents/base/base_agent.py - Agent runtime → Long-term memory: records outcomes
agents/base/base_agent.py - Agent runtime → Public web tools: adds read tools
agents/base/base_agent.py - Specialist agents → External tools: uses integrations
agents/pmo/pmo_agent.py - RAG retriever → Vector store: searches and writes
rag/retriever.py - Autonomy API → Autonomy loop: invokes runtime
api/autonomous.py - Autonomy API → Task engine: serves task operations
api/autonomous.py - Autonomy API → Project service: serves projects
api/autonomous.py - Autonomy API → Approval service: serves decisions
api/autonomous.py - Autonomy loop → PMO planner: requests plans
services/autonomy_service.py - Autonomy loop → Task engine: creates and runs
services/autonomy_service.py - Autonomy loop → Approval service: checks approvals
services/autonomy_service.py - Autonomy loop → Project service: loads projects
services/autonomy_service.py - Autonomy loop → Scheduler: scheduled by
- Approval service → Task engine: records events
services/approval_service.py - Task engine → Project service: resolves project
services/task_service.py - Task engine → Action policy: checks actions
services/task_service.py - Task engine → SQL database: persists tasks
- Approval service → SQL database: persists decisions
- SQL database → Runtime records: stores records
- Autonomy loop → Telegram: notifies user
services/autonomy_service.py