Build AI agents
that ship.
Provider-neutral runtime, telemetry, and headless React UI — the shared agent infrastructure behind real apps, in one typed, streaming library.
A chat UI in one component
The real <ChatPanel/>— streaming, markdown, tool traces, generative UI. Here it's driven by a scripted reply; in your app it POSTs to your agent route. Type to try it.
I'm a streaming agent runtime. I call typed tools, stream every turn as an AgentEvent, track cost + telemetry, and render generative UI — all provider-neutral. Try asking me about tools or streaming.
Observability, built in
Every call is logged — tokens, cost, latency p50/p95/p99, per-tool outcomes, error drill-down. Drop in <MetricsDashboard/> and get this admin view straight from your telemetry store.
| Model | Calls | Cost | Tokens |
|---|---|---|---|
| claude-opus-4-8 | 57 | $1.9486 | 211,064 |
| gpt-4o | 53 | $1.7857 | 193,676 |
| claude-sonnet-4-6 | 47 | $1.7230 | 170,486 |
| Operation | Calls | Errors | Cost | avg |
|---|---|---|---|---|
| embed | 60 | 6 | $1.8666 | 1655.85ms |
| chat | 53 | 3 | $2.0154 | 1491.85ms |
| recipe_run | 44 | 2 | $1.5753 | 1461.55ms |
| Error type | Count |
|---|---|
| timeout | 5 |
| overloaded_error | 3 |
| rate_limit_error | 3 |
| Tool | Calls | Success | avg | p50 | p95 | p99 | max |
|---|---|---|---|---|---|---|---|
| fetch_url | 63 | 52% | 993.76ms | 869ms | 1674ms | 1816ms | 1819ms |
| run_sql | 59 | 41% | 816.12ms | 771ms | 1675ms | 1724ms | 1735ms |
| search_web | 58 | 48% | 890.66ms | 977ms | 1695ms | 1807ms | 1819ms |
| publish | 40 | 45% | 1019.18ms | 1002ms | 1648ms | 1740ms | 1816ms |
Everything an agent app needs
No framework lock-in, no glue code between server and client — just typed pieces that compose.
Provider-neutral
One LlmClient port. Anthropic, OpenAI, DeepSeek, Groq, Ollama — or any OpenAI-compatible endpoint. Swap in a line; fall back automatically.
Streaming by default
Every turn is a typed AgentEvent union over SSE — text, tool calls, results, usage. The same type flows to the browser, so the client is glue-free.
Typed tools + MCP
Tools from any Standard Schema validator (Zod, Valibot, ArkType) with validation, middleware, and arg-repair. Expose or consume MCP endpoints.
Telemetry & cost
Token accounting, cost, latency p50/p95/p99, per-tool metrics and error drill-down — with a drop-in admin dashboard and SQL-portable aggregation.
Generative UI
Stream cards, forms, and charts as first-class typed events; render them as your own React components and round-trip user actions back to the agent.
Headless React + UI
useAgentChat / useToolCalls hooks for full control, or the styled ChatPanel and MetricsDashboard when you just want it to work. Your call.
End to end in ~10 lines
A streaming agent on the server, a live chat on the client — the same AgentEvent type across the wire.
// app/api/agent/route.ts — a plain Fetch handler
import { createAgentHandler, createAnthropicProvider } from '@agentoria/runtime';
export const POST = createAgentHandler({
provider: createAnthropicProvider({
apiKey: process.env.ANTHROPIC_API_KEY!,
model: 'claude-sonnet-4-6',
}),
tools,
});// app/page.tsx — one hook, one component
'use client';
import { ChatPanel } from '@agentoria/ui';
export default function Page() {
return <ChatPanel endpoint="/api/agent" />;
}A layer for each concern
Depend on exactly what you need — or grab the umbrella agentoria and import from one place.
@agentoria/usagetoken accounting + cost@agentoria/corecontracts · events · SSE@agentoria/runtimeproviders · agent loop · tools@agentoria/telemetrystats · stores · SQL@agentoria/mcpMCP client + server@agentoria/reactheadless hooks@agentoria/uiChatPanel · dashboard@agentoria/nodehttp / Express adapter