camelRun by camelAI · GitHub

GitHub AI agent for issues and pull requests

camelRun by camelAI is a hosted runtime for AI agents. Route signed GitHub webhooks into an HTTP channel or keyed agent so each issue and pull request gets durable memory, a Linux container with git and gh, and remote GitHub MCP tools.

acme/webPrivate

Issues41

Saving a long draft fails with 413 #2304

Openrosa opened this issue 1 minute ago · 1 comment

rosa1 minute ago

Drafts with a few images won’t save. POST /drafts comes back 413.

camelRunThis issue’s agent · asleep · 2 tool calls

acme-triagebotnow

This is the API’s body limit, not the editor. acme/api#871 lowered it from 10 MB to 1 MB on Oct 14, and a draft with a few images goes over that. #2290 hit the same 413 on comments and was fixed by raising the limit for /comments only. /drafts needs the same change.

Tools & containers

Give your GitHub AI agent real tools and a Linux container

Attach the bash built-in (an on-demand Linux container with git, gh, Node 24, Python 3, and ripgrep), HTTPS webhook tools, or remote GitHub MCP servers using runtime auth (short-lived Ed25519 JWTs carrying sub and act).

How agent tools work
1{
2 "model": "azure/gpt-6.1-terra",
3 "instructions": "Triage issues and review PRs concisely.",
4 "builtins": ["files", "bash"],
5 "queue": { "mode": "batch", "windowMs": 30000 },
6 "mcpServers": [{
7 "name": "github",
8 "url": "https://mcp.example.com/github",
9 "auth": { "type": "runtime" }
10 }]
11}
On-demand Linux container
Gives each agent CamelFS files plus bash with git, gh, Node 24, Python 3, and ripgrep ($0.00005/sec while commands run, free pre-warming).
Ed25519 runtime auth for MCP
camelRun signs every remote MCP call with a short-lived Ed25519 JWT (sub + act) so your server never puts raw GitHub tokens in the model context.

Pull requests

An AI agent on every pull request

Route pull request webhooks into a keyed agent per PR. It inspects the diff with git, gh, or remote GitHub MCP tools, answers review follow-ups with full thread context, and batches rapid pushes into one run.

acme/apiPrivate

Pulls4

Raise the body limit for /drafts #874

Open

dana wants to merge 4 commits into main from dana/drafts-limit

Conversation4Files changed2
  1. 1pull_request.opened

    A pull request opens

    Route the webhook to the PR's keyed agent. It inspects the diff via bash (git, gh) or remote GitHub MCP tools and checks related files.

    dana5 minutes ago

    For acme/web#2304. Raises the JSON body limit for /drafts to 10 MB.

    camelRunpull_request.openedThis pull request’s agent · asleep

    github__get_file_contents → commentsRouter.use(json({ limit: "10mb" }))

    acme-triagebot4 minutes ago

    /drafts goes to 10 MB here, but /comments still sets its own limit in src/routes/comments.ts. Two copies of one rule can drift apart again. bodyLimit() in src/server.ts could take both routes.

  2. 2pull_request_review_comment

    Someone asks on a line

    Forward review comments with their file path and diff hunk into the same PR agent, which still holds the earlier review in context.

    mira reviewed 2 minutes ago

    src/server.ts

    4141 app.use("/comments", commentsRouter);
    42-app.use("/drafts", draftsRouter);
    42+app.use("/drafts", json({ limit: "10mb" }), draftsRouter);

    mira 2 minutes ago

    @acme-triage does anything else post to /drafts?

    camelRunpull_request_review_commentThis pull request’s agent · asleep

    github__search_code → src/editor/autosave.ts, the only match

    acme-triagebot1 minute ago

    does anything else post to /drafts?

    Only the editor’s autosave in acme/web (src/editor/autosave.ts).

  3. 3pull_request.synchronize

    New commits land

    Set queue: { mode: "batch", windowMs: 30000 } on the agent so rapid pushes coalesce into one run on the latest head.

    dana added 3 commits 1 minute ago
    Add bodyLimit() for JSON bodies7d03b5f
    Use bodyLimit() on /drafts and /commentse98f214
    Drop the override in comments.tsc2b7a90

    camelRunpull_request.synchronize

    Event: pull_request.synchronize@dana pushed new commits to pull request acme/api#874: Raise the body limit for /draftshttps://github.com/acme/api/pull/874Head is now c2b7a90d41e8 (was e98f2143a7c0).Base: main ← head: dana/drafts-limit (c2b7a90d41e8)Batched via queue: { mode: "batch", windowMs: 30000 }.

    → on the latest, c2b7a90

Memory

An AI agent for GitHub issues that remembers the whole thread

Upsert one keyed agent per issue or pull request (gh-acme-web-2304) and let it sleep at $0 between webhooks. Route a comment days later to the same key and it wakes with the entire thread and CamelFS workspace intact.

Saving a long draft fails with 413 #2304

Openacme/web

rosaon Oct 15

Drafts with a few images won’t save. POST /drafts comes back 413.

acme-triageboton Oct 15

This is the API’s body limit, not the editor. acme/api#871 lowered it from 10 MB to 1 MB on Oct 14, and a draft with a few images goes over that. #2290 hit the same 413 on comments and was fixed by raising the limit for /comments only. /drafts needs the same change.

4 daysAsleep the whole time
dana self-assigned this on Oct 16
dana mentioned this issue on Oct 16Raise the body limit for /draftsacme/api#874Merged

kofinow

@acme-triage where does this stand?

camelRunissue_commentthe same agent · asleep

  1. github__search_issues

    {"query": "2304 repo:acme/api is:pr"}

    → #874 Raise the body limit for /drafts · merged Oct 17

  2. github__list_commits

    {"owner": "acme", "repo": "api"}

    → e98f214 Use bodyLimit() on /drafts and /comments

