Creating Agents
Build AI agents that can interact with your users' connected services, execute custom tools, and follow specialized behavioral patterns.
Agent Builder UI
The easiest way to create and manage agents is through the Agent Builder in the BlueNexus application. The visual interface lets you configure your agent's personality, connect tools, set usage limits, and deploy to channels — all without writing code.
Learn more about the Agent Builder →
Creating Agents via API
For programmatic agent management, use the REST API. Required scope: agents-all (available to WHITELABEL_CUSTOMER role only).
Create an Agent
curl -X POST https://api.bluenexus.ai/api/v1/agents \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{
"name": "Support Agent",
"llm": "bluenexus/glm-4.7-flash-tee",
"personality": "You are a helpful customer support agent. You can access the user'\''s connected services to help resolve their issues. Be concise and professional.",
"description": "Handles customer support queries across connected services",
"temperature": 0.7,
"firstPrompt": "Hello! How can I help you today?",
"enabledBuiltInTools": ["provider-tools", "skills"],
"usageLimits": {
"dailyMessagesPerUser": 100,
"monthlyCreditsCap": 5000,
"limitReachedMessage": "You have reached your daily message limit. Please try again tomorrow."
}
}'
Response:
{
"id": "agent-abc123",
"accountId": "account-xyz",
"name": "Support Agent",
"llm": "bluenexus/glm-4.7-flash-tee",
"personality": "You are a helpful customer support agent...",
"description": "Handles customer support queries across connected services",
"temperature": 0.7,
"createdAt": "2026-04-13T10:00:00Z",
"updatedAt": "2026-04-13T10:00:00Z"
}
Request Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
name |
string | Yes | Display name |
llm |
string | Yes | LLM model ID (e.g., "bluenexus/glm-4.7-flash-tee") |
personality |
string | Yes | System prompt defining agent behavior |
description |
string | No | Public description |
avatar |
string | No | URL or base64 data URI |
temperature |
number | No | LLM temperature (0-2) |
firstPrompt |
string | No | Initial greeting message |
enabledBuiltInTools |
string[] | No | Built-in tools to enable |
billingAccountType |
string | No | "owner" or "user" — who pays credits |
usageLimits |
object | No | Per-user usage caps |
Built-In Tools
| Tool | Description |
|---|---|
provider-tools |
Access to connected service tools (Google, Slack, etc.) |
skills |
Reusable behavioral patterns |
agent-memory |
Long-term memory across conversations |
account-tasks |
Task management |
execute-code |
Code execution in sandbox |
Usage Limits
| Field | Description |
|---|---|
dailyMessagesPerUser |
Max messages per user per day |
monthlyMessagesPerUser |
Max messages per user per month |
dailyCreditsCap |
Max credits consumed per day |
monthlyCreditsCap |
Max credits consumed per month |
limitReachedMessage |
Message shown when limit is hit |
Link Tools to an Agent
# List available tools
curl https://api.bluenexus.ai/api/v1/agents/agent-abc123/tools/available \
-H "Authorization: Bearer ACCESS_TOKEN"
# Link a tool
curl -X POST https://api.bluenexus.ai/api/v1/agents/agent-abc123/tools \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"toolId": "tool-xyz"}'
Link Skills to an Agent
# List available skills
curl https://api.bluenexus.ai/api/v1/agents/agent-abc123/skills/available \
-H "Authorization: Bearer ACCESS_TOKEN"
# Link a skill
curl -X POST https://api.bluenexus.ai/api/v1/agents/agent-abc123/skills \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"skillId": "skill-xyz"}'
List Agents
curl "https://api.bluenexus.ai/api/v1/agents?page=1&limit=10" \
-H "Authorization: Bearer ACCESS_TOKEN"
Update an Agent
curl -X PUT https://api.bluenexus.ai/api/v1/agents/agent-abc123 \
-H "Authorization: Bearer ACCESS_TOKEN" \
-H "Content-Type: application/json" \
-d '{"temperature": 0.5, "personality": "Updated system prompt..."}'
Delete an Agent
curl -X DELETE https://api.bluenexus.ai/api/v1/agents/agent-abc123 \
-H "Authorization: Bearer ACCESS_TOKEN"
Next Steps
- Agent Chat Completions — Chat with your agent
- Deploying Agents — Deploy to Telegram, WhatsApp, web
- Guardrails — Add content moderation
- Scheduled Tasks — Run agents on a schedule