Skip to main content
POST
/
ai-agents
Create AI Agent
curl --request POST \
  --url https://api.wacht.dev/ai-agents \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "model": "<string>",
  "description": "<string>",
  "system_prompt": "<string>",
  "temperature": 1,
  "max_tokens": 123,
  "tools": [
    "<string>"
  ],
  "knowledge_bases": [
    "<string>"
  ]
}
'
{
  "id": "<string>",
  "name": "Customer Support Agent",
  "description": "AI agent for handling customer support inquiries",
  "model": "gpt-4",
  "system_prompt": "<string>",
  "temperature": 0.7,
  "max_tokens": 1000,
  "tools": [
    "<string>"
  ],
  "knowledge_bases": [
    "<string>"
  ],
  "is_active": true,
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

JWT Bearer token authentication using the Authorization header

Body

application/json
name
string
required
model
string
required
description
string
system_prompt
string
temperature
number
Required range: 0 <= x <= 2
max_tokens
integer
tools
string[]

(i64 formatted as string)

knowledge_bases
string[]

(i64 formatted as string)

Response

AI agent created successfully

id
string

(i64 formatted as string)

name
string
Example:

"Customer Support Agent"

description
string
Example:

"AI agent for handling customer support inquiries"

model
string
Example:

"gpt-4"

system_prompt
string
temperature
number
Required range: 0 <= x <= 2
Example:

0.7

max_tokens
integer
Example:

1000

tools
string[]

(i64 formatted as string)

knowledge_bases
string[]

(i64 formatted as string)

is_active
boolean
Example:

true

created_at
string<date-time>
updated_at
string<date-time>