Skip to main content
The Agents API allows you to register agents with Vijil, manage their configurations, and associate them with evaluations and Dome guardrails.

Actions

ActionDescription
ListAgentsList all registered agents
CreateAgentRegister a new agent
GetAgentGet details for a specific agent
UpdateAgentUpdate an agent’s configuration
DeleteAgentDelete a registered agent

ListAgents

Returns a list of all agents registered to your account.

Request Syntax

GET /v1/agents HTTP/1.1
Authorization: Bearer {api_key}

Query Parameters

ParameterTypeRequiredDescription
include_archivedBooleanNoInclude archived agents. Default: false.

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "data": [
    {
      "id": "string",
      "name": "string",
      "hub": "string",
      "model_name": "string",
      "status": "string",
      "trust_score": number,
      "created_at": "string"
    }
  ]
}

Response Elements

ElementTypeDescription
dataArrayList of agent objects.
data[].idStringUnique agent identifier. Format: agent-{uuid}.
data[].nameStringAgent display name.
data[].hubStringModel provider. See Supported Hubs.
data[].model_nameStringModel identifier at the provider.
data[].statusStringAgent status: active or archived.
data[].trust_scoreNumberLatest Trust Score (0.0–1.0). Null if not evaluated.
data[].created_atStringISO 8601 timestamp of creation.

Example

Request:
curl -X GET "https://api.vijil.ai/v1/agents" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Response:
{
  "data": [
    {
      "id": "agent-abc123",
      "name": "Customer Support Bot",
      "hub": "openai",
      "model_name": "gpt-4o",
      "status": "active",
      "trust_score": 0.85,
      "created_at": "2024-01-15T10:30:00Z"
    }
  ]
}
Python:
agents = vijil.agents.list(include_archived=False)

CreateAgent

Registers a new agent with Vijil. The agent can then be evaluated and protected with Dome guardrails.

Request Syntax

POST /v1/agents HTTP/1.1
Content-Type: application/json
Authorization: Bearer {api_key}

{
  "agent_name": "string",
  "hub": "string",
  "model_name": "string",
  "api_key_value": "string",
  "api_key_name": "string",
  "agent_system_prompt": "string",
  "model_url": "string",
  "hub_config": {}
}

Request Parameters

ParameterTypeRequiredDescription
agent_nameStringYesDisplay name for the agent. Must be unique within your account.
hubStringYesModel provider. See Supported Hubs.
model_nameStringYesModel identifier (e.g., gpt-4o, claude-3-sonnet).
api_key_valueStringConditionalAPI key for the model provider. Required if api_key_name not provided.
api_key_nameStringConditionalName of a stored API key. Required if api_key_value not provided.
agent_system_promptStringNoSystem prompt to use when evaluating the agent.
model_urlStringConditionalEndpoint URL for custom hub. Required if hub is custom.
hub_configObjectConditionalProvider-specific configuration. Required for bedrock and vertex. See Hub Configuration.

Hub Configuration

For AWS Bedrock:
{
  "region": "us-east-1",
  "access_key": "AKIA...",
  "secret_access_key": "..."
}
For Google Vertex AI:
{
  "project_id": "my-project",
  "location": "us-central1",
  "service_account_json": "..."
}

Response Syntax

HTTP/1.1 201 Created
Content-Type: application/json

{
  "id": "string",
  "name": "string",
  "hub": "string",
  "model_name": "string",
  "status": "string",
  "created_at": "string"
}

Response Elements

ElementTypeDescription
idStringUnique agent identifier. Format: agent-{uuid}.
nameStringAgent display name.
hubStringModel provider.
model_nameStringModel identifier.
statusStringInitial status. Always active for new agents.
created_atStringISO 8601 timestamp of creation.

Errors

ErrorHTTP StatusDescription
InvalidRequestException400Request body is malformed or missing required fields.
InvalidApiKeyException401Vijil API key is invalid or expired.
AgentAlreadyExistsException409An agent with this name already exists.
InvalidHubException400The specified hub is not supported.

Example

Request:
curl -X POST "https://api.vijil.ai/v1/agents" \
  -H "Authorization: Bearer $VIJIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "Customer Support Bot",
    "hub": "openai",
    "model_name": "gpt-4o",
    "api_key_value": "sk-...",
    "agent_system_prompt": "You are a helpful customer support agent."
  }'
