Resources / Agentic AI / Architecture

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.pyStage, WorkflowDomain types
  • registry.py — domain lookup (pdlc, cyber-security, product-research)
  • pdlc.py — full PDLC stage pack with prompts and tool allowlists
  • orchestrator.py — resolve stage, inject prompts, filter tools, emit SSE events
  • state.py — load/save per-project workflow state

Agent loop

AgentService (app/agent/service.py):

  1. Resolve domain + stage via orchestrator
  2. Build system prompt with stage overlay
  3. Filter tools for the active stage
  4. Run ReAct loop (LLM → tool calls → results → repeat)
  5. 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.