Agents
Field-by-field specification for agent resources derived from the backend Pydantic models.
Schema: AgentCreate
Used when creating a new agent via POST /agents.
Core Requirements
type
string (enum)
Required. One of [config, a2a, langflow].
name
string
Required for all types except a2a when a2a_profile is provided. Max 255 chars.
framework
string (enum)
Required for config agents (langchain, langgraph, or google_adk). Optional for other types; a2a defaults to langchain if omitted.
All other fields are optional, but config agents must specify a language model using exactly one of the mechanisms described in the Language Model Selection section below.
Optional Fields
account_id
string
Account UUID (auto-assigned when omitted).
instruction
string
Agent instruction prompt. Optional but recommended.
version
string
Max 255 chars.
description
string
Free-form description.
agents
array<string>
Optional list of sub-agent UUIDs.
tools
array<string>
Optional list of tool UUIDs.
mcps
array<string>
Optional list of MCP configuration UUIDs.
metadata
object
Application-defined metadata. Additional properties allowed.
language_model_id
string
Mutually exclusive with provider/model_name and agent_config.lm_provider.
provider
string
Legacy language model provider. Must be supplied together with model_name.
model_name
string
Legacy language model name. Must be supplied together with provider.
On create, supply UUID references in tools, agents, and mcps. Read responses expand those references into detailed objects.
Language Model Selection
config agents must specify a language model exactly once using one of the following options:
If multiple mechanisms are provided, validation fails. a2a and langflow agents may omit language model information.
Agent Types
Defined by AgentType enum:
config
Standard configuration-based agent
a2a
Agent-to-agent communication profile
langflow
Agent sourced from LangFlow flows
Agent Frameworks
Defined by AgentFramework enum:
langchain
LangChain framework
langgraph
LangGraph framework
google_adk
Google ADK framework
langflow
LangFlow framework
Tool Configs Structure
The tool_configs field is a JSON object keyed by tool UUID. Each entry supplies configuration for the referenced tool. Keys that are not present in the tools list are ignored automatically.
Agent Config Structure
The agent_config field contains framework-specific settings. Common keys include recursion limits, memory bindings, or LangFlow metadata.
No default values are enforced by the API; populate only the settings your runtime understands.
Available Configuration Options:
max_recursion_limit
integer
100
Maximum number of recursive calls the agent can make. Prevents infinite loops in agent reasoning chains. This setting is especially important for complex agents that may call themselves or create circular dependencies.
memory
string
null
Memory system identifier to use for persistent conversation context. Common values include "mem0" for Mem0 integration.
planning
boolean
false
Whether to enable planning mode for the agent. When enabled, the agent will first create a structured plan before executing tasks, improving reasoning and task decomposition for complex queries.
tool_output_sharing
boolean
false
Whether tool outputs are shared across different tool calls within the same agent execution session. When enabled, tools can access outputs from previous tool calls in the execution chain.
Metadata Structure
The metadata field can be used by applications such as GLChat to store UI and behavior configuration. Common fields include:
Common Fields:
type
string
Agent type: native or custom
display_name
string
Display name shown in GLChat UI
is_shown
boolean
Whether agent is visible in UI
timeout
number
Request timeout in seconds
chat_history_limit
number
Maximum chat history messages
agent_source
string
Source of agent creation (e.g., form)
svg_icon
string
SVG markup for agent icon
A2A Profile Structure
The a2a_profile field configures agent-to-agent communication profiles. It is required for a2a agents unless a name is provided.
url is required and validated for proper scheme and host.
Schema: AgentResponse
Returned by GET /agents/{agent_id} and other read operations.
id
string (UUID)
Unique agent identifier
name
string
Agent name
description
string
Detailed description
instruction
string
Agent instructions
version
string
Agent version
tools
array<ToolReference>
List of tool references with id, name, description
agents
array<AgentReference>
List of sub-agent references
mcps
array<MCPConfig>
List of MCP configurations
language_model_id
string
Resolved language model configuration ID
provider
string
Legacy language model provider (deprecated)
model_name
string
Legacy language model name (deprecated)
account_id
string
Account ID associated with the agent
created_at
string (datetime)
Creation timestamp
updated_at
string (datetime)
Last update timestamp
Schema: AgentListItem
Returned by GET /agents list operations.
id
string (UUID)
Unique agent identifier
name
string
Agent name
version
string
Agent version
description
string
Detailed description
metadata
object
Agent metadata
created_at
string (datetime)
Creation timestamp
updated_at
string (datetime)
Last update timestamp
deleted_at
string (datetime)
Soft-delete timestamp (nullable)
Validation Rules
On Create (POST /agents)
typemust be one ofconfig,a2a,langflow.nameis required for all non-a2aagents.a2aagents must provide eithernameor a populateda2a_profile.frameworkis required forconfigagents. When omitted fora2aagents it defaults tolangchain.langflowagents expectagent_config.langflow.flow_idinstead.configagents must specify a language model using exactly one supported method.String fields respect their max length constraints.
tools,agents, andmcpsarrays must contain valid UUID strings when provided. Extra entries intool_configsthat do not correspond to thetoolslist are ignored.
On Update (PUT /agents/{agent_id})
Full replacement: all required fields must be present and follow create rules.
Language model selectors remain mutually exclusive.
On Partial Update (PATCH /agents/{agent_id})
Only provided fields are validated and updated.
Language model selectors remain mutually exclusive.
Common Validation Errors
400
Invalid input data
Malformed JSON or invalid field types
409
Agent with name already exists
Duplicate name in the same account
422
Validation error
Missing required fields or constraint violations
Minimal Example
Full Example
Related Documentation
REST API: Agents — Endpoint reference
Python SDK Reference — Method signatures and usage
Agents Guide — Lifecycle operations
Last updated