v2

latestOpenAPI 3.1.02026-07-262937191.0 MB
beta.agents

Create a agent that can be used within a conversation.

Create a new agent giving it instructions, tools, description. The agent is then available to be used as a regular assistant in a conversation or as part of an agent pool from which it can be used.

post/v1/agents

Request body

instructionsstring nullable

Instruction prompt the model will follow during the conversation.

modelstring required
namestring required
descriptionstring nullable
handoffsstring[] nullable
metadataMetadataDict

Custom type for metadata with embedded validation.

version_messagestring nullable

Example request

{
  "completion_args": {
    "response_format": {
      "type": "text"
    }
  }
}

Response

Successful Response

instructionsstring nullable

Instruction prompt the model will follow during the conversation.

modelstring required
namestring required
descriptionstring nullable
handoffsstring[] nullable
metadataMetadataDict

Custom type for metadata with embedded validation.

object'agent'
idstring required
versioninteger required
versionsinteger[] required
created_atstring date-time required
updated_atstring date-time required
deployment_chatboolean required
sourcestring required
version_messagestring nullable

Example response

{
  "completion_args": {
    "response_format": {
      "type": "text"
    }
  }
}