> ## Documentation Index
> Fetch the complete documentation index at: https://docs.upsonic.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Assigning Tasks Manually

> Explicitly assign specific agents to tasks

<Info>Manual task assignment only works with the **sequential** team mode. In sequential mode, context is automatically shared between tasks, so each subsequent task can access the results of previous tasks.</Info>

## Full Example Code

```python theme={null}
from upsonic import Agent, Task, Team

# Create specialized agents
writer = Agent(
    model="anthropic/claude-sonnet-4-5",
    name="Writer",
    role="Content Writer",
    goal="Create engaging content"
)

editor = Agent(
    model="anthropic/claude-sonnet-4-5",
    name="Editor",
    role="Content Editor",
    goal="Polish and improve content"
)

# Create team
team = Team(agents=[writer, editor], mode="sequential")

# Explicitly assign agents to tasks
task1 = Task(description="Write a product description")
task1.agent = writer  # Force this task to use writer

task2 = Task(description="Edit and polish the description")
task2.agent = editor  # Force this task to use editor

# Execute with manual assignments
result = team.print_do([task1, task2])
print(result)
```
