Agent

Agent
Agent

Agent.

Note, while this is based on OpenAI's Assistant API, the terms assistant and agent are not identical.

ref: https://platform.openai.com/docs/api-reference/assistants/object

JSON Example
{
    "name": "string",
    "description": "string",
    "instructions": "string",
    "session_max_ttl": 0,
    "completion_role": "string",
    "tools": [
        {
            "link_type": "string",
            "tool_id": "string"
        }
    ],
    "index_id": "string",
    "index_top_n": 0,
    "index_similarity_cutoff": "number",
    "index_reference_format": "string",
    "index_reference_delimiter": "string",
    "session_max_length": 0,
    "session_summarization_strategy": "string",
    "metadata": {
        "metadata": "string"
    },
    "id": "string",
    "object": "string",
    "created_at": 0,
    "model": "string",
    "agent_type": "string",
    "status": "string",
    "status_errors": [
        "string"
    ],
    "chat_system_instruction_mode": "string"
}
string
name
Optional
Constraints: maxLength: 256

Name of the agent.

string
description
Optional

Description of the agent.

string
instructions
Optional
Constraints: maxLength: 32768

System instructions used by the agent.

integer
session_max_ttl
Optional
Constraints: exclusiveMinimum: 0

Agent sessions that have not been written to within this many seconds are subject to deletion.

string
completion_role
Optional
Constraints: default: assistant

Response role for completions created by the agent. Any value other than the default "assistant" is silently ignored.

array of tools
tools
Optional

A list of tools to be used by the agent.

string As uuid As uuid
index_id
Optional

Data Indexing and Retrieval index to be used by the agent. Direct linking to an index is subject to removal in the future. Use tools instead.

integer
index_top_n
Optional
Constraints: exclusiveMinimum: 0

Top N chunks the agent should request from Data Indexing and Retrieval when fetching context from the index. Direct use of this property is subject to removal from agent requests and responses in the future. Use tools instead.

number
index_similarity_cutoff
Optional

Chunk similarity the agent should request from Data Indexing and Retrieval when fetching context from the index. Direct use of this property is subject to removal from agent requests and responses in the future. Use tools instead.

string
index_reference_format
Optional

Format in which index text references are returned by the agent.

Enumeration: structured, markdown
string
index_reference_delimiter
Optional
Constraints: default: \n

Delimiter string to separate the agent completions response from the index references.

integer
session_max_length
Required  
Constraints: exclusiveMinimum: 0

Sessions that exceed this length (in characters) will get summarized before new data is added. This value must be small enough to fit into the context window of the LLM used by this assistant (including any additional prompts sent to the LLM).

string
session_summarization_strategy
Required  

Strategy for summarizing an agent session once it exceeds the configured maximum session length. delete_oldest evicts the oldest verbatim turns (FIFO).

object
metadata
Optional
Constraints: default: [object Object]

Set of up to 16 key-value pairs attached to this agent. To delete a key from the agent metadata, set its value to null.

string As uuid As uuid
id
Required  

ID of the agent.

string
object
Optional
Constraints: default: agent

Object type, which is always agent.

integer
created_at
Required  

Unix timestamp (in seconds) when the agent was created.

string
model
Required  
Constraints: maxLength: 128

ID of the model to be used by the agent for generating completions.

string
agent_type
Optional
Constraints: default: STANDALONE_AGENT

Runtime type of the agent.

status
Required  

Availability status of an agent.

Enumeration: AVAILABLE, ERROR
array of ErrorCode
status_errors
Optional

Details of the agent error status, if the agent is not available.

string
chat_system_instruction_mode
Optional
Constraints: default: system-message

Agent setting that decides how system instructions are sent to the LLM when generating completions. For LLMs supporting "system messages", this is the most robust choice, but not all LLMs support this type of instructions.

Enumeration: system-message, prompt-prefix