Skip to main content
Glama

agents_create

Create a new AI agent in the workspace.

Execution modes:

  • ai_assisted (default): Two-phase AI — fast pre-classifier (Haiku) for keyword filtering and simple replies, then full AI with tools for complex messages.

  • agentic: Autonomous multi-step agent with planning and tool execution.

  • rule_based: Simple pattern matching without AI.

Keyword filtering is available in ai_assisted mode via keywords in trigger conditions (free, deterministic) and/or auto_reply_rules (LLM-based) set through agents.update.

Pass prompt_text for the agent's instructions (stored inline on the agent) or prompt_id to link an existing prompt row, not both.

Tools: a new agent starts with the standard tool set (knowledge base lookup, replying, lead capture, reading files, handoff, plus the default voice-call tools). Pass allowed_tools to replace that set.

From a template: pass template (e.g. 'dm-auto-reply') to create the agent AND its built-in trigger in one call — deterministic, no need to add a trigger separately. When template is set, name/text_engine/send_mode come from the template.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesName of the AI agent (1-100 characters)
modelNoLLM the agent runs on. OMIT to use the platform default (deepseek-v4-flash-nothink). Applied right after creation so you don't need a follow-up agents_update.
templateNoOptional template slug to instantiate the agent + its built-in trigger from (deterministic). Use 'dm-auto-reply' for the customer DM auto-reply agent (incoming DM trigger, draft mode). When set, the trigger comes from the template — you don't need agents.trigger_create. OMIT to create a plain agent (no template).
prompt_idNoID of the prompt to assign to this agent
send_modeNoDefault send mode: 'auto' or 'draft'. OMIT to use 'draft' (the default).
descriptionNoOptional description of what this agent does
prompt_textNoThe agent's instructions, stored inline on the agent (this is what drives how it replies). Works with or without `template`; no separate prompts tool needed. Write it from the business to its customers.
remote_toolNoOnly for text_engine='external_agent': the workspace integration tool that starts the remote agent, e.g. 'ext42_run_routine' (list them with integrations.search_tools). On each trigger DialogBrain calls it once with the event, the agent's instructions and the ids to answer with; the remote agent replies through the DialogBrain MCP tools (messages.send, tasks.comment, agents.task_complete). The endpoint and its secret belong to the integration, not to the agent.
text_engineNoText-execution engine: 'rule_based', 'ai_assisted', 'agentic' (default), 'claude_channels', or 'external_agent' (the run is handed to an agent outside DialogBrain; needs remote_tool). Voice is derived from triggers, not engine. OMIT to use the default ('agentic').
in_workspaceNoRun this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.
allowed_toolsNoExplicit allow-list of tool IDs the agent may call on triggered runs (e.g. ['knowledge.query', 'messages.send']). OMIT to give the agent the standard set: knowledge.query, messages.send, contacts.capture_lead, files.read, agent.handoff (plus the default voice-call tools). When passed, the list REPLACES the standard set entirely — include 'knowledge.query' for an agent that must answer from its knowledge base, or the model has no such tool and tends to imitate the call in its reply text. An empty list leaves the agent with no tools.
max_iterationsNoHard cap on agentic-loop turns per run (1-50). OMIT for the default (10).

Schema Changelog

