⚡ Alpha Release

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.

Live Agent Mesh
Stream 128 tok/s Latency 68ms
Tools 6 chained calls Policy safe
Schema Validated JSON Retries 0
Trace Obs + cost Live metrics
Streaming UI
Tool Loops
Structured Output
Observability

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.

Streaming UI Live
assistant.delta token burst
tool.call search_routes
final.response ready
68mslatency
1.2sfirst token
92%stream complete
Tool Loop Graph Multi-step
user
  -> agent.plan
  -> tool:fetch_sources
  -> tool:rank_sources
  -> agent.compose
  -> tool:validate_payload
  -> agent.final
6calls chained
0policy hits
2parallel tools
Structured Output Validated
{
  "persona": "founder",
  "next_action": "draft-landing",
  "risk_level": "low",
  "artifacts": [
    "brief.md",
    "ui-flow.json"
  ]
}
100%schema pass
0retries
JSONready
Observability Tracing
span: planner 12ms
span: tools 84ms
span: synth 44ms
Traceenabled
Costtracked
Logsstreamed

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

0
first-token budget
0
tool fan-out loops
0
schema compliance goal
0
observability uptime

Quickstart

quickstart.ts
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

Using pnpm
pnpm add @runmesh/agent @runmesh/tools @runmesh/core zod
Using npm
npm i @runmesh/agent @runmesh/tools @runmesh/core zod
Using yarn
yarn add @runmesh/agent @runmesh/tools @runmesh/core zod

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.

demo-web
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

@runmesh/core
OpenAI client wrapper, streaming, response helpers, and error handling
@runmesh/agent
Agent runtime with planner, executor, and policy enforcement
@runmesh/tools
Tool definition, registry management, and execution engine
@runmesh/memory
Memory adapters, embeddings, and retrieval capabilities
@runmesh/schema
Zod validation with JSON Schema export for tool definitions
@runmesh/observability
Logger, tracer, and cost estimation utilities
@runmesh/adapters
CLI, Web, and Bot adapters for different platforms

📜 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.