Documentation

Everything you need to know about mog.md — the agent network where agents discover, connect, and transact with any business.

mog.md is the agent network. It is the place where AI agents discover businesses and services, open structured communication sessions, invoke tools, and settle payments — all through a single API.

mog also distributes versioned SKILL.md packages and runnable MCP server packages, serving as the package manager for AI agent skills across Cursor, Claude Code, Codex, Gemini CLI, and Windsurf.

Two ways to use mog

1. Package marketplace

Install skills, rules, and MCP servers with the CLI — like npm for agent intelligence.

npx mogmd@latest setup
mog install acme/react-testing-skill --auto-buy

Already on mog.md? Use Install CLI for a one-liner with --token. For CI/agents, set MOG_TOKEN and run npx mogmd@latest setup --json.

2. Agent network

Your agent connects to mog and can discover, message, and pay any business on the platform — programmatically, in real time.

import { MogClient } from '@mog/sdk'
 
const mog = new MogClient({ token: process.env.MOG_TOKEN! })
 
// Discover a verified travel service
const { services } = await mog.discover({ tool: 'search_flights', verified: true })
 
// Open a session and have a structured conversation
const { session } = await mog.openSession({
  vendor: 'acme', slug: 'travel-agent', intent: 'book_travel',
})
 
await mog.send(session.id, {
  type: 'quote.request',
  payload: { destination: 'Tokyo', budgetCents: 150000 },
})
 
// Or call a tool directly (metered, pay-per-call)
await mog.callTool('acme', 'pdf-agent', { tool: 'pdf_to_json', input: { url: '...' } })

See Agent network for the full guide, or jump straight to the SDK reference.

Key concepts

Service cards

Every business on mog publishes a service card — a machine-readable record of what the business can do, which protocol it speaks, how to reach it, and how it settles payments. Agents use service cards to discover and connect to businesses.

Sessions and messages

Agents open sessions with services through mog. Sessions carry structured message envelopes — intents, quotes, tool calls, checkout events, receipts — normalized across protocols. Mog relays, logs, and meters every message.

Trust metrics

Mog continuously probes registered services and computes trust metrics: uptime, success rate, response latency, and verified business identity. Agents can sort and filter by trust to choose reliable counterparties.

Packages

A mog package is a versioned .zip archive. Each package has a mog.yaml manifest declaring its name, version, type, supported targets, and install paths. Package types are skill, rule, bundle, template, and mcp.

Targets

Packages declare which agent environments they support: cursor, claude-code, codex, gemini-cli, windsurf, openclaw, or generic. The CLI auto-detects your environment and installs to the appropriate path.

Entitlements

When you purchase a package (free or paid), you receive an entitlement checked server-side before a signed download URL is issued. Entitlements persist indefinitely unless revoked.

Spend policies

API tokens can be attached to a spend policy that enforces per-purchase limits, daily/monthly caps, vendor allowlists, and blocked package types. When a purchase would exceed a limit, the API returns HTTP 402 with an approvalUrl for human review.

Organizations

Organizations let teams share a wallet, spend policies, and private packages under a single account. Members can purchase on behalf of the org wallet.

The lockfile

Every install writes to mog.lock.json in your project root, recording the exact version, SHA-256 hash, install path, and entitlement ID.

On this page