Create agent definition

Create a new agent definition and its first version.

Create agent definition

Create a new agent definition and its first version.

POST https://api.futureagi.com/simulate/agent-definitions/create/
Bearer
          Click "Try It" to send a request
        

Authentication

This endpoint requires authentication. Include your API key in the Authorization header:

Authorization: Bearer YOUR_API_KEY

Request Body

  • agentType: string (one of: voice, text) Type of the agent.
  • agentName (required): string Name of the agent.
  • provider (required): string (one of: vapi, retell) Provider for the agent (e.g., vapi, retell).
  • apiKey: string API key for the agent provider.
  • assistantId: string External identifier for the assistant.
  • description: string Description for the first version of the agent.
  • language (required): string Language of the agent (ISO 639-1 code, for example, en for English).
  • knowledgeBase: string ID of the knowledge base to associate with the agent.
  • countryCode: string Country code for the contact number. For example, 1 for USA, 91 for India, etc.
  • contactNumber (required): string Contact number for the agent including country code. For example, +1xxxxxxxxxx for USA, +91xxxxxxxxxx for India, etc.
  • inbound: boolean Specifies if the agent handles inbound communication.
  • commitMessage: string Commit message for the initial version of the agent.
  • observabilityEnabled: boolean Enable observability for the agent.

Example

{
  "agentType": "voice",
  "agentName": "your-agentName",
  "provider": "vapi",
  "apiKey": "your-apiKey",
  "assistantId": "your-assistantId",
  "description": "your-description",
  "language": "your-language",
  "knowledgeBase": "your-knowledgeBase",
  "countryCode": "your-countryCode",
  "contactNumber": "your-contactNumber",
  "inbound": true,
  "commitMessage": "your-commitMessage",
  "observabilityEnabled": true
}

Responses

201

Agent definition created successfully.

  • message: string Example: Agent definition created successfully
  • agent: any

400

Invalid data provided.

  • error: string Example: Invalid data
  • details: object

401

Authentication credentials were not provided.

500

Internal server error.

  • error: string Example: Failed to create agent definition: [error details]

Code Examples

cURL

curl -X POST "https://api.futureagi.com/simulate/agent-definitions/create/" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"agentType": "voice", "agentName": "your-agentName", "provider": "vapi", "apiKey": "your-apiKey", "assistantId": "your-assistantId", "description": "your-description", "language": "your-language", "knowledgeBase": "your-knowledgeBase", "countryCode": "your-countryCode", "contactNumber": "your-contactNumber", "inbound": true, "commitMessage": "your-commitMessage", "observabilityEnabled": true}'

Python

import requests

url = "https://api.futureagi.com/simulate/agent-definitions/create/"
headers = {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
}
data = {
    "agentType": "voice",
    "agentName": "your-agentName",
    "provider": "vapi",
    "apiKey": "your-apiKey",
    "assistantId": "your-assistantId",
    "description": "your-description",
    "language": "your-language",
    "knowledgeBase": "your-knowledgeBase",
    "countryCode": "your-countryCode",
    "contactNumber": "your-contactNumber",
    "inbound": true,
    "commitMessage": "your-commitMessage",
    "observabilityEnabled": true
}

response = requests.post(url, headers=headers, json=data)
print(response.json())

JavaScript

const response = await fetch("https://api.futureagi.com/simulate/agent-definitions/create/", {
  method: "POST",
  headers: {
    "Authorization": "Bearer YOUR_API_KEY",
    "Content-Type": "application/json"
  },
  body: JSON.stringify({
    "agentType": "voice",
    "agentName": "your-agentName",
    "provider": "vapi",
    "apiKey": "your-apiKey",
    "assistantId": "your-assistantId",
    "description": "your-description",
    "language": "your-language",
    "knowledgeBase": "your-knowledgeBase",
    "countryCode": "your-countryCode",
    "contactNumber": "your-contactNumber",
    "inbound": true,
    "commitMessage": "your-commitMessage",
    "observabilityEnabled": true
})
});

const data = await response.json();
console.log(data);
Was this page helpful?

Questions & Discussion