Response:
{
  "id": "agent-abc123",
  "name": "Customer Support Bot",
  "hub": "openai",
  "model_name": "gpt-4o",
  "status": "active",
  "created_at": "2024-01-15T10:30:00Z"
}
Python:
agent = vijil.agents.create(
    agent_name="Customer Support Bot",
    hub="openai",
    model_name="gpt-4o",
    api_key_value="sk-...",
    agent_system_prompt="You are a helpful customer support agent."
)

GetAgent

Retrieves details for a specific agent.

Request Syntax

GET /v1/agents/{agent_name} HTTP/1.1
Authorization: Bearer {api_key}

URI Parameters

ParameterTypeRequiredDescription
agent_nameStringYesThe agent’s display name.

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "string",
  "name": "string",
  "hub": "string",
  "model_name": "string",
  "status": "string",
  "trust_score": number,
  "agent_system_prompt": "string",
  "created_at": "string",
  "updated_at": "string"
}

Response Elements

ElementTypeDescription
idStringUnique agent identifier.
nameStringAgent display name.
hubStringModel provider.
model_nameStringModel identifier.
statusStringAgent status: active or archived.
trust_scoreNumberLatest Trust Score (0.0–1.0). Null if not evaluated.
agent_system_promptStringSystem prompt. Null if not set.
created_atStringISO 8601 timestamp of creation.
updated_atStringISO 8601 timestamp of last update.

Errors

ErrorHTTP StatusDescription
AgentNotFoundException404Agent does not exist.

Example

Request:
curl -X GET "https://api.vijil.ai/v1/agents/Customer%20Support%20Bot" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Python:
agent = vijil.agents.get(agent_name="Customer Support Bot")

UpdateAgent

Updates an existing agent’s configuration.

Request Syntax

PATCH /v1/agents/{agent_name} HTTP/1.1
Content-Type: application/json
Authorization: Bearer {api_key}

{
  "new_agent_name": "string",
  "agent_system_prompt": "string",
  "api_key_value": "string",
  "api_key_name": "string"
}

URI Parameters

ParameterTypeRequiredDescription
agent_nameStringYesCurrent agent name.

Request Parameters

ParameterTypeRequiredDescription
new_agent_nameStringNoNew display name for the agent.
agent_system_promptStringNoUpdated system prompt.
api_key_valueStringNoNew API key for the model provider.
api_key_nameStringNoName of a stored API key to use.

Response Syntax

HTTP/1.1 200 OK
Content-Type: application/json

{
  "id": "string",
  "name": "string",
  "status": "string",
  "updated_at": "string"
}

Errors

ErrorHTTP StatusDescription
AgentNotFoundException404Agent does not exist.
AgentAlreadyExistsException409An agent with the new name already exists.

Example

Request:
curl -X PATCH "https://api.vijil.ai/v1/agents/Customer%20Support%20Bot" \
  -H "Authorization: Bearer $VIJIL_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "new_agent_name": "Support Bot v2",
    "agent_system_prompt": "You are a helpful and concise support agent."
  }'
Python:
vijil.agents.update(
    agent_name="Customer Support Bot",
    new_agent_name="Support Bot v2",
    agent_system_prompt="You are a helpful and concise support agent."
)

DeleteAgent

Permanently deletes an agent and disassociates it from any evaluations.

Request Syntax

DELETE /v1/agents/{agent_name} HTTP/1.1
Authorization: Bearer {api_key}

URI Parameters

ParameterTypeRequiredDescription
agent_nameStringYesThe agent’s display name.

Response Syntax

HTTP/1.1 204 No Content

Errors

ErrorHTTP StatusDescription
AgentNotFoundException404Agent does not exist.

Example

Request:
curl -X DELETE "https://api.vijil.ai/v1/agents/Customer%20Support%20Bot" \
  -H "Authorization: Bearer $VIJIL_API_KEY"
Python:
vijil.agents.delete(agent_name="Customer Support Bot")

Supported Hubs

HubDescription
openaiOpenAI GPT models (GPT-4, GPT-4o, etc.)
anthropicAnthropic Claude models
bedrockAWS Bedrock foundation models
bedrockAgentsAWS Bedrock Agents
vertexGoogle Vertex AI
digitaloceanDigitalOcean GenAI
customAny OpenAI-compatible endpoint

See Also

Last modified on March 19, 2026