Skip to content

Reference

lg_agents_create: Create an agent

Markdown version

Create an agent as a draft, from a template or a spec. Nothing runs until it's published (lg_agents_publish).

  • Changes data: yes
  • Credential scope: agents:write (an API key's scopes, or what you allowed when connecting with OAuth)
  • Assistant level: an assistant at Read and draft or above

Inputs

FieldTypeRequiredNotes
bodyobject (name, title, job_description, manager_user_id, template_key, template_version, spec)no
body.namestringno
body.titlestringno
body.job_descriptionstringno
body.manager_user_idstringno
body.template_keystringno
body.template_versionintegerno
body.specobjectno

Example MCP call

A tools/call request to https://manage.restolayer.com/mcp:

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "lg_agents_create",
    "arguments": {
      "body": {
        "name": "Brand voice",
        "template_key": "voice-brief"
      }
    }
  }
}

Example REST call

The same thing over REST (POST /v1/agents):

curl -s -X POST "https://manage.restolayer.com/v1/agents" \
  -H "Authorization: Bearer $LG_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"name":"Brand voice","template_key":"voice-brief"}'

All tools: MCP tools. Connecting: connect your assistant.

Send feedback

Tell us what's broken, confusing or missing on this page, or an idea. It goes to the team that builds the product.
Please don't include passwords or card numbers.
Only to reply about this. Never added to any mailing list.