acme-triagebotnow

It’s fixed. acme/api#874 merged on Oct 17 and put /drafts and /comments on one 10 MB limit, so drafts with images save again. This can be closed.

run.camelai.com/console/agents/agt_3f9c0a8e51d…

Agents

Agents in your account. Upsert them with PUT /v2/agents/:key or route signed GitHub webhooks through an HTTP channel.

NameStatus

acme/web#2304: Saving a long draft fails with 413

key gh-…-web-2304

Asleepnow

acme/api#874: Raise the body limit for /drafts

key gh-…-api-874

Asleep2d ago

acme/web#2311: Autosave loses the cursor position

key gh-…-web-2311

Asleep3h ago

Setup via HTTP channel

Wire GitHub webhooks into camelRun v2 in three steps

camelRun v2 retired its native GitHub App channel in favor of signed HTTP channels and keyed agents. Keep your GitHub App credentials on your own server, verify X-Hub-Signature-256 at /v2/channels/:id/inbound, and give every issue or PR its own durable agent.

Set up acme-triage3 of 3 tasks
  1. Configure your GitHub webhook

    In your GitHub App or repository settings, pick the issue and pull request events to send and create a shared webhook secret. Your GitHub private key stays on your own server.

    github.com/organizations/acme/settings/apps/acme-triage
    GeneralPermissions & eventsInstall App

    Repository permissions

    • ContentsRead-only
    • IssuesRead and write
    • MetadataRead-only
    • Pull requestsRead and write

    Subscribe to events

    • Issue comment
    • Issues
    • Pull request
    • Pull request review comment
    github.com/organizations/acme/settings/apps/acme-triage
    GeneralPermissions & eventsInstall App

    Webhook secret

    whsec_••••••••9f2aShared HMAC
  2. Create an HTTP channel and definition

    Save a slug-keyed definition with bash and/or remote GitHub MCP, then create an HTTP channel configured for X-Hub-Signature-256.

    run.camelai.com/console/channels

    New HTTP channel

    Verify X-Hub-Signature-256 on inbound GitHub webhooks at /v2/channels/:id/inbound and route into durable agents.

    Kind

    HTTP

    Name

    GitHub triage

    HMAC signing secret

    ••••••••••••••••

    webhookSettings (POST /v2/channels)

    • signatureHeader: X-Hub-Signature-256
    • signaturePrefix: sha256=
    • idHeader: X-GitHub-Delivery (7d dedupe)
    • wrap raw payload as untrusted JSON

    Outbound reply URL (optional)

    https://app.example.com/github/comment

    Definition

    triage
    CancelCreate channel
  3. Point GitHub at /v2/channels/:id/inbound

    Paste the channel's inbound URL (or your thin per-PR router calling PUT /v2/agents/gh-<repo>-<n>) and secret into GitHub, then install on your repositories.

    HTTP channel & webhook docs
    github.com/organizations/acme/settings/apps/acme-triage
    GeneralPermissions & eventsInstall App

    Webhook

    Active

    Webhook URL

    https://run.camelai.com/v2/channels/ch_8f3a61c0d29e4b7a5f12/inbound

    Secret

    ••••••••••••••••
    github.com/apps/acme-triage/installations/new

    Install acme-triage

    Only select repositories

    • acme/web
    • acme/api
    CancelInstall

FAQ

Questions about GitHub AI agents

  1. How do I connect an AI agent to GitHub on camelRun v2?

    Create a signed HTTP channel with POST /v2/channels and configure X-Hub-Signature-256 and X-GitHub-Delivery. You can also relay webhooks through a handler that upserts each issue or pull request's agent with PUT /v2/agents/gh-<repo>-<number>.

  2. Can an AI agent triage GitHub issues and review pull requests?

    Yes. Route issue, pull request, and comment webhooks to an agent per issue or PR. Enable bash for git and gh, or connect remote GitHub tools. Queue batching groups rapid pushes into one run.

  3. How does a GitHub agent access private repositories and my tools?

    Use MCP servers with runtime auth and verify the signed JWTs against /v2/.well-known/jwks.json. HTTPS webhook tools receive agent and run IDs plus your configured headers. Keep your GitHub App private key on your backend.

  4. Does each issue and pull request keep its own context?

    Yes. A keyed agent keeps history and CamelFS files for its issue or pull request. It sleeps at $0 between webhooks and wakes on the next event.

  5. Can a GitHub agent run git, gh, and tests in a real container?

    Yes. Enable files for a versioned CamelFS workspace and bash for a Linux container with git, gh, Node 24, Python 3, and ripgrep. Pre-warming is free and billing is per active second.

  6. Which AI models can a GitHub agent use?

    Choose a model from camelRun's catalog or OpenRouter in your definition. Use your own provider keys or pay the provider's token price on platform credits.

  7. How much does a GitHub AI agent cost to run?

    Agents cost $0.05 per active hour. Active Linux containers cost $0.00005/sec ($0.18/hr), with free pre-warming. Idle, parked, and waiting agents cost $0. Storage is unmetered.

  8. Can I self-host camelRun for my GitHub workflows?

    Yes. Deploy the AGPL runtime in your Cloudflare account with Workers, Durable Objects, and R2. The GitHub relay or MCP server runs on your own servers. Read agent history and CamelFS files via the v2 API.

Saving a long draft fails with 413 #2304Closed

rosa closed this as completed now

This issue’s agentasleep, keeping the thread

Build your GitHub bot with AI

Keep each issue and pull request's durable memory, CamelFS workspace, and Linux container ready whenever a webhook arrives. $0.05 per active agent-hour, $0 while idle, and unmetered storage right now.