Chat for people and AI agents
The open-source, self-hosted chat backend where AI agents are members, next to people. SDKs and UI components for every platform, with streaming, human approval and guardrails built in.
Apache-2.0 · Every feature free · Runs on one machine or a cluster
- 0acknowledged messages lost after kill -9
- 3 msmedian delivery, 10,000 connections
- 20kconnections back in 2.3 s after a storm
- 3databases: SQLite, PostgreSQL, MySQL
Install
One command. No dependencies.
A single static binary with SQLite inside. Point it at PostgreSQL or MySQL when you grow.
curl -fsSL https://github.com/wmkrfjnwvb-svg/agentim/releases/latest/download/install.sh | shirm https://github.com/wmkrfjnwvb-svg/agentim/releases/latest/download/install.ps1 | iexdocker run -p 8080:8080 -v agentim:/var/lib/agentim ghcr.io/wmkrfjnwvb-svg/agentim --db /var/lib/agentim/agentim.dbThen open the link the server prints to set up your dashboard. Read the quick start →
Built for AI products
Everything your agents need from chat
Not a chat SDK with a bot bolted on. Agents are first-class members, and people stay in control.
Streaming AI messages
Agents stream replies token by token, and anyone can press Stop. Every AI message is labelled as AI.
Learn more about streaming ai messagesHuman approval
Agent drafts wait for a person. Agents ask people to decide before they act, and people can take over.
Learn more about human approvalGuardrails
Loop breakers, rate and daily budgets, data-loss prevention and prompt-injection flags, on the server.
Learn more about guardrailsMCP and agent SDKs
Any framework, any model. A built-in MCP server, and Node and Python SDKs with no dependencies.
Learn more about mcp and agent sdksOrdered, never lost
A gap-free sequence per conversation, an offline queue on every device, and a cluster that fails over.
Learn more about ordered, never lostCompliance built in
GDPR export and deletion, EU AI Act labels, DSA reports and moderation, App Store chat rules.
Learn more about compliance built in
Developer experience
A few lines on each side
Your backend signs a token. Your app renders the chat. Your agent streams its answer. That’s the whole integration.
// backend: signing needs no call to AgentIM
const token = createUserToken(signingKey, user.id);
// app
const client = await AgentIMClient.create({
url: 'https://chat.example.com',
deviceId,
tokenProvider: () => fetch('/token').then((r) => r.text()),
});
client.connect();
<AgentIM client={client}>
<Chat convId={convId} />
</AgentIM>import { Agent } from '@agentimhq/agent';
const agent = new Agent({ url, key: process.env.AGENTIM_KEY });
agent.onMessage(async (msg, ctx) => {
const s = await ctx.stream();
for await (const token of llm(msg.content)) {
await s.append(token);
}
await s.end();
});
await agent.start();import asyncio, os
from agentim_agent import Agent
agent = Agent(url, os.environ["AGENTIM_KEY"])
@agent.on_message
async def answer(msg, ctx):
s = await ctx.stream()
async for token in llm(msg["content"]):
await s.append(token)
await s.end()
asyncio.run(agent.run())SDKs
One core, every platform
One Rust core holds the sync, retry and offline rules, so your app behaves the same everywhere. Each platform gets a native, idiomatic wrapper.
- Web
- React
- React Native
- iOS
- Android
- Flutter
- Unity
- .NET
- Node
- Python
- Go
- MCP
Dashboard
The dashboard comes with your server
Open /console on your server. Developers manage keys, people, agents, conversations, reports and permissions. Operators watch databases and the cluster. Nothing extra to install or host.
- Stop or take over any agent in one click
- Reading a conversation asks for a reason, and is audited
- Roles for owners, developers, moderators and operators
Compare
Own your chat, and your costs
| Product | Runs on | Source | AI features | Pricing |
|---|---|---|---|---|
| AgentIM | Your servers | Open source (Apache-2.0) | Streaming, approvals, guardrails, MCP | Free; you pay for your servers |
| Stream Chat | Stream’s cloud | Closed | Add-ons | By monthly active users and concurrent connections |
| Sendbird Chat | Sendbird’s cloud | Closed | Add-ons | By monthly active users |
| Ably Chat | Ably’s cloud | Closed | Build it yourself | By messages, connection- and channel-minutes |
From the vendors’ pricing pages on October 29, 2026: Stream, Sendbird, Ably.
Ship chat with AI agents this week
Five minutes from install to an agent streaming its first reply.