camelRun by camelAI · Slack

Build a Slack AI agent

Connect your Slack app from a prefilled manifest link and give every thread its own durable AI agent — with native streaming replies, your tools, persistent memory, and Approve/Deny buttons while waiting runs sleep at $0.

Thread#support
Maya Chen10:41 AM
@Support Agent can you refund order 4471? The customer cancelled before it shipped.
3 replies
Support AgentApp10:41 AM
It hasn't shipped yet, so I'm ready to refund order 4471 in full.Approved by Maya Chen.
Maya Chen10:43 AM
yes
Support AgentApp10:43 AM
Done. Order 4471 is refunded in full.
Reply…

A custom Slack AI bot that uses your own tools

That thread, in the console: every tool call the agent made, executed against HTTPS webhook tools or remote MCP servers your team owns.

run.camelai.com/console/agents/agt_9c41…
Agents
ch_4b1e9c07_1792597267_204611_8a4c1b
Idleazure/gpt-6.1-terra· slack· definition support
  1. can you refund order 4471? The customer cancelled before it shipped.
  2. It hasn't shipped yet, so I'm ready to refund order 4471 in full.

    shop__refund({"orderId":"4471"})
  3. Result of shop__refund
    {"orderId":"4471","amount":86,"status":"refunded"}
    Approved by Maya Chen (channel:slack:U07K3M9QX2)
  4. Done. Order 4471 is refunded in full.

// Your app's HTTPS webhook tool — credentials stay in your server.
export async function POST(req: Request) {
  if (req.headers.get("x-tool-secret") !== process.env.TOOL_SECRET) {
    return new Response("Unauthorized", { status: 401 });
  }
  const { args, origin } = await req.json();
  if (!origin?.from?.verified) return new Response("Forbidden", { status: 403 });
  const runId = req.headers.get("x-camelrun-run");
  const refund = await payments.refund(args.orderId, { actor: origin.from.id, idempotencyKey: runId });
  return Response.json(refund);
}
Tools docs

Verified caller identity and origin. Runtime-authenticated MCP servers receive short-lived Ed25519-signed JWTs carrying sub, act, and the channel origin (including from.verified); webhook tools receive X-CamelRun-Agent, X-CamelRun-Run, your configured headers, and origin in the JSON body.

One AI agent for every Slack thread

By default (scope: "thread"), each @mention opens a Slack thread backed by its own durable agent, and replies stream natively in Slack while unmentioned follow-ups stay in context. Switch scope to chat, user, shared, or a custom key template — and use send_channel_message for proactive or scheduled posts.

support14
Wednesday, October 14th
Jonah Reyes3:05 PM
@Support Agent which Fernhill invoices are still unpaid?
3 replies
Today
Priya Shah9:20 AM
@Support Agent draft a reply for the customer asking about EU shipping times
2 replies
Maya Chen10:41 AM
@Support Agent can you refund order 4471? The customer cancelled before it shipped.
3 replies
Sam Ortiz11:02 AM
@Support Agent what did we refund last week, in total?
2 replies
Message #support
Support AgentApp
Lee Park10:58 AM
has order 4510 shipped yet?
Support AgentApp10:58 AM
Yes, it shipped this morning.
Message Support Agent

A Slack agent that remembers every thread

Ask a follow-up in an old thread and the agent already knows what you were talking about. No one has to paste the context back in.

Asleep for a week. Idle and waiting agents cost $0. Conversation history and CamelFS storage are unmetered right now.

Thread# support
Wednesday, October 14th
Jonah Reyes3:05 PM
@Support Agent which Fernhill invoices are still unpaid?
3 replies
Support AgentApp3:05 PM
Three are open: 1182, 1190 and 1204, $12,480 in all. 1182 is 30 days past due. I saved the breakdown to fernhill-unpaid.csv in the thread workspace.fernhill-unpaid.csvSaved in CamelFS
Asleep
Today
Jonah Reyes11:15 AM
any of those paid yet?
Support AgentApp11:15 AM
Yes, 1190 was paid on Oct 19. 1182 and 1204 are still open, $7,930 between them.
Reply…

Human in the loop

Approve agent actions in Slack

Set requiresApproval: true on a custom tool — or match MCP tools in approvalRequired — and the run parks in input_required at $0. camelRun posts a native Slack Block Kit card with Approve and Deny buttons (text replies like yes or no work too), then edits the card with who answered.

Gate any tool with one field.

requiresApproval: true, // pauses in input_required and posts Approve / Deny buttons in Slack
Support AgentApp10:41 AM

It hasn't shipped yet, so I'm ready to refund order 4471 in full.

Approval needed

Approve the call to shop__refund (shop) with {"orderId":"4471"}

Reply yes or no.

  1. The real call
    camelRun builds the Slack Block Kit card directly from the paused input_required call, never from model prose.
  2. Exact arguments
    Click Approve (or reply yes) and those exact arguments run. Click Deny (or reply no) and it never runs.
  3. Buttons or text
    yes · y · approve · ok · allowno · n · deny · reject · stop · cancelTap a button or reply in thread — camelRun edits the card with who answered.

Only authorized approvers can say yes

Only the person who started the turn, the paired channel owner, or someone listed in access.approvers can answer; anyone else's tap is refused. Every decision flows through the same path as POST /v2/agents/:key/inputs/:inputId.

