Skip to content

Start AI agent runs

Start an AI agent run from a webhook when a chosen event happens.

Start AI agent runs from webhooks

A webhook can start a run in an AI agent service instead of sending a signed request. In the Create webhook dialog, set Destination to Start an AI agent run, pick the service, and paste its credential. Choose the events as usual. Each matching event starts one run, so subscribe only to events the agent should act on.

The credential is write-only. It is stored encrypted, never shown again, and never returned by the API. To change it, choose Replace in the edit dialog. Changing the service needs a new credential. Switching back to a standard webhook deletes the saved credential. These webhooks have no signing secret to store.

The agent receives the event name, the delivery ID, and the same JSON envelope a standard webhook sends, then a line telling it to fetch the current state through Project Feed before acting. Services treat that text as untrusted input, so the agent's own prompt must say to act on it. The agent also needs a way to reach Project Feed: connect the Project Feed MCP server where the service supports MCP, or give the agent an API key for the REST API. Send test starts a real run and counts toward the service's limits. The Webhooks API reference describes the delivery and failure behavior.

Claude Code routine
At claude.ai/code/routines, create a routine with the Project Feed connector. Edit it, choose Add another trigger, pick API, and copy the URL. Generate a token and copy it at once, because it is shown once. Paste it into the Routine token field. URL format: https://api.anthropic.com/v1/claude_code/routines/trig_.../fire. Limits: 30 runs an hour for each routine, shared with Run now, and 100 API runs an hour for the account. Retries: A 429 is retried after the Retry-After delay. A 5xx, a timeout, or a dropped connection after the request was sent is not retried, because Claude has no idempotency key and a retry could start a second run. Check the routine, then retry the delivery through the API. Prompt: Read the event in the routine-fire-payload block, fetch the current resource with the Project Feed tools, and act on it.
ChatGPT workspace agent
Follow OpenAI's guide to triggering workspace agent runs. Publish an API trigger for the agent and copy its URL, which contains an ID starting with agtch_. Create a workspace agent access token for the workspace. Paste it into the Workspace agent access token field. URL format: https://api.chatgpt.com/v1/workspace_agents/agtch_.../trigger. Limits: OpenAI does not publish a limit for triggers. Each run counts toward your workspace's agent usage. Retries: Each request carries the delivery ID as an Idempotency-Key, so OpenAI returns the original run instead of starting another. A 429, a 5xx, a timeout, or a dropped connection is retried after 1 minute, 5 minutes, 30 minutes, and 2 hours with the same key. A 409 means the agent cannot run, and it is not retried. Prompt: Read the event in the trigger input, fetch the current resource with the Project Feed tools, and act on it.
Devin session
Project Feed uses the Devin v3 API. In Devin, create a service user with permission to use sessions and copy its token, which starts with cog_. Older apk_ keys do not work. Copy your organization ID, which starts with org-, into Organization ID. The URL must contain the same organization ID. Paste it into the Devin service user token field. The dialog fills in the URL. Limits: Devin does not publish a limit for session creation. Each session counts toward your Devin usage. Retries: Devin v3 documents no idempotency key, so only a 429 is retried, after the Retry-After delay. A 5xx, a timeout, or a dropped connection after the request was sent is not retried. Check your Devin sessions, then retry the delivery through the API. Prompt: Read the event in this prompt, fetch the current resource with the Project Feed tools, and act on it.
GitHub Copilot cloud agent
Create a fine-grained personal access token with read and write access to Agent tasks on the repository. The repository's owner needs Copilot Business or Enterprise. Set the URL to the agent tasks endpoint for your owner and repository, and set Base branch to the branch the task starts from. Open a pull request is off unless you tick it. Model is optional: leave it empty for automatic selection, or enter a model name GitHub lists for agent tasks, such as claude-sonnet-4.6. Paste it into the GitHub personal access token field. URL format: https://api.github.com/agents/repos/OWNER/REPO/tasks. Limits: GitHub does not publish a limit for agent tasks. Each task counts toward Copilot usage, and the request counts toward GitHub API rate limits. Retries: GitHub documents no idempotency key, so only a 429 is retried, after the Retry-After delay. A 5xx, a timeout, or a dropped connection after the request was sent is not retried. Check the repository's agent tasks, then retry the delivery through the API. Prompt: Read the event in this task, fetch the current resource with the Project Feed tools, and act on it.
Cursor cloud agent
In the Cursor dashboard, open API Keys and create a key. Set Repository URL to the GitHub repository the agent works in, and Branch or ref to the branch it starts from. Project Feed does not ask Cursor to open a pull request. Paste it into the Cursor API key field. The dialog fills in the URL. Limits: Cursor's API overview lists its rate limits. Each run counts toward your Cursor usage. Retries: Project Feed sends no idempotency key to Cursor, so only a 429 is retried, after the Retry-After delay. A 5xx, a timeout, or a dropped connection after the request was sent is not retried. Check your Cursor agents, then retry the delivery through the API. Prompt: Read the event in this prompt, fetch the current resource with the Project Feed tools, and act on it.
Jules session
Create an API key in your Jules settings. Set Source to the connected repository, such as sources/github/owner/repo, and Starting branch to the branch to start from. Leave Source empty for a session without a repository; Starting branch applies only with a source. Paste it into the Jules API key field. The dialog fills in the URL. Limits: Google does not publish a limit for creating sessions. Each session counts toward your Jules usage. Retries: Jules documents no idempotency key, so only a 429 is retried, after the Retry-After delay. A 5xx, a timeout, or a dropped connection after the request was sent is not retried. Check your Jules sessions, then retry the delivery through the API. Prompt: Read the event in this prompt, fetch the current resource with the Project Feed tools, and act on it.

Fix agent run problems

The service rejected the credential
The delivery shows an error such as Claude rejected the routine token. Choose Edit webhook, then Replace, and paste a new credential. Rejected requests are not retried.
A run did not start
A delivery that shows the service did not confirm the run is not retried, because a retry could start a second run. Check the service for the run, then retry the delivery through the API or CLI if it is missing.
Runs stop after a burst of events
The service reached its hourly limit. Deliveries wait for the service's Retry-After time and are retried up to 5 attempts. Subscribe to fewer events so a burst stays under the limit.
The agent ignores the event
The service labels the text as untrusted, so the agent's own prompt must tell it to read the event and act on it. Add that instruction to the prompt, then choose Send test.
The URL is rejected
Each service accepts only its own endpoint. Copy the URL from that service and check it against the format shown in the dialog.
Image preview
100%