Skip to main content
POST
/
agents
JavaScript
import Cerca from '@cerca-dev/sdk';

const client = new Cerca({
  apiKey: process.env['CERCA_API_KEY'], // This is the default and can be omitted
});

const agent = await client.agents.create();

console.log(agent.id);
{
  "configuration": {
    "approvals": {
      "tools": {},
      "timeoutMs": 123
    },
    "defaultModel": "<string>",
    "instructions": "<string>",
    "tools": [
      "<string>"
    ]
  },
  "createdAt": "<string>",
  "fleetId": "<string>",
  "executionPrincipal": {
    "userId": "<string>"
  },
  "id": "<string>",
  "metadata": {
    "project": "alpha"
  },
  "orgId": "<string>",
  "updatedAt": "<string>",
  "userId": "<string>",
  "effective": {
    "approvals": {
      "tools": {},
      "timeoutMs": 123
    },
    "approvalsWritableByAgent": true,
    "defaultModel": "<string>",
    "lockedByFleet": [],
    "resolvedFromFleet": [],
    "tools": [],
    "instructions": "<string>"
  }
}

Documentation Index

Fetch the complete documentation index at: https://docs.cerca.dev/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.

Body

application/json
configuration
object
fleetId
string
metadata
object

Arbitrary string metadata stored on an agent. Runtime enforces maximum key and value sizes.

Example:
{ "project": "alpha" }
userId
string
{key}
any

Response

Agent created.

configuration
object
required
createdAt
string
required
fleetId
string
required
executionPrincipal
UserExecutionPrincipal · object
required
id
string
required
metadata
object
required

Arbitrary string metadata stored on an agent. Runtime enforces maximum key and value sizes.

Example:
{ "project": "alpha" }
orgId
string
required
updatedAt
string
required
userId
string
required
effective
object