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

# execute • AI Agents Framework

> execute: Execute the agent with given task.

# execute

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

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

Execute the agent with given task.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def execute(task: str) -> Any
```

## Parameters

<ParamField query="task" type="str" required={true}>
  No description available.
</ParamField>

### Returns

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

## Used By

* [`AgentScheduler.execute_once`](../functions/AgentScheduler-execute_once)

## Source

<Card title="View on GitHub" icon="github" href="https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai/praisonai/agent_scheduler.py#L84">
  `praisonai/agent_scheduler.py` at line 84
</Card>
