Skip to main content
Glama

create_agent

Create a specialized AI assistant with a defined role, persona, and behavioral instructions to handle specific tasks. Attach it to a workflow for immediate use.

Instructions

Create a new agent in the workspace.

WHAT IS AN AGENT: An agent is a specialised AI assistant with a defined role, persona, and behavioural instructions. Agents are where you put "You are a..." system prompts, persona definitions, tone of voice rules, and task-specific instructions. Agents can have skills attached to them to give them access to reference knowledge.

EXAMPLES of correct agent content:

  • "You are a senior customer support agent for Acme Corp. You handle billing and account queries..."

  • "You are a code reviewer specialising in Python. You check for security vulnerabilities..."

DO NOT use create_agent to store reference material, policies, or documentation — use create_skill for that.

IMPORTANT: You MUST always provide both a clear name AND a meaningful description — never leave description blank. The description should explain the agent's role, specialisation, and how it behaves.

WORKFLOW ATTACHMENT: Always provide workflowId when creating an agent for a specific project or feature — this ensures the agent is immediately attached to the right workflow and won't be orphaned.

Input Schema

TableJSON Schema
NameRequiredDescriptionDefault
nameYesA clear, descriptive name for the agent (e.g., "Customer Support Agent", "Code Reviewer", "Marketing Copywriter")
personaIdNoOptional persona ID to base this agent on a built-in persona. Use list_agents or get the persona list to find valid IDs. If provided, systemPrompt is derived from the persona.
workflowIdNoOptional workflow ID to attach this agent to immediately after creation. Recommended — avoids orphaned agents.
descriptionYesREQUIRED — A meaningful description of the agent's purpose, role, and behaviour. Explain what this agent specialises in, what tasks it handles, and how it should approach its work. Do NOT leave this blank. Example: "A customer support agent specialised in handling billing queries and account issues. Responds empathetically, escalates complex issues, and follows company refund policies."
workspaceIdNoWorkspace ID. If not provided, uses your default workspace.
systemPromptNoThe system prompt defining this agent's behaviour and instructions. Required for custom agents (when no personaId is given). Example: "You are a senior customer support agent. You handle billing queries empathetically and escalate complex issues."
Behavior4/5

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

No annotations are provided, so the description carries the full burden. It explains the behavior of creating an agent, what agents contain (system prompts, persona definitions), and the necessity of a meaningful description. It could mention side effects like cost or permissions, but overall provides good behavioral context.

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?

The description is structured into sections (WHAT IS AN AGENT, EXAMPLES, DO NOT, IMPORTANT, WORKFLOW ATTACHMENT) and is front-loaded with the main purpose. It is somewhat lengthy but each section earns its place.

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?

For a simple creation tool with no output schema, the description covers purpose, usage guidelines, parameter details, and workflow advice. It is complete enough for an AI agent to use this tool correctly.

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?

The input schema covers all 6 parameters with descriptions (100% coverage). The description adds value by explaining agent concepts and providing examples, but does not significantly enhance parameter meaning beyond the schema.

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?

The description clearly states the verb 'Create' and the resource 'new agent in the workspace'. It explains what an agent is and distinguishes it from create_skill, making the purpose unambiguous.

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

Usage Guidelines5/5

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

The description explicitly says when to use this tool (creating a custom AI assistant), when not to use (for reference material, use create_skill), and emphasizes required fields like name and description. It also advises attaching a workflow to avoid orphaned agents.

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

Install Server

Other Tools

Latest Blog Posts

MCP directory API

We provide all the information about MCP servers via our MCP API.

curl -X GET 'https://glama.ai/api/mcp/v1/servers/contextium-io/contextium-mcp-server'

If you have feedback or need assistance with the MCP directory API, please join our Discord server