Changes observed during successful MCP inspections.

  1. Changed1 schema field changed
    • changedInput schema / properties / model / enum
      Previous value: -[
      -  "claude-haiku-4-5-20251001",
      -  "claude-opus-4-6",
      -  "claude-sonnet-4-6",
      -  "claude-sonnet-5",
      -  "dashscope-glm-5.2",
      -  "dashscope-glm-5.2-nothink",
      -  "deepseek-v4-flash",
      -  "deepseek-v4-flash-nothink",
      -  "gpt-4.1",
      -  "gpt-4.1-mini",
      -  "gpt-4.1-nano",
      -  "gpt-4o",
      -  "kimi-k2.6",
      -  "qwen-flash",
      -  "qwen-plus",
      -  "qwen3-vl-flash",
      -  "qwen3-vl-plus",
      -  "qwen3.6-flash",
      -  "qwen3.6-plus"
      -]New value: +[
      +  "claude-haiku-4-5-20251001",
      +  "claude-opus-4-6",
      +  "claude-sonnet-4-6",
      +  "claude-sonnet-5",
      +  "dashscope-glm-5.2",
      +  "dashscope-glm-5.2-nothink",
      +  "deepseek-v4-flash",
      +  "deepseek-v4-flash-nothink",
      +  "gpt-4.1",
      +  "gpt-4.1-mini",
      +  "gpt-4.1-nano",
      +  "gpt-4o",
      +  "kimi-k2.6",
      +  "qwen-flash",
      +  "qwen-plus",
      +  "qwen3-vl-plus",
      +  "qwen3.6-flash",
      +  "qwen3.6-plus"
      +]
  2. Changed1 schema field changed
    • addedInput schema / properties / in_workspace
      Added value: +{
      +  "description": "Run this one call in this workspace id instead of the session's. Nothing is stored; other sessions are not affected.",
      +  "type": "integer"
      +}
  3. Changed3 schema fields changed
    • addedInput schema / properties / remote_tool
      Added value: +{
      +  "description": "Only for text_engine='external_agent': the workspace integration tool that starts the remote agent, e.g. 'ext42_run_routine' (list them with integrations.search_tools). On each trigger DialogBrain calls it once with the event, the agent's instructions and the ids to answer with; the remote agent replies through the DialogBrain MCP tools (messages.send, tasks.comment, agents.task_complete). The endpoint and its secret belong to the integration, not to the agent.",
      +  "type": "string"
      +}
    • changedInput schema / properties / text_engine / description
      Previous value: -"Text-execution engine: 'rule_based', 'ai_assisted', 'agentic' (default), or 'claude_channels'. Voice is derived from triggers, not engine. OMIT to use the default ('agentic')."New value: +"Text-execution engine: 'rule_based', 'ai_assisted', 'agentic' (default), 'claude_channels', or 'external_agent' (the run is handed to an agent outside DialogBrain; needs remote_tool). Voice is derived from triggers, not engine. OMIT to use the default ('agentic')."
    • changedInput schema / properties / text_engine / enum
      Previous value: -[
      -  "rule_based",
      -  "agentic",
      -  "claude_channels"
      -]New value: +[
      +  "rule_based",
      +  "agentic",
      +  "claude_channels",
      +  "external_agent"
      +]
  4. First observed

TDQS

A4.1/5.0
Behavior4/5

Does the description disclose side effects, auth requirements, rate limits, or destructive behavior?

Annotations declare non-readOnly, non-idempotent, non-destructive. The description adds substantial behavioral context: tool defaults, keyword filtering mechanics, template behavior (name/text_engine/send_mode come from template), and what happens when allowed_tools is set. Notably discloses that templates bypass separate trigger creation. Missing explicit mention of idempotency/duplicate-creation behavior, but annotations cover the safety profile.

Agents need to know what a tool does to the world before calling it. Descriptions should go beyond structured annotations to explain consequences.

Conciseness4/5

Is the description appropriately sized, front-loaded, and free of redundancy?

Well-structured with clear sections (execution modes, keyword filtering, prompt params, tools, templates). Front-loaded with the core action. Some repetition with schema descriptions but generally efficient. Could be slightly tighter but serves multi-param tool well.

Shorter descriptions cost fewer tokens and are easier for agents to parse. Every sentence should earn its place.

Completeness4/5

Given the tool's complexity, does the description cover enough for an agent to succeed on first attempt?

Given 12 parameters and no output schema, the description covers the complex decision points (engine modes, template usage, tool sets, prompt handling). Annotations cover safety. Missing details on what the response returns or post-creation editing flow, but those are secondary for a creation tool.

Complex tools with many parameters or behaviors need more documentation. Simple tools need less. This dimension scales expectations accordingly.

Parameters3/5

Does the description clarify parameter syntax, constraints, interactions, or defaults beyond what the schema provides?

Schema coverage is 100%, so baseline is 3. The description adds some meaning by explaining relationships between params (prompt_text vs prompt_id mutual exclusivity, template overriding other fields, allowed_tools replacing defaults), but the schema descriptions already carry most of this detail.

Input schemas describe structure but not intent. Descriptions should explain non-obvious parameter relationships and valid value ranges.

Purpose5/5

Does the description clearly state what the tool does and how it differs from similar tools?

States a specific verb+resource ('Create a new AI agent in the workspace') and clearly distinguishes itself from agents_update by describing creation semantics and tool defaults. Sibling tools like agents_update/agents_get are visually implied as different operations.

Agents choose between tools based on descriptions. A clear purpose with a specific verb and resource helps agents select the right tool.

Usage Guidelines4/5

Does the description explain when to use this tool, when not to, or what alternatives exist?

Provides explicit guidance on when to use specific parameters (e.g., prompt_text vs prompt_id, template vs manual trigger creation, allowed_tools behavior). Doesn't explicitly name alternatives like agents_update or agents_trigger_create in all cases, but gives clear context for parameter selection.

Agents often have multiple tools that could apply. Explicit usage guidance like "use X instead of Y when Z" prevents misuse.

Try in Browser

Glama MCP Gateway

Add one secure layer between your agents and this server.