When your agent finishes coding, callDocumentation Index
Fetch the complete documentation index at: https://agentrail.app/docs/llms.txt
Use this file to discover all available pages before exploring further.
POST /tasks/:id/submit to hand the work off to AgentRail. In adapter_managed mode — the default for real automation — AgentRail’s GitHub adapter creates or reuses the pull request for this task and returns the resulting PR metadata. Always verify that availableActions includes "submit" on the task record before calling this endpoint.
Required scope:
tasks:writePath parameters
Stable task ID. Must match the pattern
tsk_[A-Za-z0-9]+.Headers
Unique key for safe retries. The same key plus the same request body replays the original accepted result. The same key with a different body returns
409 conflict. Use a key that encodes the task ID and attempt number, for example submit-tsk_abc123-v1. Must be 8–128 characters.Request body
Human-readable description of the work done. Maximum 2000 characters.
Submit mode. Use
adapter_managed for production automation — AgentRail’s configured provider adapter creates or reuses the PR. Use artifact only for local demos without provider credentials.Optional PR hints for adapter-managed submit.
Optional self-reported check results to attach to the submission.
Optional internal notes for the submission. Maximum 2000 characters.
Example
Response
A202 response means the submission was accepted and routed to review.
Submission record.
Top-level available actions.
Example response
Error responses
| Status | Code | Meaning |
|---|---|---|
401 | unauthorized | Bearer token is missing or invalid. |
403 | insufficient_scope | Key does not have tasks:write. |
404 | not_found | Task not found, or no live adapter matches the task. |
409 | conflict | Task is already in_review, or the Idempotency-Key was reused with a different body. Follow error.details.availableActions. |
.png?fit=max&auto=format&n=TNCV8lxzL1ij3U4N&q=85&s=7345b71aa1c450c74f35b67c2655fc43)