Architecture
The browser submits commands to FastAPI and receives persisted execution events over Server-Sent Events. LangGraph runs the same workflow in both modes. Simulation supplies deterministic model responses, while restricted Live Mode can request model responses from OpenAI.
From request to result
Next.js
Next.js renders the workspace. The browser receives persisted events over Server-Sent Events.
View sourceFastAPI
FastAPI accepts run commands, checks session ownership and streams persisted events.
View sourceLangGraph
LangGraph runs the workflow and chooses the next node from the current state.
View sourcePostgreSQL
PostgreSQL stores the execution log, checkpoints, fictional fixtures and approved simulated actions.
View sourceMCP
Support reads fictional records from a local MCP subprocess over stdio. LangGraph saves the approval pause in PostgreSQL so the same session can return and decide later.
View sourceOpenAI / SimulationModel
Only the model adapter changes between modes. Live attempts require a valid session grant, verified pricing and enough reserved budget.
View sourceInside the workflows
- MCP tools · Human approval
- Support reads fictional records from a local MCP subprocess over stdio. LangGraph saves the approval pause in PostgreSQL so the same session can return and decide later.
- Parallel specialists
- The finance agent interprets a first-year forecast calculated with Pandas and tested against changes in demand with NumPy.
- Evaluator–optimizer
- Checks the draft with Python and scores it against the rubric. Its feedback can send the draft back to the generator.
- Dynamic supervision
- Selects the next specialist from the objective, current findings and constraint checks.
Live access and cost protection
The owner reviews access requests in a private Telegram chat. The resulting session grant and PostgreSQL ledger enforce the run allowance, expiry and spending caps.