Skip to main content

Embed · Automate · Control

Make your product AI-native.

Distri is one stack for putting AI agents into your product: agents embedded in your app that call your own functions, bots on Telegram, WhatsApp and Discord, and an AI gateway that meters and limits every model call per end user.

curl -fsSL https://distri.dev/install.sh | sh

Where your users are

Distri runtimerunning
  • agents/*.md
  • workflows
  • your functions as tools
  • remote MCP servers
  • traces
AI Gatewayevery model call through Distri
  • tokens and cost per agent
  • per end user
  • limits
Your provider keysOpenAIAnthropicOpen models

Quick start

Live in three steps.

  1. Write the agent, push it

    An agent is a markdown file. Install the CLI, sign in, and push the folder to your workspace.

    agents/shop_assistant.md
    ---
    name = "shop_assistant"
    description = "Helps shoppers check out"
    [tools]
    external = ["add_to_cart"]
    [model_settings]
    model = "gpt-4.1-mini"
    ---
    # ROLE
    You help shoppers on our store.
    Terminal
    curl -fsSL https://distri.dev/install.sh | sh
    distri login
    distri push

    The agent is in your workspace, ready to be called from your product.

  2. Hand it your functions

    Pass the functions the agent may call as client-side tools and render the chat. The handlers run in the browser.

    App.tsx
    // npm install @distri/react @distri/core
    const addToCart: DistriFnTool = {
    name: 'add_to_cart',
    description: 'Add a product to the cart',
    type: 'function',
    parameters: {
    type: 'object',
    properties: { sku: { type: 'string' } },
    },
    autoExecute: true,
    handler: async ({ sku }) => {
    await cart.add(sku); // your code
    return { ok: true, items: cart.count };
    },
    };
    <DistriProvider config={{ baseUrl, clientId }}>
    <Chat
    agentId="shop_assistant"
    externalTools={[addToCart]}
    />
    </DistriProvider>

    Not on React? The same tool works from React Native or a script tag.

    A streaming chat renders inside your app. How client-side tools work

  3. Ask it something

    Open your app and type. The agent calls your function, and your UI changes the way it does for a click.

    Each run is recorded with its tokens and cost. Usage · Traces

Get started for free

You need a model provider key, for example OPENAI_API_KEY. Prefer your own machine? Run it locally, or follow the full guide.

01 · Embedded agents

The agent runs on Distri. Its tools run in your app.

Hand the agent functions you already have. When it calls one, your handler runs in the user’s browser or on their phone.

  • Tools are functions you already have

    Give the agent a name, a JSON Schema and a handler. It can fill your form, add to your cart or move your router.

  • They run where the user is

    In the browser or on the phone, with the user’s session and your permissions. No backend API to build for the agent.

  • React, React Native or a script tag

    Drop-in chat components, a React Native package in preview, or one script tag with no build step.

  1. 1
    The user asks, in your UI

    Add two oat milks to my cart

    message
  2. 2
    The agent calls a tool you gave itadd_to_cart({ sku: "oat-milk-1l", qty: 2 })
    tool call
  3. 3
    Your function runs, where the user isawait cart.add("oat-milk-1l", 2)
    • your state
    • the user’s session
    • your permissions

No endpoint was built for the agent, and no credential left your app. Distri saw a tool name, its arguments and what your function returned.

Bots / acme_ops_bot
Live
Platform
TelegramWhatsAppDiscord
Bot token
7421963:AAF••••••••••••
Runs
refund_order workflow
Trigger
MessageScheduleWebhook

/start/stop/reset/status/help

02 · Bots for workflows

Put an agent or workflow on Telegram, WhatsApp or Discord.

The agent you embedded in your app can answer in a chat thread too. Bots run on Distri Cloud.

  1. 1

    Paste a bot token

    Distri Cloud receives the platform webhooks for you. There is no server to deploy.

  2. 2

    Pick what it runs

    Any agent, or a workflow that can pause for a person and reply with buttons.

  3. 3

    Choose what triggers it

    A message, a slash command, a schedule or a webhook from another system.

03 · AI Gateway

Every model call your agents make, in one place.

Agent runs, bot conversations and workflow steps are all recorded by the gateway, so you can say which agent spent what, and for which user.

UsageLast 30 days
Sample data
Cost
$212.40
Tokens
18.4M
Model calls
41,280
AgentCallsTokensCost
support_agentv0.4.121,4009.6M$118.20
form_fillerv0.2.012,3004.1M$38.90
refund_orderworkflow5,1802.9M$34.10
weekly_digestv0.1.32,4001.8M$21.20
  • Attributed, not just totalled

    Every call is recorded with its tokens and cost against the agent, end user, API key, model and source.

  • Limits checked before the call

    Per workspace, agent, end user or API key, in tokens or USD. Over the limit, the API answers 429.

  • Your provider keys

    Bring your own LLM keys. Distri meters the calls; the provider account stays yours.

Why one stack

One stack instead of four.

Each of these jobs has good tools. The cost is in the seams: four sets of credentials, four dashboards, and usage numbers that never line up.

The jobWhat you’d usually assembleWith Distri
Agent loop, tools, memoryAn agent frameworkAgents as markdown, run by the Distri runtime
Chat and tool UI inside your appA chat UI library, plus glue to your agent backend@distri/react: DistriProvider and Chat
Telegram, WhatsApp, DiscordA bot framework and a webhook service per channelBots, pointed at the same agents and workflows
Model keys, cost, limits, tracesAn LLM gateway and an observability toolThe gateway and OpenTelemetry traces, built in

Built on Distri

Pricing

Free while in beta. Enterprise when you need it.

Start on Distri Cloud for free. Enterprise runs in our cloud, in yours (BYOC) or self-hosted, with SLAs.

Free

$0free while in beta

  • 1 workspace
  • Embedded agents, bots and the AI gateway
  • Usage and cost per agent and end user
  • Bring your own model keys

Team

Contact Us

  • Up to 20 workspaces
  • Higher rate limits
  • Google SSO login
  • Priority support

Enterprise

Custom

  • BYOC: Distri in your own cloud account
  • Or fully self-hosted, in your VPC
  • Uptime and support SLAs
  • Custom SSO (SAML, OIDC) and role-based access

FAQ

Questions about Distri.

What is Distri?
Distri is a stack for AI-native products. It has three parts: agents embedded in your app that call your product’s own functions as tools, bots that connect Telegram, WhatsApp or Discord to an agent or workflow, and an AI gateway that records tokens and cost and enforces limits for every model call made through Distri. You define an agent once in a markdown file and run it from the CLI, as a streaming API server, or embedded in your app.
How do I create a Distri agent?
Install the CLI with curl -fsSL https://distri.dev/install.sh | sh, write a markdown file with a TOML front matter block (name, [tools], [model_settings]) and a system prompt, then run it with distri run --task "..." --agent NAME. Local runs need no account, only a model provider key.
How do I deploy a Distri agent?
Authenticate with distri login, then sync your agents to Distri Cloud with distri agents push agents/ --all. Skills, prompts and workflows push the same way (distri skills push, distri workflows push).
How do I embed a Distri agent in my product?
Install @distri/core and @distri/react, wrap your app in DistriProvider, and render a Chat component. Pass your product’s functions as externalTools so the agent can drive your UI. You can also call the runtime directly with agent.invoke() and client.llm().
Is Distri free and open source?
The Distri server is source-available under a fair-code licence and free to self-host. The client libraries are MIT-licensed. Distri Cloud is the hosted option, with short-lived token auth and usage tracking.

Start with one agent. Add bots and the gateway when you need them.

Free to self-host. Distri Cloud has a free tier.