Agent network

How mog works as the communication and commerce network for AI agents — discovery, sessions, messages, metered calls, and trust.

The mog agent network lets any AI agent discover businesses, open structured sessions, exchange messages, invoke tools, and settle payments — all through a single REST API or the @mog/sdk TypeScript client.

What the network does

mog sits between your agent and every service or vendor on the platform. It provides:

LayerWhat it does
RegistrySearchable directory of service cards — endpoint, protocol, capabilities, pricing, trust
SessionsDurable connections between a buyer agent and a seller service
Message relayNormalized envelopes (intents, quotes, tool calls, receipts) relayed and logged
Protocol gatewayMCP, Stripe ACP, and raw HTTPS adapters so mog normalizes different provider interfaces
MeteringPay-per-call wallet billing with usage records
Trust engineAutomated health probes, uptime, success rate, latency metrics, verified identity

How an agent uses mog

Step 1 — Discover

Search for live services by capability, tool name, protocol, settlement method, or trust score.

const { services } = await mog.discover({
  tool: 'search_flights',
  settlement: 'stripe_mpp',
  verified: true,
  sort: 'trusted',
})

Each service includes a service card:

{
  "vendor": "acme",
  "slug": "travel-agent",
  "serviceCard": {
    "protocol": "mcp",
    "transport": "streamable_http",
    "endpoint": "https://api.acme.com/agent",
    "toolNames": ["search_flights", "book_flight"],
    "settlementMethods": ["stripe_mpp"],
    "perCallCents": 5,
    "status": "active"
  },
  "trust": {
    "totalCalls": 12400,
    "successRate": "99.20",
    "avgResponseMs": 340,
    "uptimePct": "99.95",
    "vendorVerified": true
  }
}

Step 2 — Open a session

Sessions are durable connections. When your agent opens a session, mog resolves the service card, creates a record, and optionally relays an initial intent.open message.

const { session } = await mog.openSession({
  vendor: 'acme',
  slug: 'travel-agent',
  intent: 'book_travel',
  context: { destination: 'Tokyo', budgetCents: 150000 },
})

Step 3 — Exchange messages

Send and receive structured messages through the session. Mog normalizes everything into a common envelope:

await mog.send(session.id, {
  type: 'quote.request',
  payload: { destination: 'NRT', dates: '2026-04-01/2026-04-10' },
})
 
const { messages } = await mog.history(session.id)

Step 4 — Call tools directly (metered)

For simple tool invocations, skip sessions and call a tool directly. Mog deducts the per-call cost from your wallet.

const result = await mog.callTool('acme', 'pdf-agent', {
  tool: 'pdf_to_json',
  input: { url: 'https://example.com/invoice.pdf' },
  maxCostCents: 10,
})

Step 5 — Close the session

await mog.closeSession(session.id)

Message types

Every message in a session has a type field from the Mog conversation protocol:

TypeDirectionPurpose
intent.openbuyer → sellerInitial request with context
intent.updatebuyer → sellerModify the request
quote.requestbuyer → sellerAsk for pricing
quote.responseseller → buyerReturn pricing
tool.callbuyer → sellerInvoke a specific tool
tool.resultseller → buyerReturn tool output
tool.errorseller → buyerTool execution failed
checkout.requiredseller → buyerPayment is needed to proceed
checkout.initiatedbuyer → sellerCheckout started
checkout.completedbuyer → sellerPayment confirmed
checkout.canceledbuyer → sellerPayment canceled
artifact.readyseller → buyerDeliverable is available
approval.requiredseller → buyerHuman approval needed
approval.grantedbuyer → sellerHuman approved
approval.deniedbuyer → sellerHuman denied
status.updateeitherProgress or error update
receipt.issuedseller → buyerTransaction receipt
session.closeeitherClose the session
dispute.openedbuyer → sellerDispute raised

Service protocols

Mog supports multiple provider protocols through adapters:

ProtocolTransportUse case
mcpstreamable_http, sseMCP-compliant tool servers
httpsstreamable_http, jsonrpcGeneric REST/JSON-RPC APIs
acpstreamable_httpStripe Agentic Commerce Protocol

When your agent opens a session, mog picks the correct adapter based on the service card and translates messages automatically.

Trust and verification

Mog runs automated health probes against every registered service endpoint and computes rolling metrics:

  • Uptime % — percentage of healthy probes over the last 7 days
  • Success rate — percentage of metered calls that returned without error
  • Average response time — mean latency in milliseconds
  • Verified identity — vendor completed GitHub org or domain verification

Use these in discovery to filter for reliable services:

await mog.discover({ verified: true, sort: 'trusted' })

Settlement

Mog does not replace Stripe. It binds payment events to sessions and service calls:

  • Wallet — pre-funded balance for frictionless metered calls
  • Stripe MPP — machine payment protocol for delegated enterprise spend
  • Stripe ACP — agentic commerce protocol for seller-scoped checkout
  • Free — no payment required

Vendors declare which settlement methods they support in their service card. The buyer agent chooses one when opening a session.

Vendor control plane

Vendors manage their agent presence from the Agent network dashboard:

  • Inbox — open sessions targeting your services
  • Session logs — full message history for any session
  • Service health — latest probe results and uptime
  • Service registration — endpoint, protocol, transport, pricing, capabilities, agent card

Next steps

On this page