10xGraph Integrations: FastAPI, Next.js, Postgres

In shortGuides for using 10xGraph with FastAPI, Next.js, CopilotKit and Postgres, plus the storage, messaging and tracing backends the core library supports.

  • 2 min read
  • 3 sections
  • Updated
  • v0.9.2
  • Markdown

10xGraph integrations are the guides for connecting an agent graph to the stack you already run: a FastAPI service, a Next.js or CopilotKit frontend, and a Postgres database for durable threads. The core library also ships optional backends for caching, messaging, memory and tracing. This section is for Python teams who already have a service or a frontend and want the agent to fit into it instead of replacing it.

Start here

If you have an existing Python service, read 10xGraph with FastAPI first. It compares two approaches: running agentflow api as a sidecar, or embedding the compiled graph directly in your own routes, with auth patterns and streaming gotchas for each.

If the caller is a browser, read 10xGraph with Next.js to stream tokens from the agent API into a React frontend. If you already use CopilotKit, 10xGraph with CopilotKit shows how the API server’s AG-UI endpoint feeds a CopilotKit chat, including frontend tools and shared state.

For anything that must survive a restart, read 10xGraph with Postgres. It covers PgCheckpointer, which is also what the replay-safe tool ledger needs: see Replay-safe tools for why a checkpointer matters when a run crashes mid-node.

What the library supports

These are the optional extras declared in the core package’s pyproject.toml. Install only the ones you use.

Area Supported Extra
Durable checkpointing PostgreSQL (with Redis as the hot cache) pg_checkpoint
Local checkpointing SQLite, in-memory sqlite_checkpoint
Long-term memory Qdrant, Mem0 qdrant, mem0
Tools Model Context Protocol servers and clients mcp
Event publishing Redis Pub/Sub, Kafka, RabbitMQ redis, kafka, rabbitmq
Tracing OpenTelemetry, Logfire, LangSmith otel, logfire, langsmith
Agent-to-agent A2A SDK a2a_sdk
Files and images Pillow, cloud storage manager images, cloud-storage

Model providers are covered separately in Providers. For how to wire up publishers and traces, see Use publishers and Send traces to Logfire and LangSmith.

Pick an integration

Last updated for v0.9.2Edit this page on GitHubReport an issue