Management API

Create Agent

POST/v1/agent

Programmatically create a new Agent in a Meebly environment. Agents can be conversational (chat-based) or functional (task-based) and are linked to actions that define their capabilities.

Definition

Headers

bash
X-API-Key: YOUR_API_KEY

Body Parameters

ParameterTypeRequiredDescription
environmentIdstringYesThe ID of the environment to create the agent in
namestringYesDisplay name for the agent
instructionsstringYesSystem instructions defining the agent's behavior, persona, and responsibilities
toolIdsstring[]YesArray of action IDs to attach to this agent. Pass an empty array for no actions.
mcpToolIdsstring[]YesArray of MCP tool IDs to attach to this agent. Pass an empty array for none.
agentTypestringNoconversational or functional. Defaults to conversational.
roleNamestringNoControls the agent's role. assistant (default) handles tasks directly using tools. orchestration coordinates a network of sub-agents instead of calling tools directly.
displayNamestringNoOptional alternate display name shown in the chat UI, separate from the internal agent name.
subAgentIdsstring[]YesArray of agent IDs this orchestration agent can delegate to. Pass an empty array for non-orchestration agents.
temperaturenumberNoModel temperature between 0 and 1. Lower values produce more deterministic responses.
modelsobject[]NoCustom model configurations. Each entry has name, provider, apiKey, and optional baseUrl.
outputSchemaobjectNoJSON Schema defining the structured output for functional agents
quickActionsobject[]NoPre-defined prompt shortcuts shown to users in the chat UI. Each has label and text.
enableToolSearchbooleanNoEnable semantic search to dynamically select relevant tools from a large action set
enableCustomerMemoryPremiumbooleanNoEnable persistent customer memory — the agent remembers facts about each customer across conversations.
enableSemanticRecallPremiumbooleanNoEnable semantic recall — the agent automatically surfaces relevant snippets from past conversations as hidden context.
enableHumanHandoffPremiumbooleanNoEnable human handoff — allows this agent to transfer conversations to a human agent via the Handoffs inbox.
agenticConfigPremiumobjectNoAgent Intelligence processor pipeline. Contains a processors array where each entry has id, name, type (pre or post), mode (system-prompt or llm-node), enabled, and instructions. Post-processors may also include a loop object with continueSignal and maxIterations (1–3). See Processors for details.
profilePictureUrlPremiumstringNoURL of the agent's avatar shown in the chat UI

Response

Returns 201 Created with the newly created agent object on success.

json
{
  "id": "agent_xyz456",
  "name": "Support Assistant",
  "agentType": "conversational",
  "roleName": "assistant",
  "environmentId": "env_xyz789",
  "toolIds": ["action_abc123"],
  "mcpToolIds": [],
  "subAgentIds": [],
  "temperature": 0.3,
  "quickActions": [
    { "label": "Track my order", "text": "I want to check the status of my order" },
    { "label": "Return policy", "text": "What is your return policy?" }
  ],
  "createdAt": "2025-01-15T12:00:00Z"
}
Store the id returned in the response — you will need it to reference this agent in conversational and functional API calls.

Sample Request

bash
curl -X POST "https://api.meebly.ai/v1/agent" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY" \
  -d '{
    "environmentId": "env_xyz789",
    "name": "Support Assistant",
    "instructions": "You are a helpful customer support agent. Use the available actions to look up orders and resolve customer issues.",
    "agentType": "conversational",
    "roleName": "assistant",
    "toolIds": ["action_abc123"],
    "mcpToolIds": [],
    "subAgentIds": [],
    "temperature": 0.3,
    "quickActions": [
      { "label": "Track my order", "text": "I want to check the status of my order" },
      { "label": "Return policy", "text": "What is your return policy?" }
    ]
  }'
Last updated: March 2026Report an issue