⚡ Alpha Release

Build Agentic Applications
The Right Way

RunMesh is an OpenAI-first JS/TS framework for building production-ready agentic applications. Typed end-to-end, observable, and designed for real-world use.

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, tool result, and final events for complete visibility.

🧠

Memory & Retrieval

Pluggable memory adapters with embeddings support. Conversation history and context management out of the box.

📊

Observability

Built-in logger and tracer hooks. Token counting and cost estimation for budget tracking and optimization.

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 zod
Using npm
npm i @runmesh/agent @runmesh/tools zod
Using yarn
yarn add @runmesh/agent @runmesh/tools zod

Environment Setup

export OPENAI_API_KEY="your-api-key-here"
export OPENAI_MODEL="gpt-5.2"

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 (2027-01-01)

For commercial licensing inquiries, please open an issue on GitHub or contact the maintainer.