> ## 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.

# set Task Mode • TypeScript AI Agent SDK

> setTaskMode: API reference for setTaskMode

# setTaskMode

<div className="flex items-center gap-2">
  <Badge color="teal">Function</Badge>
</div>

> This function is defined in the [**agent**](../modules/agent) module.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def setTaskMode(enabled: boolean) -> void
```

### Returns

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

## Uses

* `setTaskMode`
* `Agent`

## Used By

* [`setTaskMode`](../functions/setTaskMode)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-ts/src/agent/index.ts#L72">
  `src/agent/index.ts` at line 72
</Card>

***

## Related Documentation

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

  <Card title="JS Auto Agents" icon="robot" href="/docs/js/auto-agents" />
</CardGroup>
