Import Agent
Import an AI agent from a template and create a new agent instance
Create a new agent instance from a template. The template can be from your organization or shared from another organization. All agent configuration, tools, sub-agents, and optionally knowledge bases will be replicated into your organization.Documentation Index
Fetch the complete documentation index at: https://docs.xpander.ai/llms.txt
Use this file to discover all available pages before exploring further.
Path Parameters
Request Body
true: Imports all knowledge bases with their documents and files (if included in template)false: Imports only agent configuration without knowledge bases
Response
Returns a completeAIAgent object:
ACTIVE or INACTIVEserverless or containeropenai)gpt-4o, gpt-4.1)agno)with_knowledge_bases: true)Example Requests
Basic Import
Import Without Knowledge Bases
Example Response
Import Behavior
When importing a template:- New Agent Created: A completely independent agent instance is created in your organization
- Configuration Copied: All agent settings, instructions, and behavior are replicated
- Sub-Agents Recreated: Complete agent hierarchy is maintained with new instances
- Knowledge Bases: Documents are copied to your organization (if included and
with_knowledge_bases: true) - Tools & Connectors: Tool configurations are preserved - you’ll need to provide credentials
- Independence: Changes to the imported agent won’t affect the source agent or template
Notes
- Cross-Organization Support: Templates can be imported from any organization - share the template ID
- Customization: You can modify the agent name, description, and icon during import
- Tool Setup: After import, configure credentials for any tools that require authentication
- Knowledge Bases: If the template was exported without knowledge bases,
with_knowledge_bases: truehas no effect - Origin Tracking: The
origin_templatefield tracks which template was used for import
Next Steps
After importing an agent:- Update agent configuration using Update Agent if needed
- Configure tool credentials if the agent uses external tools
- Deploy the agent using Deploy Agent
- Test the agent with sample tasks
See Also
- Export Agent - Create a template from an existing agent
- Create Agent - Create a new agent from scratch
- Update Agent - Customize the imported agent
- Deploy Agent - Deploy the imported agent
Authorizations
API Key for authentication
Path Parameters
Body
Response
Successful Response
Enumeration of the agent delegation end strategies.
Attributes: ReturnToStart: when last agent is finished and about to announce "finish" it will summarize and return to the first agent. FinishWithLast: finish at the last agent.
return-to-start, finish-with-last serverless, container - AIAgentConnectivityDetailsA2A
- AIAgentConnectivityDetailsCurl
- Connectivity Details
personal, organizational Enumeration of possible agent statuses.
Attributes: DRAFT: Agent is in a draft state. ACTIVE: Agent is active and operational. INACTIVE: Agent is inactive and not operational.
DRAFT, ACTIVE, INACTIVE Enumeration of the agent types.
Attributes: Manager: marks the agent as a Managing agent. Regular: marks the agent as a regular agent. A2A: marks the agent as an external agent used via A2A protocol. Curl: marks the agent as an external agent used via a CURL. Orchestration: marks the agent as an Orchestration object.
manager, regular, a2a, curl, orchestration Enumeration of the agent delegation types.
Attributes: Router: Marks the agent as a router agent - xpanderAI's LLM will decide which sub-agent to trigger. Sequence: Marks the agent as a sequence agent - sub-agents will delegate to other sub-agents.
router, sequence Enumeration of the agent delegation memory strategies.
Attributes: Full: The memory object will be passed completely between agents. Summarization: Between each sub-agent delegation, a summarization will occur, and a new thread will be created for each agent. OriginalInput: the sub agent will get the initial task with a fresh memory thread
full, summarization, original-input openai, nim, amazon_bedrock, azure_ai_foundary, huggingFace, friendlyAI, anthropic, gemini, fireworks, google_ai_studio, helicone, bytedance, tzafon_lightcone, open_router, nebius, cloudflare_ai_gw low, medium, high, xhigh text, markdown, json, voice xpander, custom Configuration for event-based notifications.
Attributes: on_success: Notifications to send when an operation succeeds. Maps notification types to a list of notification configurations. on_error: Notifications to send when an operation fails. Maps notification types to a list of notification configurations.
Configuration object for task-level execution strategies.
This model groups optional strategy configurations that control how a task is executed and managed over time, including retries, iterative execution, stopping conditions, and daily run limits.
Attributes: retry_strategy: Optional retry policy configuration that defines how the task should behave when execution fails (e.g., max attempts, backoff rules).
iterative_strategy:
Optional iterative execution configuration for tasks that may run in
repeated cycles/steps until completion or a stop condition is met.
stop_strategy:
Optional stopping policy configuration that defines when the task
should stop running (e.g., timeout, max iterations, success criteria).
max_runs_per_day:
Optional limit on how many times the task is allowed to run within a
24-hour period. If not set, no explicit daily limit is enforced.
agentic_context_enabled:
if agentic memory is enabled and accesible to the executor.
