Tasks

One agent, one task

A task is the work. The agent is who does it. AgentTeam runs the task.

The task names the work and the agent. The team starts them.

Example

from praisonai import Agent, Task, AgentTeam

agent = Agent(name="Researcher", instructions="Research topics")
task = Task(
    description="Name three uses of an AI agent",
    expected_output="A short list",
    agent=agent,
)
team = AgentTeam(agents=[agent], tasks=[task])
print(team.start())

Try it Yourself

Example explained

  • Task — The work, the expected output, and which agent does it.
  • AgentTeam — Runs the agents and the tasks.

Reference: documentation