Skip to main content
Tasks define specific work for agents to complete with clear objectives.

Quick Start

1

Run a task through a team

2

With a Task object

import { Task } from 'praisonai' resolves to the workflow-step class — its shape is { name, execute }, not { description, expectedOutput }. To give a Team a rich task with description, expectedOutput, agent, and the routing fields below, pass a plain object (or a task string), as shown above. Team reads those fields directly; you do not need to call new Task(...).
Only autonomy, web, reflection, and planning are still accepted for Python-SDK parity but not yet implemented in the TypeScript SDK. Passing one emits a [praisonai] … not yet honoured notice — see Parity Notices. Every other Task option below is fully live through team.start().

How a Task Runs

team.start() runs every task through the same pipeline, in this exact order.

Task Options

Every option below changes what team.start() does.

Core

Context, memory & knowledge

Output

Execution & retries

Routing & loops

Routing lives on Routing; loops live on Loops.

User Interaction Flow


API Reference

TaskConfig

Task configuration options

Task

Task class documentation
A few Python Task helper methods have no TypeScript counterpart yet. Configure tasks with the plain-object fields above and let team.start() drive them — see the parity baseline for the current method list.

Best Practices

“Write 500-word blog post about AI benefits” beats “Write about AI”.
A handler runs instead of the model — perfect for math, lookups, or calling your own code.
Pass earlier tasks so their output feeds the next one.
caching: true skips the model entirely on a repeat.

Handlers

Run a function instead of the model

Routing

Branch between tasks

Loops

Fan out over lists and CSVs

Teams

Multi-agent teams