Create agent

Create an agent for a chatbot specified by chatbot uuid

Endpoint

POST api/v1/chatbot/<uuid>/agent/create

Authorization

Authorization string Bearer <your_token>

Path

uuid string required

Body

name string required

type string required

One of the following values: user-facing, background, human-escalation, pre-canned, spam-defense

description string

prompt string

temperature float

meta meta Object

  • model string

temperature float

Between 0 and 1

Only for user-facing agents.

bias float

Between 0 and 1.

Only for user-facing, human-escalation, pre-canned and spam-defense agents.

stickness float

Between 0 and 1.

Only for user-facing, human-escalation, pre-canned and spam-defense agents.

default_message string

Only for pre-canned and spam-defense agents.

tags tags Object

Only for background agents.

use_all_sources boolean

Only for user-facing agents.

Request example

curl --location --request POST 'https://app.aichatbothub.com/api/v1/chatbot/{uuid}/agent/create' \
--header 'Content-Type: application/json' \
--header 'Authorization: Bearer <token>' \
--data-raw '{
  "name": "string",
  "type": "string",
  "description": "string",
  "prompt": "string",
  "model": "string",
}'

Response

uuid string

name string

prompt string

description string

type string

created_at string

modified_at string

enabled boolean

By default, a newly created agent is disabled

meta meta Object

data_source_uuids List[string]

human_escalation_settings HumanEscalationSettings Object

tool_functions List[ToolFunction]

variables List[AgentVariable]

Response example

{
  "created_at": "2024-07-25T21:19:01Z",
  "description": "test for creating new agents",
  "enabled": 0,
  "meta": {
    "model": "gpt-4o-mini-4k",
    "tags": [],
    "temperature": 0.0
  },
  "modified_at": "2024-07-25T21:19:01Z",
  "name": "TEST create new agent",
  "prompt": "a test user-facing agent",
  "type": "user-facing",
  "uuid": "43474da7ae3b4b7191ee29c2de798257",
  "variables": []
}

Last updated