defineAPI() once.think() and remember() built in.Write business logic and AI reasoning in the same handler. HTTP, MCP, A2A, and OpenAPI — generated automatically.
This single defineAPI() definition automatically creates: HTTP JSON API (Hono), MCP Tools (Claude Desktop), A2A Skills (Google Agent-to-Agent), OpenAPI 3.1 Spec.
import { defineAPI } from "@zauso-ai/capstan-core";
import { z } from "zod";
export const GET = defineAPI({
input: z.object({
status: z.enum(["open", "closed"]).optional(),
}),
output: z.object({
tickets: z.array(z.object({
id: z.string(),
title: z.string(),
status: z.string(),
})),
}),
description: "List support tickets",
capability: "read",
resource: "ticket",
async handler({ input }) {
return { tickets: await db.tickets.list(input) };
},
});One defineAPI() call exposes HTTP, MCP, A2A, and OpenAPI endpoints simultaneously.
think(), generate(), agent loop with tool calls. Standalone @zauso-ai/capstan-ai.
remember/recall/about scoping. Auto-dedup, hybrid search, context assembly.
React 18 renderToReadableStream, selective hydration, Image, Font, Metadata.
JWT, OAuth, DPoP (RFC 9449), SPIFFE/mTLS, rate limiting, CSRF.
Drizzle ORM, vector fields, embeddings, hybrid search, 4 providers.
cacheSet/cacheGet with TTL, tags, stale-while-revalidate.
defineCompliance with risk levels, audit logging, approval workflows.
| Feature | Capstan | Next.js | FastAPI |
|---|---|---|---|
| Multi-protocol (HTTP + MCP + A2A) | + | – | – |
| OpenAPI auto-generation | + | – | + |
| File-based routing | + | + | – |
| React SSR | + | + | – |
| Built-in auth (JWT + API keys) | + | – | ~ |
| Policy engine + approval workflow | + | – | – |
| AI TDD verifier | + | – | – |
| Built-in database layer | + | – | – |
| AI Agent Toolkit | + | – | – |
| Long-term Memory | + | – | – |
| LLM Integration | + | ~ | ~ |
| Cache / ISR | + | + | – |
+ built-in ~ partial – not available | Full comparison
bunx create-capstan-app my-appcd my-app && bunx capstan devYour app is live with all agent endpoints ready:
# Agent manifest
curl http://localhost:3000/.well-known/capstan.json
# OpenAPI spec
curl http://localhost:3000/openapi.json
# MCP server (for Claude Desktop / Cursor)
bunx capstan mcp@zauso-ai/capstan-ai works independently of the framework. Use it in any TypeScript project for structured LLM interaction and persistent memory.
import { createAI } from "@zauso-ai/capstan-ai";
const ai = createAI({ llm: openaiProvider({ apiKey: "..." }) });
await ai.think("Analyze this data");
await ai.remember("User prefers dark mode");
const context = await ai.memory.about("customer", "c-42").recall("preferences");Install Capstan, create your first project, and understand the project structure.
Learn about defineAPI, the CapabilityRegistry, middleware, and the multi-protocol architecture.
Define models with typed fields, set up relations, and use auto-generated CRUD operations.
Complete reference for all framework functions, types, and configuration options.