Skip to main content

Documentation Index

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

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

Agent CRUD

Manage agents inside the workspace bound to your API key.
You do not pass workspaceId or userId in the request. The API key scope is applied automatically.

Common Headers

HeaderRequiredDescription
AuthorizationYesAPI key in Bearer snorbe_... format
Content-TypePOST / PATCH onlyapplication/json

GET /api/v1/agent/

Fetch one agent with full detail.

Response

{
  "id": "clxxx123456",
  "name": "Research Agent",
  "identityMarkdown": "# Identity\nStrong at B2B SaaS market research.",
  "userMarkdown": "The user leads a new business team.",
  "soulMarkdown": "States hypotheses explicitly and separates evidence from opinion.",
  "memoryMarkdown": "- The user often asks for deeper competitor research",
  "isDefault": true,
  "createdAt": "2026-04-19T00:00:00.000Z",
  "updatedAt": "2026-04-19T02:30:00.000Z"
}

POST /api/v1/agent

Create a new agent.

Request Body

{
  "name": "Patent Analyst",
  "identityMarkdown": "# Identity\nHandles patent research",
  "userMarkdown": "",
  "soulMarkdown": "",
  "memoryMarkdown": "",
  "isDefault": false
}

Fields

FieldTypeRequiredDescription
namestringYesAgent name. Max 100 chars
identityMarkdownstringNoSelf-introduction. Max 300 chars
userMarkdownstringNoUser understanding. Max 600 chars
soulMarkdownstringNoPersona / SOUL. Max 800 chars
memoryMarkdownstringNoLong-term memory. Max 2000 chars
isDefaultbooleanNoIf true, makes this agent the workspace default

Default behavior

  • The first agent in a workspace is automatically created as isDefault: true
  • Creating with isDefault: true clears the previous default agent in that workspace

PATCH /api/v1/agent/

Partially update an agent. Only provided fields are changed.

Request Body

{
  "identityMarkdown": "# Identity\nHandles patents and literature research",
  "isDefault": true
}

Notes

  • Sending isDefault: true promotes that agent to the workspace default
  • You cannot directly send isDefault: false for the current default agent. Promote another agent instead

DELETE /api/v1/agent/

Delete an agent. Related AgentRun rows are deleted by cascade.

Default deletion behavior

  • If other agents remain, the most recently updated one becomes the new default
  • If no agents remain, the workspace ends up with no default agent

Response Fields

POST / GET / PATCH / DELETE all return the same agent object.
FieldTypeDescription
idstringAgent ID
namestringAgent name
identityMarkdownstringSelf-introduction
userMarkdownstringUser understanding
soulMarkdownstringPersona / SOUL
memoryMarkdownstringLong-term memory
isDefaultbooleanWhether this agent is the workspace default
createdAtstringCreation timestamp (ISO 8601)
updatedAtstringUpdate timestamp (ISO 8601)

Examples

curl "https://app.snorbe.deskrex.ai/api/v1/agent/clxxx123456" \
  -H "Authorization: Bearer snorbe_your_api_key_here"

curl -X POST "https://app.snorbe.deskrex.ai/api/v1/agent" \
  -H "Authorization: Bearer snorbe_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Patent Analyst",
    "identityMarkdown": "# Identity\nHandles patent research"
  }'

curl -X PATCH "https://app.snorbe.deskrex.ai/api/v1/agent/clxxx123456" \
  -H "Authorization: Bearer snorbe_your_api_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "isDefault": true
  }'

curl -X DELETE "https://app.snorbe.deskrex.ai/api/v1/agent/clxxx123456" \
  -H "Authorization: Bearer snorbe_your_api_key_here"

Error Responses

HTTP StatusCodeDescription
400BAD_REQUESTInvalid input or invalid default-unset attempt
401UNAUTHORIZEDInvalid, expired, or missing API key
404NOT_FOUNDThe agent does not exist inside the API key scope
429TOO_MANY_REQUESTSRate limit exceeded