Pinter
ENID
Agents
View as Markdown

Create New AI Agent

POST/api/agents/

Overview

Creates a new AI Agent with custom system prompt instructions, foundational model assignment, tool bindings, and personalization policies.

Authentication & Headers

  • Auth: Bearer Token (Role Level 1 or 2)
  • Required Header: API-Version: 1

Parameters & Request Body Fields

  • name (string, required): Display title of the AI Agent.
  • description (string, optional): Summary of the agent's capabilities and business domain.
  • system_instruction (string, required): The core system prompt that dictates the agent's persona and reasoning logic.
  • model_id (string, required): Unique ID of the backed LLM model (e.g. mdl_gpt4o_enterprise).
  • temperature (number, optional, default: 0.2): Sampling temperature between 0.0 (deterministic) and 1.0 (creative).
  • allow_personalization (boolean, optional, default: true): Whether interactive users' preferences can customize responses.
  • tool_ids (array of strings, optional): List of external tool IDs attached to this agent.

Request body

application/json

namestringrequired
descriptionstring | null
avatar_urlstring | null
model_idstring | null
identitystring | null
missionstring | null
methodologystring | null
boundariesstring | null
examplesstring | null
toolsobject[]
sub_agentsobject[]
output_keystring | null
output_schemaobject | null
input_schemaobject | null
generate_content_configobject
disallow_transfer_to_parentboolean
disallow_transfer_to_peersboolean
plannerobject | null
orchestration_typestring
orchestration_configobject
canvas_positionobject | null
canvas_connectionsobject | null
allow_personalizationboolean
is_publicboolean
is_templateboolean
is_sub_agentboolean
role_group_idstring | null
{
  "name": "string",
  "description": "string",
  "avatar_url": "string",
  "model_id": "string",
  "identity": "string",
  "mission": "string",
  "methodology": "string",
  "boundaries": "string",
  "examples": "string",
  "tools": [
    null
  ],
  "sub_agents": [
    null
  ],
  "output_key": "string",
  "output_schema": {},
  "input_schema": {},
  "generate_content_config": {},
  "disallow_transfer_to_parent": false,
  "disallow_transfer_to_peers": false,
  "planner": {},
  "orchestration_type": "agent",
  "orchestration_config": {},
  "canvas_position": {},
  "canvas_connections": {},
  "allow_personalization": true,
  "is_public": false,
  "is_template": false,
  "is_sub_agent": false,
  "role_group_id": "string"
}

Responses

201 Agent successfully created in draft state

400 Bad Request - The request parameters or headers are invalid (e.g. unsupported API-Version).

401 Unauthorized - Missing, invalid, or expired JWT Bearer token.

403 Forbidden - Insufficient role permissions or resource access denied by RBAC policy.

404 Not Found - The requested resource ID was not found.

422 Validation Error

detailobject[]
detail[].locstring | integer[]required
detail[].msgstringrequired
detail[].typestringrequired
detail[].inputobject
detail[].ctxobject
{
  "detail": [
    {
      "loc": [
        null
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}

Example

curl -X POST "$PINTER_URL/api/agents/" \
  -H "Authorization: Bearer $ACCESS_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{"name":"string","description":"string","avatar_url":"string","model_id":"string","identity":"string","mission":"string","methodology":"string","boundaries":"string","examples":"string","tools":[null],"sub_agents":[null],"output_key":"string","output_schema":{},"input_schema":{},"generate_content_config":{},"disallow_transfer_to_parent":false,"disallow_transfer_to_peers":false,"planner":{},"orchestration_type":"agent","orchestration_config":{},"canvas_position":{},"canvas_connections":{},"allow_personalization":true,"is_public":false,"is_template":false,"is_sub_agent":false,"role_group_id":"string"}'