POST
/
api
/
v1
/
agents
curl --location --request POST 'https://api.rapidagent.ai/api/v1/agents' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>'
--data-raw '{
    "name": "My agent",
    "type": "OPENAI",
    "llm": {
      "model": "openai-chat",
      "provider": "gpt-3.5-turbo"
    }
    "hasMemory": true,
}'
{
  "success": true,
  "data": {
      "id": "clhjk4hab00016iewrghkbs28",
      "userId": "clhj28u1300006ig02ptpm1sh",
      "user": {},
      "name": "Test Agent",
      "type": "REACT",
      "tags": [],
      "llm": {
          "model": "gpt-3.5-turbo",
          "provider": "openai-chat"
      },
      "hasMemory": true,
      "AgentMemory": null
    }
}

Body

name
string

A name for the agent

type
string

The agent type, valid values: OPENAI, REACT

llm
object

The large language model you want to use with the agent.

hasMemory
boolean

If the agent should have memory

promptId
string

A valid promptId

tags
object

An array of valid tag objects

Response

success
boolean

Indicates whether the call was successful.

data
object

Agent object

curl --location --request POST 'https://api.rapidagent.ai/api/v1/agents' \
--header 'Content-Type: application/json' \
--header 'Autorization: Bearer <token>'
--data-raw '{
    "name": "My agent",
    "type": "OPENAI",
    "llm": {
      "model": "openai-chat",
      "provider": "gpt-3.5-turbo"
    }
    "hasMemory": true,
}'
{
  "success": true,
  "data": {
      "id": "clhjk4hab00016iewrghkbs28",
      "userId": "clhj28u1300006ig02ptpm1sh",
      "user": {},
      "name": "Test Agent",
      "type": "REACT",
      "tags": [],
      "llm": {
          "model": "gpt-3.5-turbo",
          "provider": "openai-chat"
      },
      "hasMemory": true,
      "AgentMemory": null
    }
}