Skip to main content

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
Example: “Summarize this document” - a one-time request that doesn’t need to be saved or reused.

When to Use Agents

Agents are best for:
  • Reusable workflows
  • Repeated operations
  • Team collaboration
  • Production use cases
  • Specialized roles
Example: A “Customer Support Agent” that handles FAQ requests, searches documentation, and provides consistent responses.

Comparison

FeatureTasksAgents
Use caseOne-time executionsReusable workflows
ConfigurationAuto-generatedCustomizable
PersistenceNot savedSaved and shareable
BehaviorVaries by requestConsistent
SharingNot shareableCan be published, shared, and embedded
Role definitionPer taskPredefined

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 /v1 APIs

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:
  1. Go to Task page
  2. Enter your request
  3. Upload files if needed
  4. Xagent executes and shows results

Creating Agents

For reusable workflows:
  1. Go to Build page
  2. Create new agent
  3. Configure role, models, tools, knowledge
  4. Test with live preview
  5. Save and publish
After publishing, users can:
  • 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
When using an agent, the interface displays:
  • Agent’s logo and name
  • Agent’s configuration
  • Consistent behavior based on agent’s settings

Typical Workflow

For One-Time Tasks

Task Page → Enter Request → Execution → Results
Done! No need to save or configure anything.

For Creating Agents

Build Page → Create Agent → Configure → Test → Save → Publish
After publishing:
Agents List → Select Agent → Chat → Agent responds with configured behavior

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
Templates provide a starting point that you can customize for your specific needs. Explore templates →

Next Steps