Introduction
Redtuma is the modern TypeScript framework for AI-powered applications and agents. It gives you the high-level primitives you need in production — agents, tools, workflows, memory, RAG, observability and MCP — on top of the Vercel AI SDK.
You own the agent loop, the workflow engine and memory; Redtuma delegates only raw model and tool calls to the AI SDK. Everything is plain TypeScript, ESM, and runs on Node, Bun, and the edge.
What makes it different
Two bets set Redtuma apart from a typical agent toolkit:
Edge-native memory
Agent memory and workflow state live in a Cloudflare Durable Object — one per conversation, strongly consistent, no external database. Deploy to Workers with one command.
Cost-aware routing
tieredModeltries a cheap model first and escalates to a stronger one only when the result isn't good enough — you pay for the big model only when you need it.
The primitives
- Agents — a model + instructions + tools, with
generateandstream. - Tools — typed with Zod, called by the agent loop.
- Workflows — deterministic multi-step pipelines with branching, parallelism, loops and suspend/resume.
- Memory — persistent threads, semantic recall and working memory.
- Model routing, RAG, MCP, and observability.
Hello, agent
import { Agent } from '@redtuma/core/agent'
const agent = new Agent({
id: 'assistant',
instructions: 'You are concise and helpful.',
model: 'anthropic/claude-opus-4-8',
})
const { text } = await agent.generate('Hello!')Next