Architecture Overview
Architecture Overview
Section titled “Architecture Overview”Console Interaction Path
Section titled “Console Interaction Path”Console / Feishu -> Session runtime services -> Scheduler -> AgentThe Console and Feishu adapters share the same session-first conversation semantics:
- Entry adapters handle transport-specific concerns such as SSE, long connections, and message parsing.
- Session runtime services own session lifecycle, runtime routing, and projection assembly.
- Scheduler mediates execution for persistent roots and child agents.
- Agent executes the actual work, with results projected back as SDK execution facts.
Main runtime services
Section titled “Main runtime services”The session runtime service layer includes:
SessionContextServicefor session creation and forkingSessionRuntimeServicefor routing session input through the schedulerSessionViewServicefor session list and detail projectionsSchedulerTreeViewServicefor tree responses used by the Console UI
Key Domain Objects
Section titled “Key Domain Objects”| Object | Description |
|---|---|
| Session | Primary conversation container. Users create, switch, and resume sessions across entrypoints. |
| Task | Unit of work inside a session. Created implicitly when the first message arrives. |
| Run | Execution-level realization of task work, derived from SDK run and step records. |
Design Principles
Section titled “Design Principles”- Console is a projection layer. It views SDK execution facts instead of creating a second execution truth.
- One session = one task by default. The mental model stays simple.
- Fork for branching. When work diverges, fork to a new session instead of overloading one thread.
- Scheduler-mediated execution. Console no longer calls
agent.start()directly. - RunStep-first projections. Task and run views are built from SDK-provided execution records.
Runtime boundaries
Section titled “Runtime boundaries”At a high level, Agiwo keeps these layers separate:
Agentowns prompts, execution, hooks, tools, and step lifecycleSchedulerowns orchestration, wake logic, and child runtime control- storage and trace layers persist runtime facts
- the Console projects those facts back to operators