AI apps

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
AI agentsPythonTool callingUpdated
The idea someone typed
“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 stack
goes down

Select 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.

  1. Next.js Web App

    In Vercel

    Customer UI. Calls FastAPI Service and Clerk (signs in).

    Nothing else on the diagram depends on it.

  2. 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.

  3. 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.

  4. Clerk

    In External Services

    Authentication. Called by Next.js Web App (signs in).

    If it goes down, 1 of 13 components stops working.

  5. 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.

  6. 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.

  7. Inngest

    In External Services

    Job orchestration. Called by FastAPI Service (enqueues).

    If it goes down, 1 of 13 components degrades.

  8. HubSpot

    In External Services

    CRM API. Called by Python Worker.

    If it goes down, 1 of 13 components degrades.

  9. OpenAI GPT

    In External Services

    LLM provider. Called by Python Worker.

    If it goes down, 1 of 13 components degrades.

  10. Salesforce

    In External Services

    CRM API. Called by Python Worker.

    If it goes down, 1 of 13 components degrades.

  11. Anthropic Claude

    In External Services

    LLM provider. Called by Python Worker.

    If it goes down, 1 of 13 components degrades.

  12. Intercom

    In External Services

    Help desk API. Called by Python Worker.

    If it goes down, 1 of 13 components degrades.

  13. Zendesk

    In External Services

    Help desk API. Called by Python Worker.

    If it goes down, 1 of 13 components degrades.

  14. 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

  • Next.js Web App

    Customer UI

    npm install next

    Docs

Backend & APIs7

  • FastAPI Service

    Application API

    pip install fastapi

    Docs
  • Inngest

    Job orchestration

  • Salesforce

    CRM API

  • HubSpot

    CRM API

  • Zendesk

    Help desk API

  • Intercom

    Help desk API

  • Python Worker

    Background jobs

    Docs

Data1

  • PostgreSQL

    Primary datastore

    Docs

Cache & queues1

  • Redis

    Cache and state

    Docs

Auth1

  • Clerk

    Authentication

    npm install @clerk/nextjs

    Docs

AI2

  • Anthropic Claude

    LLM provider

    pip install anthropic

  • OpenAI GPT

    LLM provider

    pip install openai

    Docs

Observability1

  • Sentry

    Error tracking

    pip install sentry-sdk

    Docs

Install

npm install next @clerk/nextjs
pip install fastapi anthropic openai sentry-sdk

SDKs only. Pick your own database driver or ORM.