Build an AI agent into your app. Keep control of what it does.
A hosted service for adding AI to the app you already have. It uses only the data you allow, asks before changing anything, and runs on the AI model you choose.
Free plan Β· No credit card Β· Test mode runs without provider keys
Pay the Northwind invoice for March.
Found invoice INV-2041 for $4,200, matching PO 1187
Asks before changing anything
Pay this invoice?
- invoice_id
- INV-2041
- amount
- 4200.00
Approved by your user
Scheduled the payment
Done. $4,200.00 goes to Northwind Supplies tomorrow, and the invoice is marked paid.
Uses only the two endpoints you allowed. Every step is logged.
1Your backend starts the agent
POST /v1/ai/async
{
"workflow": "payables_assistant",
"messages": [{
"role": "user",
"content": "Pay the Northwind invoice for March"
}],
"end_user": { "id": "usr_812" }
}2The agent calls your tool, signed
POST https://api.yourapp.com/tools/invoices
{
"tool": "find_invoice",
"arguments": {
"vendor": "Northwind",
"month": "2026-03"
},
"end_user": { "id": "usr_812" }
}
// your endpoint checks who is asking, then replies
{ "id": "INV-2041", "amount": 4200.00 }3Your frontend shows each step
client.connect({
channelId, wsToken, websocketChannel,
});
client.on("tool_calls", showProgress);
client.on("tool_approvals", askUser);
client.on("response", (res) => render(res.data));The model is the easy part.
An agent inside a real app works with your data, your customers and your frontend. That is where teams get stuck.
It can reach too much
Give a model your API and it can ask for any record, for any user.
With ModelRiver: It calls only the endpoints you list. Each call is signed, and your endpoint decides what that user may see.
It changes things without asking
One wrong guess becomes a duplicate payment or a refund nobody approved.
With ModelRiver: Any tool that changes something waits until the customer approves that exact call.
You can't see what it did
When a customer complains, you have the final answer and no trail.
With ModelRiver: Every round, tool call and approval is in the request log, step by step.
The wiring takes longer than the feature
Streaming to the browser, remembering the conversation, passing results back and forth. Every team rebuilds the same plumbing.
With ModelRiver: ModelRiver connects your app to the AI and back. Responses stream to your frontend over a WebSocket, and session memory carries the conversation from one turn to the next.
Or build the plumbing yourself.
What our own core took to build, before agents.
- To build it yourself
- 84+ engineer-days, about $44k
- To keep it running
- 24 engineer-days a year, about $12.5k
- ModelRiver Pro
- $588 a year, agents included
Measured from our commits, at the US median developer salary. A COCOMO II estimate puts it as high as 1,259 engineer-days.
Your database stays yours
ModelRiver never connects to it. Your endpoints return only the fields a step needs, and those fields are kept in your request logs.
SecurityWe run our own support on it
Desk, our open-source help center, runs on ModelRiver. Read its code to see a real integration.
Open and documented
- Source on GitHubThe client SDK, the CLI and Desk
- Client SDK on npmFor React, Vue, Angular and Svelte
- ChangelogEvery release, with its date
- StatusLive uptime and past incidents
Pick what the AI does in your app.
An agent that takes actions, a single model call that just answers, or a workflow your backend steps into. ModelRiver runs it and logs every step.
Looks things up and makes changes in your app through endpoints you choose. It asks the customer before it changes anything.
- For example
- Accounts payable: someone asks the agent to find an invoice or pay it, and it does once they approve.
- You provide
- The endpoints it may call, for example to find or pay an invoice.
- ModelRiver handles
- Running the model and your tools round by round, switching to a backup model if a provider fails, and stopping at the limits you set.
Your app sends one request and gets the answer back. No tools and no backend steps: the model answers from your instructions and what you send. It can remember the conversation too.
- For example
- Draft a reply to a support ticket, summarize a long thread, tag reviews, or answer questions in a help chat.
- You provide
- Instructions for the AI, the models to use, and any data the answer needs, sent with the request.
- ModelRiver handles
- Conversation memory, showing the answer as it is written, and switching to a backup model if one fails.
Runs an AI task in steps. Your backend adds data or checks rules in between, and the result goes to your app.
- For example
- Refund requests: the AI reads the request, your system checks the order, then the AI decides.
- You provide
- One webhook that adds your data and sends it back.
- ModelRiver handles
- Running each step in order, waiting for your backend, and delivering the result.
1Model picks a tool
- find_invoice
2Your endpoint answers
- Result
3Model answers
- Answer sent to your app
One infrastructure. Different AI applications.
AI starts, your backend adds data and rules, AI finishes.
Start from a working template.
Import a ready backend pipeline, run it on sample data, then make it yours.
Customer support
Refund request triage
Classifies a refund request, then decides eligibility and amount, with your backend in between.
Sales
Lead qualification
Scores inbound leads, spots the ready-to-buy ones, and drafts a personal follow-up.
HR & hiring
Job application screening
Screens applications, scores the fit, and drafts the next-step email.
What you don't have to build
Your keys, your backend, your frontend. ModelRiver runs the part in between.
Any model, with backups
Every major provider, on your own keys. A backup model takes over when one fails, and JSON schema checks keep replies in shape.
Ready for production
Test without provider keys, cap spend, trace every request, and roll back a change.
Approvals in your own app
The client SDK gives your app each waiting call with its question and the values to approve. Your backend sends the answer, and the call runs once.
Your backend in the loop
Add a step where a signed webhook hands the request to your code. Your code adds what it knows and posts it back, and the workflow carries on.
Frequently asked questions
What is ModelRiver?
A hosted service for adding an AI agent to an app you already have. You choose the model and the endpoints the agent may call. ModelRiver runs the conversation, calls your endpoints round by round, asks the customer before anything changes, and logs every step.
How does the agent get to my data?
Only through endpoints you list. ModelRiver never connects to your database. Each call to your endpoint is signed, so you can check it came from ModelRiver, and your endpoint decides what that user may see. Only the fields it returns are kept in your request logs. Security for hosted tools.
Can it change something without asking?
No. Each tool is marked as one that reads data or one that changes something. A tool that changes something runs only after the customer approves that exact call, once, and there is no setting to skip the question. Every request also stops at the round, tool call and time limits you set. How approvals work.
Why not build the agent with the OpenAI or Anthropic SDK?
You can, but the SDK makes one model call. Around it you would build the tool loop and its limits, customer approvals, streaming to your frontend, conversation memory, failover when a provider goes down, and logs you can trace. ModelRiver runs all of that on your own provider keys. Our own core, before agents, took 84 engineer-days to build. How we measured.
How is this different from an AI gateway?
A gateway routes each model call to a provider. ModelRiver does that too, with failover to backup models, but it also runs what happens between calls: the agent's tool rounds, customer approvals, your backend steps, and live progress to your frontend.
What if a feature doesn't need an agent?
Use one of the other two modes. Just answer is a single model call for drafting a reply or summarizing a document, with session memory when you want a conversation. A backend pipeline hands the request to your code with a signed webhook at the steps you choose, then carries on when you post back. All three use the same keys, failover and logs.
Which providers and models are supported?
ModelRiver supports 13 AI providers, 146 models in total, including OpenAI, Anthropic, Google, xAI, Mistral AI, Azure OpenAI, and Amazon Bedrock. You connect your own API keys and can add backup models in case one fails. See the full list.
What does it cost?
Every feature is on every plan, agents included. Free includes 25,000 requests a month, and Pro is $49 a month for 500,000. Each model round of an agent counts as one request, and the tool calls between rounds are free. You pay AI providers directly with your own keys. See pricing.
Build your first agent.
Free plan with 25,000 requests a month. No credit card.