MeshFlow
  • Cloud PlatformDeployIntegrationsInit CLIWhy MeshFlow
  • DocsLearn
  • CustomersCertificationBlogChangelogCommunity
  • Pricing
Sign inGet started
Pricing
Sign inGet started
MeshFlow

The production-safe standard for agentic AI.
Apache 2.0 — free forever.

Product
  • Pricing
  • Cloud
  • Compare
  • Init CLI
  • Changelog
Docs
  • Quickstart
  • Core concepts
  • Compliance guide
  • Token optimization
  • API reference
Resources
  • Blog
  • Customers
  • Community
  • PyPI
  • GitHub
Company
  • Discord
  • Twitter
  • Security
  • License
MeshFlow © 2026 · Yaya Systems · Apache 2.0
All systems operational
MeshFlowdocs
Search docs...⌘K
v1.13.0 GitHub Discord
Getting startedQuickstartInstallationCore conceptsHarness architectureSkills vs ToolsSandbox mode
GuidesBuilding agentsMulti-agent workflowsModel RoutersCost AnalyticsCompliance guideToken optimization
Claude & AIAdvisor patternThinking budgetsDynamic workflowsContext compactionTool streaming
Governancemeshflow-forensicZero-Trust PoliciesSOC 2 assertionEU AI ActProduction Readiness
IntegrationsOpenAI Agents SDKLangGraphCrewAIMCP ToolsTypeScript SDKOTel / OTLPAutoGen 0.4+
API ReferenceWorkflowAgentCostCapAdvisorAgentCostRegressionGate
Docs/Integrations/TypeScript SDK

TypeScript SDK

The MeshFlow TypeScript SDK lets any TypeScript or JavaScript agent — whether it uses Vercel AI SDK, LangChain.js, raw fetch, or a custom loop — emit ATR-compatible spans to MeshFlow Cloud.

Install

bash
npm install @meshflow/sdk

Instrument

typescript
import { MeshFlowClient } from '@meshflow/sdk';

const mf = new MeshFlowClient({ apiKey: process.env.MESHFLOW_API_KEY });
const run = await mf.startRun({ workflowName: 'my-agent' });

Spans

typescript
await run.span({
agentName: 'researcher',
spanType: 'llm_call',
name: 'summarise',
inputText: prompt,
outputText: response,
modelVersion: 'claude-sonnet-4-6',
promptVersion: 'summarise-v3',
});

await run.end({ status: 'success' });

Context packs

typescript
await run.contextPack({
agentName: 'researcher',
sources: [{ type: 'rag', name: 'policy-db', tokenCount: 420 }],
inputTokens: 2048,
promptVersion: 'v3',
});
Previous
MCP Tools
Next
OTel / OTLP
On this pageInstallInstrumentSpansContext packs