AI agents with composable contexts
The first framework with composable contexts - isolated workspaces that combine for complex agent behaviors. True memory, TypeScript-first, production-ready.
$ cat features.txt
[COMPOSABLE]Context composition with .use()
Combine isolated workspaces for modular agent behaviors
[STATEFUL]Persistent memory per context
Each conversation remembers - true stateful agents
[MCP-READY]Model Context Protocol support
Connect to any MCP server for external tools and data sources
[SCOPED]Context-specific actions
Precise control over agent capabilities with .setActions()
[TYPESCRIPT]Type-safe throughout
Full IntelliSense for contexts, actions, memory, and schemas
$ cat composable-contexts.ts
composable-contexts.ts
// Single context - basic agent
const chatContext = context({
type: "chat",
create: () => ({ messages: [] })
});
// Composed contexts - powerful agent
const customerContext = context({
type: "customer",
create: () => ({ tickets: [] }),
// 🌟 The magic: compose contexts
use: (state) => [
{ context: accountContext },
{ context: billingContext }
]
});
// LLM automatically sees all context data!
const agent = createDreams({
contexts: [customerContext],
model: openai("gpt-4o"),
});
💡 Context Composition
Customer context gets chat, account AND billing data in one conversation. Build modular agents that compose together.
$ ls examples/