AI application infrastructure framework
An open-source TypeScript framework for building production AI applications. Modular, extensible, and ready for the real world.
Modular by design
Abstract at the core, concrete at the edges. Each package has one job, ships with its tests, and works alone or together.
@de_canter/apogee-kernel
v0.2.0The domain vocabulary every product composes: Money, Identifier, Interval, Bitemporal, Provenance, Assertion, Lifecycle, Role.
Read the docs โ
@de_canter/apogee-ai
v0.3.0One model client: vision and PDF input, structured output validated by Zod, prompt caching, models by role, priced usage.
Read the docs โ
@de_canter/apogee-prompts
v0.2.0Named, versioned prompts composed from sections with a cache-aware boundary and contributor slots.
Read the docs โ
@de_canter/apogee-agent
v0.2.1The agentic session: bounded tool loop, one event stream that is also the SSE protocol, compaction, memory, persistence ports.
Read the docs โ ยท live demo
@de_canter/apogee-agent-react
v0.2.0React client: SSE decoder, pure reducer, useAgentSession, unstyled chat shells.
Read the docs โ ยท live demo
@de_canter/apogee-artifacts
v0.2.0Tool results as UI: a registry the host fills with components, a renderer, action dispatch, interaction telemetry.
Read the docs โ ยท live demo
@de_canter/apogee-rules
v0.2.0Natural-language business rules: host-declared dimensions, parse into assertions, validate, detect conflicts, evaluate in two layers, audit.
Read the docs โ ยท live demo
@de_canter/apogee-documents-ai
v0.2.0Classify, extract by host schema, every field an assertion with confidence, corrections as ground truth, a resumable pipeline.
Read the docs โ ยท live demo
@de_canter/apogee-knowledge
v0.2.0Markdown chunking with stable ids, lexical and vector stores with scopes, retrieval with citations as a prompt contributor.
Read the docs โ ยท live demo
@de_canter/apogee-integrations
v0.2.0No-code REST patterns: templates with vault secrets, five auth methods, rate limit, circuit breaker, retry, dead letters with replay, drift, inbound webhooks with classification.
Read the docs โ ยท live demo
@de_canter/apogee-chat-kit
v0.2.0One resource declaration becomes MCP tools, agent tools, and an HTTP handler, all returning one envelope: state, allowed next actions, UI. Out-of-order calls fail before execute.
Read the docs โ ยท live demo
@de_canter/apogee-chat-kit-app
v0.1.0The client half of the chat kit: one React card renders an envelope and acts through tools, in an MCP Apps host or in the product's own app.
Read the docs โ ยท live demo
@de_canter/apogee-grid-commander
v0.1.0A cockpit-grade data grid for dense, keyboard-first worklists: renderers, editors, presets, context menu, detail panel, status bar, export, over TanStack Table and Virtual.
Read the docs โ ยท live demo
An agent in one route handler
This is the shape of the live demo's server. Tools are Zod-typed, memory is a tool plus a prompt slot, and the event stream is the SSE body.
import { createAnthropicModelClient } from '@de_canter/apogee-ai';
import { definePrompt, slot, text } from '@de_canter/apogee-prompts';
import { createAgentSession, defineTool, memoryTool, agentEventsToReadableStream, SSE_HEADERS } from '@de_canter/apogee-agent';
import { z } from 'zod';
const client = createAnthropicModelClient(); // the only place the SDK is constructed
const prompt = definePrompt<Ctx>({
name: 'rental-desk', version: '1.0.0',
sections: [text('identity', 'You run the rental desk.'), slot('memory', 'memory')],
});
const checkAvailability = defineTool<Ctx, { typeCode: string; start: string; end: string }>({
name: 'check_availability',
description: 'Count available units and quote a date range.',
input: z.object({ typeCode: z.string(), start: z.string(), end: z.string() }),
execute: async (input, { ctx }) => ({ success: true, data: quote(ctx.world, input) }),
});
export async function POST(req: Request) {
const { message, annotations } = await req.json();
const session = createAgentSession<Ctx>({
sessionId, client, prompt, ctx,
tools: [checkAvailability, memoryTool({ port, keyFromCtx: (c) => c.customer, byFromCtx: () => 'agent' })],
contributors: { memory: memoryContributor({ port, keyFromCtx: (c) => c.customer }) },
});
return new Response(agentEventsToReadableStream(session.run(message, { annotations })), { headers: SSE_HEADERS });
}Get started
Every package is on npm under the @de_canter scope. Add the ones you import; the framework's internal dependencies resolve on their own.
Prerequisites
- Node.js 20+ and pnpm 9
- TypeScript 5, strict mode
- React 18 or 19 for the client packages
Install
pnpm add @de_canter/apogee-kernel \ @de_canter/apogee-ai \ @de_canter/apogee-prompts \ @de_canter/apogee-agent \ @de_canter/apogee-agent-react \ @de_canter/apogee-artifacts \ @de_canter/apogee-rules \ @de_canter/apogee-documents-ai \ @de_canter/apogee-knowledge \ @de_canter/apogee-integrations \ @de_canter/apogee-chat-kit \ @de_canter/apogee-chat-kit-app \ @de_canter/apogee-grid-commander
Built with Apogee
See it running
Live demos built from the real packages, on a demo domain that belongs to no product: a small equipment rental company.
Agent chat โ
A rental desk with tools, cards, memory, and streaming, on the equipment-rental demo domain.
Admin assistant โ
Describe a business rule in plain language, confirm it on a card, and watch the desk follow it.
Document intake โ
Classify and extract with a confidence on every field; a correction becomes ground truth.
Knowledge โ
Chunk the rental policies, retrieve with scopes, and answer with citations.
Integrations โ
Author a REST pattern, break the vendor, replay the dead letter, receive a signed webhook.
Chat kit โ
One declaration, one envelope: walk a reservation's lifecycle and try the call that is out of order.
Grid commander โ
Run the yard's work queue from the keyboard: presets, inline edits, batch actions, export.