The Context API for AI Agents
Store and optimize context from a single source of truth. Ultracontext is the infrastructure for AI Agents.
agent.ts
1import { UltraContext } from 'ultracontext'23const uc = new UltraContext({ apiKey: 'uc_...' })45// Store and Optimize everything6await uc.append('ctx_123', { role: 'user', content: '...' })7await uc.compact('ctx_123', { strategy: 'smart' })89// Retrieve anywhere, for any framework10const messages = await uc.get('ctx_123', { format: 'vercel-ai-sdk' })