Clarifying questions with ask_human

Enable the human built-in and the agent can call ask_human to pause for a person's answer. Choices render as Slack buttons, or anyone authorized can reply in the thread.

Support AgentWhich warehouse should ship the replacement: Dallas or Rotterdam?
Support AgentRotterdam it is. I'll set up the replacement from there.

Setup

Connect Slack in four steps

Create a Slack channel in the console (+ New channel → Slack) or via POST /v2/channels. Open the prefilled installUrl manifest, PATCH your bot token and signing secret, and DM pair <code>.

Create a Slack channel
run.camelai.com/console/channels
New channel

Create the channel without credentials first — camelRun generates a prefilled Slack manifest link.

Kind
Slack
Definition
support
Access
Owner (only me)owner · allowlist · workspace · anyone
Prefilled manifest (installUrl)
Create the Slack appPOST /v2/channels {"kind":"slack","definition":"support","access":{"mode":"owner"}}
Create & install from manifest
api.slack.com/appsSupport AgentAcme
Create app from manifest
Events & Interactivity Request URL
https://run.camelai.com/v2/channels/ch_4b1e9c07a2d35f8e6b10/inboundPrefilled & Verified
Prefilled bot events
app_mentionmessage.immessage.channelsmessage.groups
Prefilled bot scopes
app_mentions:readchat:writeassistant:writefiles:readfiles:write+6 more
After installing in Slack
api.slack.com/appsSupport AgentAcme
OAuth & Basic Information
Bot User OAuth Token
xoxb-•••••••4e9a Copy
Signing Secret
••••••••3c2e Copy

Both values are sealed with the vault key. The bot token is only sent to slack.com and files.slack.com.

Connect & get pairing code
run.camelai.com/console/channels
Connect Support Slack
Bot token (xoxb-…)
••••••••••••••••••
Signing secret
••••••••••••••••••
Pairing code (PATCH /v2/channels/:id)
pair 7k4m9x2pDM the bot this code to pair as owner, or set access.mode: "workspace".
Pair in a DM, test privately, then mention it

DM the bot pair 7k4m9x2p to claim ownership, run a private dry test with POST /v2/channels/:id/test, and inspect 14 days of delivery outcomes at GET /v2/channels/:id/events before inviting the app to #support. Read the channel docs for scopes, rate limits, and every endpoint.

Slack AI agent questions

How do I build a Slack AI agent?

Add a Slack channel in the camelRun console or call POST /v2/channels with kind: "slack", your definition slug, and an access policy. Open the returned installUrl to create and install your Slack app from a ready-made manifest, save its xoxb- token and signing secret via PATCH, and send pair <code> in a DM to register as owner.

How does camelRun connect to Slack and stream replies?

Slack sends events and button clicks to /v2/channels/:id/inbound. camelRun checks Slack's v0 signature on the raw body within a 5-minute window, deduplicates deliveries for 7 days, and acknowledges right away so Slack's 3-second timeout is never hit. Replies stream natively with assistant.threads.setStatus and chat.startStream, while sealed bot tokens go only to slack.com and files.slack.com.

Does each Slack thread keep its own memory?

Yes. By default (scope: "thread"), every Slack thread and DM maps to its own deterministic agent with conversation history and CamelFS files, including attachments shared in Slack. Other scopes let one agent span a channel (chat), a sender (user), the whole channel (shared), or a keyTemplate, and agents can post updates on a schedule via send_channel_message.

Can a Slack agent call my company's tools?

Yes. Connect remote MCP servers with auth: runtime to receive short-lived Ed25519-signed JWTs carrying the agent subject, run actor, and channel origin (including from.verified). HTTPS webhook tools get X-CamelRun-Agent, X-CamelRun-Run, your custom headers, and an origin payload field identifying the verified Slack sender.

How do tool approvals work for Slack agents?

Flag any tool as needing approval with requiresApproval or list tool patterns in approvalRequired. When invoked, the agent pauses without billing active time and posts Slack Block Kit Approve / Deny buttons — teammates can also answer by replying yes or no. Only the requester, owner, or access.approvers may decide, and the posted card updates with who answered.

Can a Slack agent run code, edit files, and be tested privately?

Yes. Enable the files and bash built-ins for a versioned CamelFS workspace and an on-demand Linux container (Node 24, Python 3, git, ripgrep) billed only while commands run. Before inviting teammates, send a private dry run to /v2/channels/:id/test and review 14 days of delivery statuses (without message bodies) through /v2/channels/:id/events.

Which AI models can a Slack agent use?

Any model in camelRun's catalog or OpenRouter, set in your definition slug. Model tokens cost $0 from camelRun on your own provider keys, or direct provider pass-through pricing on platform credits.

How much does a Slack AI agent cost to run?

Active agent time is $0.05 per active agent-hour, and active Linux containers are $0.00005 per second ($0.18/hr) with free pre-warming. Idle, parked, and waiting threads cost $0, and storage is unmetered right now.

Put an AI agent in
every Slack thread

$0.05 per active agent-hour while an agent runs. You pay $0 for idle, parked, or waiting threads, and storage is currently unmetered.

Connect your coding agent (no key)

claude mcp add --transport http camelrun https://run.camelai.com/mcp

Adds camelRun's hosted MCP server to Claude Code (also works with Codex and ChatGPT). Signing in creates your account automatically.