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

Source: <https://everruns.com/docs/api/operations/draft_agent/>

POST

/v1/agents/draft

Select code samplecURL (shell:curl)

```js
const url = 'https://app.everruns.com/api/v1/agents/draft';
const options = {method: 'POST'};


try {
  const response = await fetch(url, options);
  const data = await response.json();
  console.log(data);
} catch (error) {
  console.error(error);
}
```

```sh
curl --request POST \
  --url https://app.everruns.com/api/v1/agents/draft
```

* Production APIapp.everruns.com/api/v1/agents/draft

## Responses

### 200

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:

* object

  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>

* null

  null

**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:

* object

  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

* null

  null

**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

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