Task Server
Last updated
Was this helpful?
Last updated
Was this helpful?
The Task Server is a distributed task processing component in Canso's AI Agentic System that empowers AI agents the ability with to execute long running or computationally intensive tasks asynchronously.
The diagram below illustrates how the task server integrates with your AI Agent.
The tools provided by Canso integrate seamlessly with the Task Server. All you need to do is set up the Broker and the Task Server, which involves executing a simple CLI command, and add the Canso tools to your AI Agent.
The Task Server implements a fundamental architectural principle: the separation between agent decision-making and task execution. This separation provides several key advantages:
Clean Separation of Concerns
Agents focus purely on decision-making and workflow orchestration
Task execution is handled independently by specialized workers
Clear boundaries between thinking (agents) and doing (tasks)
Scalability and Resource Optimization
Agent processes remain lightweight and responsive
Compute-intensive tasks are offloaded to appropriate workers
Independent scaling of agent instances and task workers
Enhanced Reliability
Task failures don't impact agent stability
Retry mechanisms are handled separately from agent logic
Better error isolation and recovery
This architecture enables AI agents to orchestrate complex workflows while maintaining responsiveness and reliability, making it ideal for production deployments.
To set up the task server, define a YAML file:
The table below explains the configuration attribues:
type
Type of task server being used
celery
name
Unique name of the task server
agent-task-server
replicas
Number of worker replicas
4
concurrency_per_replica
Tasks per worker
1
broker_resource_name
Associated broker instance
redis
Note: Before setting up a task server, setting up a Broker is a prerequisite. See Broker for more details.
Run the gru
command to to set up the task server:
See Broker β‘οΈ
Learn about Checkpoint DB β‘οΈ
Explore Memory β‘