Skip to main content
POST
/
agents
JavaScript SDK
import { CortiClient, CortiEnvironment } from "@corti/sdk";

const client = new CortiClient({
    environment: CortiEnvironment.Eu,
    auth: {
        clientId: "YOUR_CLIENT_ID",
        clientSecret: "YOUR_CLIENT_SECRET"
    },
    tenantName: "YOUR_TENANT_NAME"
});
await client.agents.create({
    name: "name",
    description: "description"
});
{
  "id": "<string>",
  "name": "<string>",
  "description": "<string>",
  "systemPrompt": "<string>",
  "experts": [
    {
      "id": "<string>",
      "name": "<string>",
      "description": "<string>",
      "systemPrompt": "<string>",
      "mcpServers": [
        {
          "id": "<string>",
          "name": "<string>",
          "url": "<string>",
          "authorizationScope": "<string>",
          "redirectUrl": "<string>"
        }
      ]
    }
  ],
  "mcpServers": [
    {
      "id": "<string>",
      "name": "<string>",
      "url": "<string>",
      "authorizationScope": "<string>",
      "redirectUrl": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://docs.corti.ai/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Headers

Tenant-Name
string
required

Identifies a distinct entity within Corti's multi-tenant system. Ensures correct routing and authentication of the request.

Example:

"base"

Query Parameters

ephemeral
boolean
default:false

If set to true, the agent will be created as ephemeral, it won't be listed in the agents_list but can still be fetched by ID. Ephemeral agents will be deleted periodically.

Body

application/json
name
string
required

The name of the agent.

description
string
required

A brief description of the agent's capabilities.

agentType
enum<string>

Optional type of agent.

Available options:
expert,
orchestrator,
interviewing-expert
systemPrompt
string

The system prompt that defines the overall agents behavior and expectations. This field is optional as there is a default system orchestrator.

experts
object[]
mcpServers
object[]

A list of MCP servers that the agent can call. If omitted, the agent can't call any MCP servers.

Response

Agent created successfully.

id
string
required

The unique identifier of the agent.

name
string
required

The name of the agent.

description
string
required

A brief description of the agent's capabilities.

systemPrompt
string
required

The system prompt that defines the overall agents behavior and expectations.

experts
object[]
mcpServers
object[]

A list of MCP servers that the agent can call. If omitted, the agent can't call any MCP servers.