A modular, event-driven microservices system built with Kafka, Redis, FastAPI, and Python asyncio. This platform powers multi-domain agentic automation through LLM-driven reasoning and intelligent orchestration. Currently implemented as a user-centric automation solution for Grab's services (ride booking, food & grocery orders).
-
App Interface (
services/app_interface)- WebSocket Endpoints for voice (
/ws/mic) and text (/ws/text) ingestion - Pushes user transcripts to Kafka (
transcripttopic)
- WebSocket Endpoints for voice (
-
Reasoning Service (
services/reasoning)- Consumes
transcripttopic - LLM Orchestration: Gemini Pro via LangChain
- Slot Filling & Clarification: Redis-based state tracker
- Context Enrichment: Static (RedisJSON) + Semantic (Vector DB)
- Publishes tool calls to
agent.cmd
- Consumes
-
Action Router (
services/router)- Consumes
agent.cmd - HTTP → Kafka Bridge: Forwards commands to Adapter Gateway, returns results to Kafka (
agent.out.*)
- Consumes
-
Adapter Gateway (
services/adapters)- FastAPI unified API on port 8100
- Domain routers:
/ride,/food,/mart,/payment,/location - Returns mocked responses for each domain
-
Domain Agents (
services/agents)- Listen on
agent.cmdfor their tool (e.g.order_food) - Mock external call, publish to
agent.out.<domain>
- Listen on
-
State Tracker (
services/state_tracker)- Listens on all
agent.*topics - Updates Redis with per-
trace_idstatus and final payload
- Listens on all
-
Error Agent (
services/error_agent)- Consumes
agent.error(DLQ) - Logs or notifies errors for debugging
- Consumes
[Frontend] → WebSocket/API → [App Interface]
└─> Kafka: transcript → [Reasoning] → [clarify.agent & clarify.input] → Redis
└─> agent.cmd → [Action Router]
└─> HTTP → [Adapters]
└─> agent.out.* → [State Tracker] [mart, ride, food]
[State Tracker] updates Redis → UI polls/subscribes for status
[Error Agent] logs failures from agent.error
| Component | Input Topic / API | Output Topic / API | | |
| ------------- | -------------------------- | ----------------------------------------- | ---- | ------ |
| App Interface | WS `/ws/mic`, `/ws/text` | Kafka `transcript` | | |
| Reasoning | Kafka `transcript` | Kafka `agent.cmd`, `agent.error` | | |
| Action Router | Kafka `agent.cmd` | Kafka `agent.out.*` | | |
| Adapters | HTTP `/ride`, `/food`, ... | Kafka `agent.out.*` | | |
| Domain Agents | Kafka `agent.cmd` | Kafka `agent.out.ride`, `agent.out.food`, `agent.out.mart` |
| State Tracker | Kafka `agent.*` | Redis `state:{trace_id}` & `agent.status` | | |
| Error Agent | Kafka `agent.error` | Logs / Notifications | | |
- Microservices Architecture - Event-driven design with Kafka messaging
- AI-Powered Reasoning - LLM orchestration for intelligent decision making
- Domain-Specific Agents - Specialized agents for different service domains
- Real-time Communication - WebSocket interfaces for live interactions
- State Management - Redis-based state tracking and context enrichment
- Modern React Application - Material-UI based chat interface
- Real-time Updates - WebSocket connection for live agent interactions
- Responsive Design - Mobile-friendly interface with dark theme
- Agent Visualization - Visual indicators for different agent types
- Python 3.12+
- Node.js 18+
- Redis
- Kafka (Redpanda recommended)
-
Start Redpanda (Kafka) and Redis Stack
-
Adapters Gateway:
uvicorn services.adapters.main:app --port 8100
-
Static Context API:
uvicorn services.context.static:app --port 8001
-
Semantic Context API:
uvicorn services.context.semantic:app --port 8002
-
Reasoning Service:
uvicorn services.reasoning.main:app --port 8201
-
Action Router:
uvicorn services.router.main:app --port 8300
-
Domain Agents & State Tracker & Error Agent:
# Each in its own terminal python services/agents/ride_agent.py python services/agents/food_agent.py python services/agents/mart_agent.py python services/state_tracker/main.py python services/error_agent/main.py
-
Navigate to frontend directory:
cd Frontend/grabsense -
Install dependencies:
npm install
-
Start development server:
npm run dev
- Framework: FastAPI
- Language: Python 3.12
- Message Queue: Kafka (Redpanda)
- Cache: Redis
- AI/LLM: Google Generative AI, LangChain
- Vector DB: Pinecone
- Voice Processing: Whisper
- Framework: React 19
- Build Tool: Vite
- UI Library: Material-UI
- Styling: Emotion
- Real-time: WebSocket API
- Integrate real external APIs in Adapters
- Harden slot-filling & clarify flows
- Add observability (metrics & tracing)
- Extend multi-modal UI clients (web, mobile, watch)
- Customize for additional domains and use cases
AgenticWeb/
├── Backend/ # Python microservices
│ ├── services/ # Core services and agents
│ ├── adapters/ # External API integrations
│ ├── tools/ # Utility tools
│ └── infra/ # Infrastructure configs
├── Frontend/ # React web interface
│ └── grabsense/ # Chat interface application
└── README.md # This file
⭐ AgenticWeb — enabling seamless agentic automation experiences via AI-powered orchestration. Currently implemented for Grab's user-centric automation needs. Feedback and contributions welcome!