Architecture
The Agentic AI Platform layers a workflow orchestrator on top of the existing ReAct agent (Reason + Act).
Components
Product page demo ──► POST /agent/demo
Workspace chat ──► GET /agent/stream
│
▼
AgentService (ReAct loop)
│
┌────────────┼────────────┐
▼ ▼ ▼
WorkflowOrchestrator LLM ToolExecutor
│ │
▼ ▼
Domain registry Project filesystem
(PDLC + stubs) run / deploy tools
│
▼
project_workflow_state (SQLite)
Workflow orchestrator
Located in app/agent/workflows/:
base.py—Stage,WorkflowDomaintypesregistry.py— domain lookup (pdlc,cyber-security,product-research)pdlc.py— full PDLC stage pack with prompts and tool allowlistsorchestrator.py— resolve stage, inject prompts, filter tools, emit SSE eventsstate.py— load/save per-project workflow state
Agent loop
AgentService (app/agent/service.py):
- Resolve domain + stage via orchestrator
- Build system prompt with stage overlay
- Filter tools for the active stage
- Run ReAct loop (LLM → tool calls → results → repeat)
- Stream SSE events:
workflow,stage,content,tool_call,files_changed,done
Tool policies per stage
| Stage | Tools |
|---|---|
| Discover, Design, Iterate | Read/write docs, search |
| Develop | Full filesystem + run |
| Test | Read/write + run + diagnose |
| Deploy | Read + run_project (publish) |
Demo mode
Public demos (POST /agent/demo) use ephemeral projects under user_projects/_demo/{session_id}/ with filesystem-backed workflow state. When no LLM API key is configured, a scripted stage-aware fallback ensures the demo always responds.
Extensibility
Add a new domain by registering a WorkflowDomain in registry.py with ordered stages, prompt overlays, and optional tool allowlists. No changes to the ReAct core are required.