Agents Overview
Agents are reusable AI assistants with predefined roles and configurations. Unlike one-time tasks, agents maintain consistent behavior, can be published for internal use, and can also power share links, embedded widgets, and larger workforce compositions.Agent vs Task
When to Use Tasks
Tasks are best for:- One-time executions
- Quick exploratory work
- Testing ideas
- Ad-hoc requests
- Temporary workflows
When to Use Agents
Agents are best for:- Reusable workflows
- Repeated operations
- Team collaboration
- Production use cases
- Specialized roles
Comparison
| Feature | Tasks | Agents |
|---|---|---|
| Use case | One-time executions | Reusable workflows |
| Configuration | Auto-generated | Customizable |
| Persistence | Not saved | Saved and shareable |
| Behavior | Varies by request | Consistent |
| Sharing | Not shareable | Can be published, shared, and embedded |
| Role definition | Per task | Predefined |
Key Agent Features
1. Role Definition
Define your agent’s purpose and behavior:- “You are a customer support assistant”
- “You are a data analyst”
- “You are a research assistant”
2. Execution Mode
Choose how your agent processes tasks:- React Mode: Reasoning → Acting cycle (default)
- Graph Mode: Plan all steps first, then execute
3. Tool Access
Control what tools your agent can use:- Basic tools (web search, calculator)
- File operations
- Image understanding/generation
- Knowledge base operations
- And more
4. Knowledge Integration
Add domain-specific knowledge:- Attach knowledge bases
- Agent retrieves relevant information
- Enhances response accuracy
5. Model Configuration
Select models for different purposes:- General Model: Main reasoning engine
- Fast Model: For simple operations
- Visual Model: For image tasks
- Compact Model: For long conversations
6. Distribution Options
Once an agent is published, you can expose it in several ways:- Internal agent list - Team members can discover and use it from the app
- Share link - Create a guest-facing public link for a specific agent experience
- Embedded widget - Allow approved domains to launch the agent in your own product
- Runtime API key - Call the agent through the SDK-oriented
/v1APIs
7. Workforce Building Block
Agents are also the units used inside workforces. A workforce combines a manager agent with one or more worker agents so complex tasks can be delegated across specialized roles.How It Works
Creating Tasks
For one-time tasks, simply:- Go to Task page
- Enter your request
- Upload files if needed
- Xagent executes and shows results
Creating Agents
For reusable workflows:- Go to Build page
- Create new agent
- Configure role, models, tools, knowledge
- Test with live preview
- Save and publish
- Find the agent in the agents list
- Start a conversation with the agent
- Share it externally with a managed share link
- Embed it on approved domains with the widget flow
- Reuse it as a worker or manager inside a workforce
Shared Execution Interface
Both tasks and agents use the same execution interface:- Real-time progress tracking
- Step-by-step execution details
- Tool calls and responses
- Chat interaction
- Agent’s logo and name
- Agent’s configuration
- Consistent behavior based on agent’s settings
Typical Workflow
For One-Time Tasks
For Creating Agents
Agent Templates
Jump-start agent creation with pre-built templates:- Customer Support: FAQ handling, documentation search
- Data Analyst: Data processing, visualization, reporting
- Research Assistant: Information gathering, synthesis
- Content Creator: Writing, editing, image generation
Next Steps
- Building Agents - Create and configure your agents
- Sharing Agents - Publish via share links and guest access
- Embed Widget - Use agents in your own application
- Workforces - Combine agents into multi-agent systems
- Templates - Explore pre-built agent templates
- Tasks - Learn about task execution

