Back to Projects
Agentic AI OS

Enterprise Agentic Operating System

Stateful multi-agent orchestration graph handling 500+ concurrent workflows with persistent memory and dynamic tool execution.

πŸ“– Project Overview

This system implements a stateful agentic supervisor pattern utilizing LangGraph to route and oversee complex enterprise workloads. The core framework deploys distinct agent nodes (Planner, Executor, Critic, and Memory) that interact collaboratively through shared graph states, allowing for robust reasoning, self-correction, and tool routing.

Deployed on a production-grade Azure AKS cluster, it integrates auto-scaling via KEDA based on request queues and enforces secure networks via Istio mTLS and OPA policies. Short-term state is held in Redis, while PostgreSQL logs long-term execution traces.

βš™οΈ Deployment Checklist & Runbook

1

Configure Agentic State Graph

Establish state schemas and compile the workflow graph using LangGraph:

python
from langgraph.graph import StateGraph, END
from typing import TypedDict, List

class AgentState(TypedDict):
    messages: List[dict]
    next_node: str
    memory_context: str

workflow = StateGraph(AgentState)
workflow.add_node("planner", planner_node)
workflow.add_node("executor", executor_node)
workflow.set_entry_point("planner")
workflow.add_conditional_edges("executor", routing_edge)
graph = workflow.compile()
2

Initialize Stateful Persistence (Redis)

Provision Redis instance for short-term chat history and execution state locks:

bash
helm install redis bitnami/redis \
  --set global.redis.password="secret-agent-pwd" \
  --set replica.replicaCount=2 \
  -n agent-system --create-namespace
3

Deploy AKS Manifests & KEDA Scalers

Apply Kubernetes manifests to deploy the graph runner service and setup auto-scalers:

bash
kubectl apply -f infra/k8s/agent-deployment.yaml
kubectl apply -f infra/k8s/keda-scaler.yaml -n agent-system

πŸ”„ Configuration & Environment Keys

Environment Variable Description Suggested Value
AGENT_MODEL_NAME The underlying model serving reasoning loops. gpt-4o or claude-3-5-sonnet
REDIS_URL The connection string for holding state checkpoints. redis://redis-master.agent-system.svc:6379/0
DATABASE_URL Postgres connection details for trace logging. postgresql://postgres:pwd@db-host:5432/traces
MAX_AGENT_CONCURRENCY Concurrency limit for processing tasks in parallel. 500

πŸ“Š Architectural Workflow

graph TD
    User([User Request]) -->|FASTAPI Route| Supervisor[Stateful Supervisor]
    Supervisor -->|Check Memory| Redis[(Redis Short-Term)]
    Supervisor -->|Plan Task| Planner[Planner Agent]
    Planner -->|Draft Instructions| Executor[Executor Agent]
    Executor -->|Call MCP Tool| Tools[MCP Servers / APIs]
    Executor -->|Audit Outputs| Critic[Critic Agent]
    Critic -->|Self-Correction Loop| Executor
    Critic -->|Validation Approved| LogTrace[Postgres DB]
    LogTrace -->|Response| User
            

πŸ› οΈ Useful CLI Reference

# Start LangGraph dev environment: langgraph dev --port 8080 # Inspect active executor pods status: kubectl get pods -n agent-system -l app=agent-os # Check memory checkpoints in Redis: redis-cli -h redis-master -p 6379 KEYS "checkpoint:*" # Stream real-time trace telemetry: kubectl logs -f -n agent-system -l app=agent-os
πŸ“‹ Code copied to clipboard!