🪄
OpenIndex.ai API Documentation
  • Introduction
  • Quick Start
  • Reference
    • API Reference
      • Collections
      • Agents
      • Chat
      • Supported models
Powered by GitBook
On this page
  1. Reference
  2. API Reference

Agents

Create an agent and define, model and its parameters.

PreviousCollectionsNextChat

Last updated 1 year ago

Please see the list of for the model parameter above.

supported models

Retrieve agents authored by the user.

get
Authorizations
Responses
200
A list of agents
application/json
get
GET /api/agents HTTP/1.1
Host: www.openindex.ai
Authorization: Bearer JWT
Accept: */*
200

A list of agents

{
  "ok": true,
  "agents": [
    {
      "id": "text",
      "slug": "text",
      "name": "text",
      "description": "text",
      "image": "text",
      "privacy": "text",
      "namespace": "text",
      "prompt": "text",
      "isAutonomous": true,
      "welcome": "text",
      "model": "gpt-3.5-turbo",
      "params": {
        "temperature": 1,
        "topP": 1,
        "frequencePenalty": 1,
        "presencePenalty": 1
      },
      "tools": [
        {
          "id": "text",
          "checked": true
        }
      ],
      "userId": "text",
      "createdAt": 1,
      "updatedAt": 1,
      "status": "text",
      "collections": [
        "text"
      ]
    }
  ]
}
  • GETRetrieve agents authored by the user.
  • POSTCreate or update an agent

Create or update an agent

post
Authorizations
Body
idstringOptional
namestringOptional
descriptionstringOptional
imagestringOptional
privacystring · enumOptionalPossible values:
isAutonomousbooleanOptional
promptstringOptional
welcomestringOptional
modelstring · enumOptional

Name of the LLM model to use.

Possible values:
collectionsstring[]Optional
Responses
200
The result of the agent creation or update.
application/json
400
Invalid name or description.
application/json
403
Exceeded agent allowance.
application/json
500
Error creating or updating agent.
application/json
post
POST /api/agents HTTP/1.1
Host: www.openindex.ai
Authorization: Bearer JWT
Content-Type: application/json
Accept: */*
Content-Length: 298

{
  "id": "text",
  "name": "text",
  "description": "text",
  "image": "text",
  "privacy": "public",
  "isAutonomous": true,
  "prompt": "text",
  "welcome": "text",
  "model": "gpt-3.5-turbo",
  "params": {
    "temperature": 1,
    "topP": 1,
    "frequencePenalty": 1,
    "presencePenalty": 1
  },
  "tools": [
    {
      "id": "text",
      "checked": true
    }
  ],
  "collections": [
    "text"
  ]
}
{
  "ok": true,
  "agentId": "text"
}