Overview
Agent templates enable you to export AI agents into reusable, shareable configurations that can be imported across different organizations. This powerful feature facilitates:- Cross-Account Sharing: Share agent configurations between organizations
- Agent Marketplace: Distribute pre-built agents as templates
- Backup & Migration: Create portable copies of your agents
- Version Control: Maintain templates for different agent configurations
Agent Templates
An agent template packages all components of an AI agent into a portable format:- Agent Configuration: Instructions, settings, and behavior
- Tools & Integrations: Connected tools and custom functions
- Sub-Agents: Complete hierarchy of delegated agents
- Knowledge Bases (Optional): Associated documents and files
Templates support cross-account usage, meaning an agent exported from one organization can be imported into any other organization.
Exporting Agents
Export an agent to create a reusable template that can be shared or imported later.Export Options
When exporting an agent, you can control whether to include knowledge bases:Controls whether knowledge bases and their document files are included in the export
true: Includes all knowledge bases with their documents and filesfalse: Exports only agent configuration without knowledge bases
REST API Example
Export with Knowledge Bases
Export without Knowledge Bases
Response Structure
The export returns anAgentTemplate object containing:
Importing Agents
Import a template to create a new agent instance in your organization.REST API Example
Import Behavior
When importing a template:- New Agent Created: A fresh agent instance is created in your organization
- Configuration Copied: All agent settings, instructions, and tools are replicated
- Sub-Agents Recreated: Complete agent hierarchy is maintained
- Knowledge Bases (if included): Documents are copied to your organization
- Tools & Connectors: Tool configurations are preserved (you may need to provide credentials)
The imported agent is fully independent from the original. Changes to the imported agent won’t affect the source agent or template.
Cross-Account Sharing
Templates can be shared and used across different organizations, enabling powerful collaboration scenarios.Sharing Workflow
- Organization A exports an agent as a template
- Template ID is shared with Organization B (via documentation, marketplace, etc.)
- Organization B imports the template using the template ID
- A new agent instance is created in Organization B
Use Cases
Agency to Client
Share pre-built agents with clients for their specific needs
Internal Teams
Distribute standardized agents across departments
Marketplace
Publish agents as templates for community use
Development to Production
Promote agent configurations between environments
Knowledge Base Handling
Including Knowledge Bases
Whenwith_knowledge_bases: true:
- Documents: All document files are exported with their content
- Structure: Knowledge base organization is preserved
- Size: Export may be larger due to document content
Excluding Knowledge Bases
Whenwith_knowledge_bases: false:
- Lightweight: Smaller export size for faster sharing
- Configuration Only: Agent behavior without data
- Flexibility: Import and attach different knowledge bases later
Best Practices
For Exporting
- Descriptive Names: Use clear, descriptive template names
- Documentation: Include comprehensive descriptions
- Knowledge Base Decision: Choose whether to include based on use case:
- Include for complete, ready-to-use agents
- Exclude for configurable frameworks
- Icon Selection: Use meaningful icons for easy identification
For Importing
- Review Template: Understand what’s included before importing
- Customize After Import: Adjust agent settings for your needs
- Test Thoroughly: Validate imported agents in your environment
- Tool Credentials: Ensure you have access to required integrations
- Knowledge Base Validation: Verify imported documents are appropriate
For Cross-Account Sharing
- Security Review: Ensure no sensitive data in templates
- Documentation: Provide clear usage instructions
- Version Management: Track template versions for updates
- Access Control: Share template IDs securely
Security Considerations
What Gets Shared
Included in Templates:- Agent instructions and behavior
- Tool configurations (without credentials)
- Knowledge base documents (if selected)
- Sub-agent hierarchies
- API keys or secrets
- Organization-specific credentials
- User data or execution history
- Account identifiers

