Skip to content
Docs
GitHub

Revise an agent draft with the agent builder

Preview

Revise an agent draft from a conversation with the agent builder. Returns the draft only; nothing is created.

Public APIEverruns Cloud and self-hosted Platform

POST/v1/agents/draft

See authentication for credentials and permissions.

Responses

200Success

Success

Media typeapplication/json
object
draft
required

The agent the builder is shaping. Nothing is created from it until the user confirms.

object
capabilities

Capability ids to attach.

Array<string>
channels

Channel kinds to create as drafts: public_chat, ag_ui, webhook, slack.

Array<string>
description
string
display_name
string
github_trigger
One of:

GitHub events that start the agent.

object
branches

CI events only: branches to accept, e.g. main; empty means every branch.

Array<string>
changes_only

Run only when a CI outcome differs from the previous one for the same repository and branch.

boolean
events

Events from the builder’s fixed list, e.g. workflow_run.completed.

Array<string>
message

Message the agent receives for each event.

string
repositories

owner/name repositories; empty means every repository the App sees.

Array<string>
workflows

CI events only: workflow (or check suite app) names to accept, e.g. CI; empty means every workflow.

Array<string>
mcp_servers

Org catalog MCP servers to attach.

Array<object>

A catalog MCP server to attach.

object
acts_as
required

Whose grant the attachment uses, set from the preset’s auth.

string
name
required

Catalog preset name.

string
model_id

Model to pin, set only when the org default has no working key.

string | null
name

Addressable name (lowercase slug).

string
schedule
One of:

When the agent wakes itself.

object
cron
required

Five-field cron expression (minute hour day month weekday).

string
message
required

Message the agent receives on each scheduled run.

string
timezone
string
system_prompt
string
reply
required

The builder’s answer to the last message.

string
suggestions
required

Short follow-ups the user can send next.

Array<string>

Example

{
"draft": {
"mcp_servers": [
{
"acts_as": "service"
}
]
}
}