Tech stack for an AI agent platform (2026)
AI agents that work in your CRM and help desk, designed by StackPrism from one sentence: 14 components, a reason for each, and the live checks that watch them.
The stack
Next.js
FastAPI
Python
Clerk
PostgreSQL
Redis
- Inngest
- HubSpot
OpenAI
- Salesforce
Anthropic
- Intercom
- Zendesk
Sentry
“A platform where companies build AI agents on Claude or GPT models. Agents call tools to read and update their CRM and help desk through APIs, run multi-step tasks in the background, ask a human to approve risky actions, and keep a full trace of every model call and tool call.”
Their answers on the constraints step
- Expected scale
- A few thousand users
- What they know
- Python
Make it yours. Open this stack in the editor to check its health, harden it and hand it to your coding agent. No sign-up, nothing to generate.
Start from this stackSelect a component to see what it does and what it connects to, or pick one above to see what breaks if it goes down. Pinch or use the buttons to zoom.
Why this stack
The backend is Python, the language the team knows: a FastAPI service and a Python worker. People sign in with Clerk and build agents in a Next.js app; the FastAPI service saves their setup to PostgreSQL and hands each run to Inngest, which orchestrates the multi-step jobs, the retries and the pauses while an action waits for approval. The Python worker does the agent work: it calls Anthropic Claude or OpenAI GPT, uses tools in Salesforce, HubSpot, Zendesk and Intercom, and writes every step to PostgreSQL, where the full trace of each run lives. Redis holds short-lived run state and Sentry reports errors.
Why each piece
All 14 components on the diagram: what each one does, what it talks to, and what stops if it goes down.
Next.js Web App
In Vercel
Customer UI. Calls FastAPI Service and Clerk (signs in).
Nothing else on the diagram depends on it.
FastAPI Service
In Vercel
Application API. Calls PostgreSQL (writes), Redis (caches), Inngest (enqueues) and Sentry (reports). Called by Next.js Web App.
If it goes down, 1 of 13 components stops working.
Python Worker
Background jobs. Calls Sentry (reports), PostgreSQL (writes), Redis (reads), Anthropic Claude, OpenAI GPT, Salesforce, HubSpot, Zendesk and Intercom.
Nothing else on the diagram depends on it.
Clerk
In External Services
Authentication. Called by Next.js Web App (signs in).
If it goes down, 1 of 13 components stops working.
PostgreSQL
In External Services
Primary datastore. Called by FastAPI Service (writes) and Python Worker (writes).
If it goes down, 3 of 13 components stop working.
Redis
In External Services
Cache and state. Called by FastAPI Service (caches) and Python Worker (reads).
If it goes down, 2 of 13 components degrade.
Inngest
In External Services
Job orchestration. Called by FastAPI Service (enqueues).
If it goes down, 1 of 13 components degrades.
HubSpot
In External Services
CRM API. Called by Python Worker.
If it goes down, 1 of 13 components degrades.
OpenAI GPT
In External Services
LLM provider. Called by Python Worker.
If it goes down, 1 of 13 components degrades.
Salesforce
In External Services
CRM API. Called by Python Worker.
If it goes down, 1 of 13 components degrades.
Anthropic Claude
In External Services
LLM provider. Called by Python Worker.
If it goes down, 1 of 13 components degrades.
Intercom
In External Services
Help desk API. Called by Python Worker.
If it goes down, 1 of 13 components degrades.
Zendesk
In External Services
Help desk API. Called by Python Worker.
If it goes down, 1 of 13 components degrades.
Sentry
In External Services
Error tracking. Called by Python Worker (reports) and FastAPI Service (reports).
If it goes down, 2 of 13 components degrade.
When this stack fits
- Agents run tasks that take minutes and have to survive retries and restarts.
- A person has to approve risky actions before they happen.
- You want to pick Claude or GPT per task, and your team writes Python.
When to pick something else
- Agents only answer questions and never act: an API with retrieval is enough, with no orchestration or approvals.
- You need deep tracing and evaluations: a dedicated LLM observability tool goes further than a trace table in PostgreSQL.
- Agents run code or browse the web: they need a sandbox, which this diagram doesn’t include.
What you need to build this
14 components across 7 areas of the stack.
Build it with your AI agent
Hand the stack to Claude Code, Codex, Cursor or any coding agent as a brief: how it connects, install steps and a build plan.
Frontend1
- Docs
Next.js Web App
Customer UI
npm install next
Backend & APIs7
Data1
- Docs
PostgreSQL
Primary datastore
Cache & queues1
- Docs
Redis
Cache and state
Auth1
- Docs
Clerk
Authentication
npm install @clerk/nextjs
AI2
Anthropic Claude
LLM provider
pip install anthropic
- Docs
OpenAI GPT
LLM provider
pip install openai
Observability1
- Docs
Sentry
Error tracking
pip install sentry-sdk
Install
npm install next @clerk/nextjs pip install fastapi anthropic openai sentry-sdk
SDKs only. Pick your own database driver or ORM.