Skip to content

Latest commit

 

History

History
30 lines (21 loc) · 1.15 KB

File metadata and controls

30 lines (21 loc) · 1.15 KB

deepagents-reference-implementation-civic

A reference implementation showing how to connect LangChain DeepAgents to Civic Nexus via MCP to create a personal calendar and email assistant.

How it works

  1. On startup, the app connects to Civic Nexus over HTTP MCP (streamable_http) and fetches the tool list for your profile.
  2. Those tools are passed into create_deep_agent, which wires them into a LangGraph agent alongside DeepAgents' built-in tools (file system, todos, sub-agents).
  3. A FastAPI server exposes a /chat endpoint that streams agent responses via SSE.
  4. A minimal chat UI in static/index.html connects to that endpoint.

Setup

cp .env.example .env
# Fill in CIVIC_TOKEN, CIVIC_URL, ANTHROPIC_API_KEY

uv sync
uv run uvicorn main:app --reload

Open http://localhost:8000.

Environment variables

Variable Description
CIVIC_TOKEN Token from nexus.civic.com
CIVIC_URL Full MCP hub URL including accountId and profile
ANTHROPIC_API_KEY Anthropic API key