Launching today
Agent Express
Middleware framework for AI agents — Express.js for LLMs
2 followers
Middleware framework for AI agents — Express.js for LLMs
2 followers
Agent Express is an open-source middleware framework for building AI agents in TypeScript. If you've written Express.js middleware, you already know how to build agents. The model-tool-model loop in an agent is structurally identical to the request-response cycle in a web server — a context flows through composable (ctx, next) functions. Three concepts: Agent, Session, Middleware. Five hooks. Built-in middlewares for budget tracking, guardrails, observability, memory compaction and others.





Hey Product Hunt! I'm the maker of agent-express.
I was building AI agents in TypeScript and kept noticing that every framework invents its own abstraction for things that are fundamentally middleware — intercept context, do something before/after the LLM call, pass control downstream.
Memory management? That's middleware that trims ctx.history before the model call. Budget caps? Middleware that checks state before next() and throws if cost exceeds a limit. Retry? Middleware that wraps next() in a loop with backoff.
So I built Agent Express with one core abstraction: (ctx, next) middleware — the same pattern Express.js, Koa, and Hono have used for a decade.
Here's a production-ready agent in 16 lines:
Budget, retry, and tools are independent middleware that compose without knowing about each other. Same property that makes Express.js middleware powerful.
What it's NOT good for:
Graph-based orchestration with conditional branching (use LangGraph)
Full-stack AI platform with RAG, workflows, dashboard (use Mastra)
React hooks for streaming UI (use Vercel AI SDK)
It's v0.1 — I'd love feedback on the API design, what middleware is missing, and what would make you try it.
Docs: https://agent-express.ai
GitHub: https://github.com/agent-express-ai/agent-express
Comparison article: https://agent-express.ai/blog/ag...