Skip to main content
Creating an agent registers an AI system with OTAS under a specific project and automatically generates the initial AgentKey used to authenticate sessions. The full API key is included in this response — it is never retrievable again after creation, so store it immediately in a secrets manager or environment variable.
Only users with Admin privilege (privilege=1) on the project can create agents.

Endpoint

Base URL: http://localhost:8000

Request headers

string
required
JWT obtained from the OTAS login endpoint, identifying the calling user.
string
required
UUID of the project in which the agent will be created.

Request body

string
required
Display name for the agent. Whitespace is trimmed before storage.
string
Optional human-readable description of what the agent does.
string
required
LLM provider for this agent, e.g. "Anthropic" or "OpenAI".

Response

number
1 on success.
string
"agent_created" on success.
object
The full api_key value is returned only in this response. The plaintext key is never stored by OTAS and cannot be retrieved later. Save it to a secrets manager or environment variable immediately.

Example

cURL
Response (201)

Errors