Reference
lg_agents_create: Create an agent
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
| Field | Type | Required | Notes |
|---|---|---|---|
body | object (name, title, job_description, manager_user_id, template_key, template_version, spec) | no | |
body.name | string | no | |
body.title | string | no | |
body.job_description | string | no | |
body.manager_user_id | string | no | |
body.template_key | string | no | |
body.template_version | integer | no | |
body.spec | object | no |
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.