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

# Generate Task • AI Agent SDK

> generate_task: Generate a Task object from the agent's instructions

# generate\_task

<div className="flex items-center gap-2">
  <Badge color="purple">Method</Badge>
</div>

> This is a method of the [**Agent**](../classes/Agent) class in the [**agent**](../modules/agent) module.

Generate a Task object from the agent's instructions

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def generate_task() -> 'Task'
```

### Returns

<ResponseField name="Returns" type="'Task'">
  The result of the operation.
</ResponseField>

## Uses

* `Task`

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/agent.py#L3764">
  `praisonaiagents/agent/agent.py` at line 3764
</Card>

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Tasks Concept" icon="list-check" href="/docs/concepts/tasks" />

  <Card title="Task Configuration" icon="gear" href="/docs/configuration/task-config" />

  <Card title="Task Validation" icon="check-double" href="/docs/features/task-validation-feedback" />
</CardGroup>
