Skip to main content
POST
/
api
/
v3
/
agents
/
create
Create Agent Endpoint
curl --request POST \
  --url https://api.nugen.in/api/v3/agents/create \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "agent_name": "Customer Support Agent",
  "agent_description": "An agent designed to handle customer support queries",
  "model": "nugen-flash-instruct",
  "max_token": 1000,
  "temperature": 0.7,
  "instructions": "You are a helpful customer support assistant.",
  "demonstrations": [
    {}
  ]
}
'
{
  "data": {
    "id": "agent-12345",
    "name": "Customer Support Agent",
    "description": "An agent designed to handle customer support queries",
    "base_model": "nugen-flash-instruct",
    "base_model_name": "Nugen Flash Instruct",
    "created_date": "2024-01-15T10:30:00Z",
    "status": "active",
    "creator": "youremail@domain.com",
    "endpoint": "https://api.nugen.in/api/v3/inference/completions/agent-12345",
    "usage_count": 150,
    "performance_metrics": {
      "average_uncertainty": 0.15,
      "human_interventions": 5,
      "average_response_time": 1.2,
      "user_satisfaction_score": 0.85
    },
    "system_prompt": "You are a helpful customer support assistant.",
    "uncertainty_threshold": 0.7,
    "last_used": "2024-01-20T14:30:00Z",
    "conversation_saving_enabled": true
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
agent_name
string
required

Name of the agent

Example:

"Customer Support Agent"

agent_description
string
required

Description of the agent

Example:

"An agent designed to handle customer support queries"

model
string
required

Base model identifier

Example:

"nugen-flash-instruct"

max_token
integer | null
default:1000

Max tokens for inference request

Example:

1000

temperature
number
default:0.7

Temperature for model responses

Example:

0.7

instructions
string | null

System prompt for the agent

Example:

"You are a helpful customer support assistant."

demonstrations
Demonstrations · object[] | null

Training demonstrations

Response

Returns the details of the newly created agent including its unique identifier, configuration, usage statistics, and endpoint URL for execution

Response model for agent creation endpoint.

data
AgentInfo · object
required