AgentCreateRequest

AgentCreateRequest
AgentCreateRequest

Request to create an agent.

Field names, types, descriptions, and limits are all copied from the OpenAI API. 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/createAssistant and: 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"
    },
    "model": "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. DEPRECATION WARNING: This property is deprecated and is subject to removal from agent requests and responses in the future.

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. DEPRECATION WARNING: Direct linking to an index is deprecated and 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. DEPRECATION WARNING: Direct use of this property is deprecated and 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. DEPRECATION WARNING: Direct use of this property is deprecated and 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.

Possible values are : 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.

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
model
Required
Constraints: maxLength: 128

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

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.

Possible values are : system-message, prompt-prefix,