OpenAI-First Agent Runtime
for JS/TS Builders
RunMesh is a typed, observable framework for agents, tools, streaming, and structured outputs. Chat Completions supported today; Responses API support is on the roadmap.
Frontend Showcase
RunMesh ships front-end primitives that turn agent behavior into cinematic UX. Stream tokens, tool calls, and structured output on the same timeline, then expose every trace with built-in observability hooks.
Live Stream Canvas
Token bursts, tool calls, and final payloads stay visible so users feel the system thinking in real time.
Tool Loop Graph
Reveal each decision hop, tool chain, and retry in a single responsive UI flow.
Trace-First UX
Latency, cost, and step history are built-in so demos look like production from day one.
user
-> agent.plan
-> tool:fetch_sources
-> tool:rank_sources
-> agent.compose
-> tool:validate_payload
-> agent.final
{
"persona": "founder",
"next_action": "draft-landing",
"risk_level": "low",
"artifacts": [
"brief.md",
"ui-flow.json"
]
}
Why RunMesh?
Agent Runtime
Complete agent lifecycle management with prompts, tools, memory, and policies. Multi-round tool loops with configurable execution limits.
Typed Tools
Define tools with Zod schemas. Input validation before execution. Automatic JSON Schema export for OpenAI tool definitions.
Structured Outputs
Schema-first extraction with automatic validation and retry. Reliable structured data for automation workflows.
Streaming Support
Real-time event iterators for responsive UX. Token, tool call, and final events for complete visibility.
Memory & Retrieval
Pluggable memory adapters with embeddings support. Conversation history and retrieval primitives out of the box.
Observability
Logger and tracer hooks with token counting and cost estimation helpers (when available).
Design Targets for Instant UX
Quickstart
import { createAgent } from "@runmesh/agent";
import { tool, ToolRegistry } from "@runmesh/tools";
import { z } from "zod";
const tools = new ToolRegistry();
tools.register(
tool({
name: "get_time",
description: "Return the current ISO time",
schema: z.object({}),
handler: () => new Date().toISOString()
})
);
const agent = createAgent({
name: "demo",
model: process.env.OPENAI_MODEL ?? "gpt-5.2",
systemPrompt: "You are a concise assistant.",
tools
});
const result = await agent.run("What time is it?");
console.log(result.response.choices[0]?.message?.content);
Installation
Environment Setup
export OPENAI_API_KEY="your-api-key-here"
export OPENAI_MODEL="gpt-5.2"
Demo: Mimi8 Studio
A front-end demo that showcases RunMesh structured outputs, tool loops, and multi-run generation on Mimi8 racing data. The live odds panel is display-only and is not used for ticket generation.
pnpm install
pnpm --filter runmesh-demo-web start
# Required files at repo root
# donnees_jour.csv
# infos_brutes.txt
# world_model.json
# tuning_state.json
Framework Packages
📜 License Information
Business Source License 1.1 (BSL 1.1)
✅ Free to use for personal projects, internal/company use, and production deployments
⚠️ Commercial hosted offerings require a commercial license
📅 Will relicense to Apache 2.0 on the change date (see LICENSE)
For commercial licensing inquiries, please open an issue on GitHub or contact the maintainer.