Skip to main content

Embedded agents for your end users.

Distri runs the agent. Its tools are functions your app already has, and they run in the user’s session, behind your auth, on your own screens. Nothing gets rebuilt for the agent.

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

Where your users are

Embedded in your appin the user’s session
  • auth handshake
  • client-side tools
  • approve in your UI
Managed agent runtimerunning
  • durable runs
  • workflows
  • sub-agents
  • schedules
  • A2A
  • MCP
Your provider keysOpenAIAnthropicOpen models

See it work

Four products, each operated by an agent through the product’s own functions.

Open the gallery
  • 3D studio

    Builds a model part by part in WebGL, refinishes it, then drops 40 rigid bodies on it.

  • Design canvas

    Lays out two mobile screens on an HTML canvas, then restyles them on request.

  • KYC / KYB

    Reads two documents and fills a whole onboarding form in one structured call.

  • Checkout

    Turns one sentence into a cart, a discount and a ready-to-pay checkout sheet.

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.

Your product already knows how to do the work. Hand the agent the same functions, and 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, in the user’s session and behind your auth. There is no second 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.

Your stack stays

It fits what you already run.

Most agent platforms ask you to move the work to them: a sandbox, a new chat surface, a second set of APIs. Distri works through the product you have.

LayerStays yoursDistri adds
Screens and stateYour web or mobile app, as it isChat components, and client-side tools that call your own functions
Auth and permissionsYour login and the user’s sessionTools run inside that session, so the agent can do what the user can do
APIs and dataYour backend, plus the MCP servers you already exposeRemote MCP tools, filtered per agent
ModelsYour provider accounts and keysA model per agent, with cost and limits per end user
Channels and operationsThe chat apps and internal tools your team usesBots, workflows, webhooks and an API for the same agents
Bots / acme_ops_bot
Live
Platform
TelegramWhatsAppDiscord
Bot token
7421963:AAF••••••••••••
Runs
refund_order workflow
Trigger
MessageScheduleWebhook

/start/stop/reset/status/help

02 · Channels, workflows and bots

The same agent, wherever the work continues.

Not every step happens on your screens. The agent you embedded can answer in a chat thread, run on a schedule, or wait for an approval from your team.

  • Slack, Telegram, WhatsApp and Discord

    The agent answers where your team and your customers already talk. Pick the agent and connect the channel; there is no server to deploy.

  • Email, CRMs and internal tools, through workflows

    A workflow starts on a schedule or a webhook, calls your APIs, and can wait for a person before it goes on.

  • Anything else, through the API

    Every agent answers over a streaming API, so your backend, a cron job or another agent can run it.

03 · Cost per end user

Know what every end user costs.

An agent in front of your customers spends money on their behalf. The gateway records every model call against the agent and the end user, and stops a user at their limit before the call is made.

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.

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 runs AI agents inside your product, for your end users. The agent loop runs on Distri; its tools are functions your app already has, and they run in the user’s browser or phone, in their session. The same agents can answer on Telegram, WhatsApp or Discord, or run in workflows started by a schedule or a webhook, and every model call is recorded with its tokens and cost against the agent and the end user. 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?
Yes. Distri is open source under the MIT licence: the server, the CLI and the client libraries. It is free to self-host. Distri Cloud is the hosted option, with short-lived token auth and usage tracking.

Start with one agent, in one flow your users already know.

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