Create a new agent in the Lens API. Required: name, type, system_prompt, user_prompt_template. Optional: description, llm_config (JSON string), context_variables (comma-separated), tools (comma-separated), knowledge_bases (comma-separated UUIDs), timeout, retry_attempts, streaming, tags (comma-se...
AI agents use create_agent to create or update resources in Lens — usually the action step of a workflow, after the agent has gathered context. Every call changes real data in your Lens environment.
| Parameter | Type | Required | Description |
|---|---|---|---|
name | string | Yes | Agent name |
tags | string | — | Comma-separated tags |
type | string | Yes | Agent type (e.g. reasoning, code, chat) |
tools | string | — | Comma-separated tool names |
timeout | number | — | Timeout in seconds (default 300) |
streaming | boolean | — | Enable streaming (default true) |
llm_config | string | — | JSON string for LLM config (model, temperature, etc.) |
description | string | — | Optional description |
system_prompt | string | Yes | System prompt for the agent |
retry_attempts | number | — | Retry attempts (default 3) |
knowledge_bases | string | — | Comma-separated KB UUIDs |
context_variables | string | — | Comma-separated context variable names |
Parameters from the server's own tool schema.
This tool creates new agents with potentially broad capabilities (tools, knowledge_bases, system_prompt configuration). While creation is reversible (agents can be deleted), the tool enables creating agents that could be configured to perform sensitive operations.
From the tool's definition Tool description states 'Create a new agent' with required parameters like name, type, system_prompt, user_prompt_template. The word 'Create' and the ability to define agents with configurable system prompts, tools, and knowledge bases indicate data creation.
Risk signalsHigh parameter count (13 properties)
Attacks that exploit this kind of access
Create a new agent in the Lens API. Required: name, type, system_prompt, user_prompt_template. Optional: description, llm_config (JSON string), context_variables (comma-separated), tools (comma-separated), knowledge_bases (comma-separated UUIDs), timeout, retry_attempts, streaming, tags (comma-separated). Use list_agents to see existing agents. It is categorised as a Write tool in the Lens MCP Server, which means it can create or modify data. Consider rate limits to prevent runaway writes.
create_agent accepts 12 parameters: name, tags, type, tools, timeout, streaming, llm_config, description, system_prompt, retry_attempts, knowledge_bases, context_variables. Required: name, type, system_prompt. The full parameter table on this page comes from the server's own tool schema.
Register the Lens MCP server in PolicyLayer and add a rule for create_agent: allow, deny, rate-limit, or require approval. Point your MCP client at the PolicyLayer proxy URL and the rule is enforced on every call, before it reaches Lens. Nothing to install.
create_agent is a Write tool with medium risk. Write tools should be rate-limited to prevent accidental bulk modifications.
Yes. Add a rate_limit block to the create_agent rule in your PolicyLayer policy. For example, setting max: 10 and window: 60 limits the tool to 10 calls per minute. Rate limits are tracked per agent session and reset automatically.
Set action: deny in the PolicyLayer policy for create_agent. The AI agent will receive a policy violation error and cannot call the tool. You can also include a reason field to explain why the tool is blocked.
create_agent is provided by the Lens MCP server (lens-mcp-server). PolicyLayer sits as a proxy in front of this server to enforce policies before tool calls reach the server.
Every MCP server has a record like this.
Type a name, get the same breakdown: verified identity, auth posture, risk grade, capabilities, recommended policy.
Teams ship this data inside their own products. See what a licence covers →