camelRun by camelAI · GitHub

GitHub AI agent for issues and pull requests

camelRun by camelAI is a hosted runtime for AI agents. Connect your own GitHub App, and each pull request and issue gets its own agent that answers in a comment and keeps the whole thread.

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

Give your GitHub AI agent your own tools

Every GitHub agent gets its tools from one definition: your MCP servers and OpenAPI specs. For GitHub, camelRun asks your endpoint for an installation token that lasts an hour, and the model never sees it.

How agent tools work
1{"name": "Triage", "mcpServers": [{
2 "name": "github", "url": "https://mcp.example.com/github",
3 "auth": {"type": "exchange", "url": "https://app.example.com/camelrun/github-token"}
4}]}
Your GitHub MCP server
Its tools reach the agent as github__search_issues, github__list_commits and the rest.
Your token endpoint
camelRun calls it when the agent needs a GitHub token, and again before that one expires.

Pull requests

An AI agent on every pull request

A pull request gets its own agent the moment it opens. The agent reads the description and the diff, answers questions on any line, and looks again when new commits land.

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

    It reads the description and the diff, which comes attached to its prompt.

    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

    Mention it on any line of the diff. It gets the file, the line and that part of the diff.

    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

    A burst of pushes waits 30 seconds for more, then starts one turn on the latest.

    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

    [From GitHub]@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)The pull request's current diff is attached.

    → on the latest, c2b7a90

Memory

An AI agent for GitHub issues that remembers the whole thread

An agent is made the first time a thread needs one and stays with it. Between comments it sleeps. Mention it days later and it has the whole thread.

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/client_3f9c0a8e…

Agents

Agents in your account. Your application creates them with the SDK or POST /v1/agents.

NameStatus

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

key github-…-702114388-2304

Asleepnow

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

key github-…-702114391-874

Asleep2d ago

GitHub: acme/web#2311: Autosave loses the cursor position

key github-…-702114388-2311

Asleep3h ago

Setup

Add an AI agent to your GitHub repos in three steps

It runs as your own GitHub App, so your GitHub bot has your name and avatar on every comment.

Set up acme-triage3 of 3 tasks
  1. Create a GitHub App

    Give it read and write access to issues and pull requests, subscribe it to their events, and generate a private key.

    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

    Private keys

    SHA256:q7Lw2vXf0mKc…Added now
  2. Add it in the console

    Paste its App ID, private key and webhook secret into a new GitHub channel, pick the definition its agents are made from, and let your repository’s members start it.

    run.camelai.com/console/channels

    New GitHub channel

    Each pull request (and issue, if you choose) gets its own agent, which answers with a comment.

    App ID

    •••••••

    Private key

    -----BEGIN RSA PRIVATE KEY-----••••••••••••••••••••••••

    Webhook secret

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

    Start a turn on

    • Pull request opened
    • New commits pushed
    • Comment that @mentions the app
    • Review comment that @mentions the app
    • Issue opened
    • Skip draft pull requests

    Who can start a turn

    Also owners, members, collaborators

    Definition

    Triage
    CancelCreate channel
  3. Paste the webhook URL and install

    Put the channel’s webhook URL and your secret in the app’s General settings, then install it on your repositories.

    Every GitHub channel setting
    github.com/organizations/acme/settings/apps/acme-triage
    GeneralPermissions & eventsInstall App

    Webhook

    Active

    Webhook URL

    https://run.camelai.com/channels/github/ch_8f3a61c0d29e4b7a5f12

    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 add an AI agent to GitHub?

    Create a GitHub App that can read and write issues and pull requests, add it as a GitHub channel in the camelRun console, and choose who can start it. Paste the channel's webhook URL into the app and install it on your repositories. Each pull request then gets its own agent, and so does each new issue if you turn issues on.

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

    Yes. A pull request's agent starts when the pull request opens, reopens or is marked ready, and when new commits land. A comment that mentions the app starts it too, on an issue, a pull request or a line of the diff. It answers with a comment.

  3. Does the GitHub agent use my own tools?

    Yes. Its definition lists your MCP servers and OpenAPI specs, and camelRun calls them for it. Your credentials stay out of the model's reach: a GitHub token comes from your own endpoint and is kept in memory only.

  4. Does each issue keep its own context?

    Yes. Every issue and pull request has its own agent with its own history and files. It sleeps between comments and still has the whole thread when someone mentions it days later.

  5. Who can start the agent?

    Only the people you allow: a list of GitHub logins, or every owner, member and collaborator of the repository. Its own comments never wake it, so it never answers itself.

  6. Which AI model does it use?

    The one you choose in its definition: Claude, GPT, Gemini, an open model or a model server of your own. Use your own provider keys or camelRun's.

  7. How much does a GitHub AI agent cost?

    $0.01 per agent-hour while an agent is in a run, and $0.10 per GB-month of storage. Tokens on your own provider keys cost $0, and on camelRun's you pay the provider's price, no markup on tokens. An agent waiting for the next comment costs only storage.

  8. Can I run my GitHub agent on my own servers?

    Yes. The runtime is open source under the AGPL, and it runs on your own servers with one container and Postgres. You can export every agent's history and files at any time.

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

Close the issue and its agent keeps the thread. Mention it next month and it picks up from there.