Multi-Agent RevOps Workflow

Autonomous Revenue Operations
Triage & Drafting Platform

An event-driven multi-agent AI system built on LangGraph, FastAPI, and React. It listens to Slack, retrieves customer contexts from Notion playbooks & Salesforce, and creates automated replies for Human-in-the-Loop review.

94%
Triage Accuracy
Evaluated across 100 regression test cases
2-Node
LangGraph Flow
Triage Router + ReAct loops with tool binding
Real-time
SSE Broadcasts
Server-Sent Events for zero-refresh approvals
Audit Ready
LLM-as-a-Judge
Continuous automatic quality regression testing

Under the Hood

Explore the architecture, tools, and execution models of OpsPilot

Classification and Early Exit

The Triage Node functions as the router of the system, categorizing Slack messages using structured JSON outputs to preserve token efficiency.

  • Escalations: Threat of churn or service outage.
  • Deal Questions: Contract terms, thresholds, pricing queries.
  • Info Requests: Process specifications and internal playbooks.
  • Noise (Early Exit): Routine hellos, social chats are routed directly to the exit point.
// Output schema for triage node { "classification": "escalation", "confidence": 0.98, "summary": "Customer at risk of cancellation..." }

Autonomous Tool-Calling Loop

Actionable tickets trigger a 5-step ReAct loop where the agent calls database, CRM, and retrieval tools to complete the context payload.

  • Notion Vector Query: similarity searches playbooks in ChromaDB.
  • Salesforce Account Lookup: checks customer status and ARR parameters.
  • Salesforce Task Creator: logs support tickets into CRM for escalations.
  • Entity Extractor: extracts metadata from incoming text logs.
# Agent decides to call Salesforce Lookup 1. Thought: Zenith Tech is mentioned. Retrieve CRM status. 2. Action: lookup_salesforce_account("Zenith") 3. Result: Found account. ARR = $95,000. 4. Next Action: search_notion_docs("escalation")

Zero-Refresh Verification

Security is guaranteed through a dashboard review queue. Server-Sent Events notify browser clients immediately on agent output, prompting reviewers to check and edit replies.

  • Approve: Sends the draft back to the Slack thread instantly.
  • Edit: Adjust reply content inline prior to posting.
  • Reject: Dismiss draft and save feedback in SQLite.
// SSE real-time stream broadcast Event: message data: { "type": "refresh" } // Action updates database and broadcasts to UI

Regression Control Suites

Continuous pipeline quality is ensured by automatically running evaluations that sync stats directly into the dashboard UI.

  • 100-Case Triage Test: Assesses category recall and F1-score rates.
  • 20-Case RAG Test: Evaluates vector store retrieval hit rates.
  • E2E Judge: Uses an LLM judge evaluating factuality and tone.
# run_all_evals.py results - Triage F1-Score: 0.94 - RAG Hit Rate: 90% - Average Judge Score: 4.2 / 5.0

System Architecture (The Big Picture)

A comprehensive view of the event-driven routing, agent loops, external API gateways, and stateful storage

EXTERNAL INTEGRATIONS FASTAPI SERVICE & LANGGRAPH AGENTS WORKSPACE DESK Salesforce CRM Accounts & Tasks API Notion Knowledge Compliance & FAQ playbooks Slack SlackApp Socket Mode API Slack Bolt Router Inbound Listener FastAPI REST Approval / Metrics APIs SSE Streamer Push notifications SQLite Database State / Audit logs LangGraph Engine Triage Node ReAct Agent Node Gemini Tool Loop React Dashboard Executive ROI Desk HITL Approvals ChromaDB Notion Vector Store EVENT Ingestion (seed_rag.py) Human Approval / Thread Edit REPLY

Complete Technology Stack

LangGraph & LangChain
Stateful Multi-agent Logic
Gemini 1.5 Flash
LLM Classification & Drafting
FastAPI & Uvicorn
Asynchronous API Router
ChromaDB Store
Playbook Vector Embeddings
Slack Bolt App
Event Listening (Socket Mode)
Salesforce Wrapper
CRM Account Task Integration
React 19 & Vite 8
Modern Frontend Build Tool
Recharts & Lucide
Analytics charts & Iconography
SQLAlchemy ORM
SQLite Async Logs (aiosqlite)
LangSmith Tracing
Observability & LLM Audits