Agentic Workflows Phase 1 — LangGraph + MCP Foundation (consolidates Sprint 15 P1)
Agentic Workflows Phase 1 — Core LangGraph + MCP Foundation
Context
This is the core differentiator for GENIE.AI as the GovStack AI Building Block. Phase 1 establishes the foundation: LangGraph workflow engine, MCP proxy infrastructure, and initial workflow implementations.
This issue consolidates and replaces the Sprint 15 Phase 1 child issues (#269-#275) with a refined implementation plan.
Architecture (from Confluence Agentic Spec)
User Request → Backend BFF → LangGraph Orchestrator
├─ Tool: RAG Query (existing)
├─ Tool: MCP Server → GovStack BB API
├─ Tool: Translation
└─ Tool: Guardrail (optional)
MCP Servers (standalone processes):
├─ Auth MCP (Security BB)
├─ Payments MCP (Payments BB)
├─ Scheduler MCP (Scheduler BB)
└─ Registration MCP (Registration BB)
Scope
Phase 1A: LangGraph Core
- Implement
genie-ai-overlay/workflows/package with LangGraph - Define
WorkflowStatePydantic model (typed state passed between nodes) - Implement core node types:
LLMNode,ToolNode,ConditionalRouter,HumanInputNode - Create workflow definition schema (JSON/YAML → LangGraph graph)
- Integrate with existing ChatQnA as the entry point
- Support both streaming (SSE) and non-streaming execution
Phase 1B: MCP Infrastructure
- Deploy
mcpo(MCP proxy orchestrator) as a Docker service - Implement MCP client in Python that calls MCP servers via stdio/SSE
- Register MCP servers in the backend Node.js API
- Implement WebSocket endpoint for real-time workflow status (#274)
- Add Node.js API routes for MCP proxying (#273)
Phase 1C: Initial MCP Servers
- Auth MCP Server: Authenticate user, verify permissions, get user profile (mock for now)
- Payments MCP Server: Check payment status, initiate payment, get receipt (mock for now)
- Scheduler MCP Server: Check availability, book appointment, cancel appointment (mock for now)
Phase 1D: Frontend Workflow Visualization
- Basic workflow status component (shows current step, pending steps, completed steps)
- WebSocket integration for real-time status updates
- Error/retry UI for failed workflow steps
Phase 1E: Pause/Resume
- Implement checkpointing in LangGraph (#275)
- Persist workflow state to ArangoDB
- Resume interrupted workflows from last checkpoint
Acceptance Criteria
-
LangGraph orchestrator handles multi-step workflows with typed state -
3 MCP servers deployed and callable from LangGraph nodes -
Workflow status visible in frontend via WebSocket -
Pause/resume works for interrupted workflows -
Existing RAG chat flow still works (backward compatible) -
Integration tests cover a sample 3-step workflow
Related Issues
- Consolidates Sprint 15 Phase 1: #269, #270, #271, #272, #273, #274, #275
- Depends on: Sprint 22 (streaming, auth), Sprint 23 (observability)
- Phase 2 (Sprint 25): BPMN visualization, RAG integration, hybrid workflows, security/audit
Labels
1.Parent_Issue, ENHANCEMENT