/api/v1/agentsCreate a new agent run
Queue a new AI agent to execute a task on your GitHub repository.
Request Body
repostringGitHub repository in format: owner/repo. If not specified, uses your default repository.
promptstringrequiredThe instruction/task for the AI agent to execute
modelstringAI model to use. If not specified, uses your default model. Model validation is performed by OpenCode.
providerstringAI provider. If not specified, uses your default provider.
branchstringGit branch to use (defaults to repo's default branch)
webhook_urlstringURL to receive webhook notifications when the run completes
mode"execute" | "plan"Run mode: 'execute' runs the agent normally, 'plan' returns a plan without making changes
auto_create_prbooleanIf true, automatically create a GitHub PR with the agent's changes after completion
Responses
idstringrequiredUnique identifier for the agent run
status"queued"requiredInitial status of a new run
messagestringrequiredSuccess message
Errors(3)
errorstringrequiredError type
messagestringrequiredDetailed error message
errorstringrequiredError type
messagestringrequiredDetailed error message
errorstringrequiredError type
messagestringrequiredDetailed error message