Create Assistant
This method allows you to create a new agent. The agent requires an LLM to be used for generating completions, so you need to make sure the corresponding Model Endpoint has been deployed in the same namespace as this PAIS instance. You can use the List Models method to view all available LLMs.
An agent can also be configured to use an index to enhance the context that is sent to the LLM. You can use the List indexes across all knowledge bases method to view all available knowledge base indexes that you can use.
Show optional properties
{
"session_max_length": 0,
"session_summarization_strategy": "string",
"model": "string"
}
{
"name": "string",
"description": "string",
"instructions": "string",
"session_max_ttl": 0,
"completion_role": "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"
}
Name of the agent.
Description of the agent.
System instructions used by the agent.
Agent sessions that have not been written to within this many seconds are subject to deletion.
Response role for completions created by the agent.
Data Indexing and Retrieval index to be used by the agent.
Top N chunks the agent should request from Data Indexing and Retrieval when fetching context from the index.
Chunk similarity the agent should request from Data Indexing and Retrieval when fetching context from the index.
Format in which index text references are returned by the agent.
Delimiter string to separate the agent completions response from the index references.
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).
Strategy for summarizing an agent session once it exceeds the configured maximum session length.
Set of up to 16 key-value pairs attached to this agent.
ID of the model to be used by the agent for generating completions.
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.
Successful Response
"Agent Object"
Name of the agent.
Description of the agent.
System instructions used by the agent.
Agent sessions that have not been written to within this many seconds are subject to deletion.
Response role for completions created by the agent.
Data Indexing and Retrieval index to be used by the agent.
Top N chunks the agent should request from Data Indexing and Retrieval when fetching context from the index.
Chunk similarity the agent should request from Data Indexing and Retrieval when fetching context from the index.
Format in which index text references are returned by the agent.
Delimiter string to separate the agent completions response from the index references.
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).
Strategy for summarizing an agent session once it exceeds the configured maximum session length.
Set of up to 16 key-value pairs attached to this agent.
ID of the agent.
Object type, which is always agent.
Unix timestamp (in seconds) when the agent was created.
ID of the model to be used by the agent for generating completions.
Availability status of an agent.
Details of the agent error status, if the agent is not available.
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.
Endpoint with requested model does not exist
Validation Error
"HTTPValidationError Object"
detail
curl -X POST -H 'Authorization: <value>' -H 'Content-Type: application/json' -d '{"session_max_length:"integer","session_summarization_strategy:"string","model:"string"}' https://{api_host}/api/v1/compatibility/openai/v1/assistants