> ## 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 Agent SDK

> execute: Execute a prompt on managed infrastructure and return the full response.

# execute

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

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

Execute a prompt on managed infrastructure and return the full response.

This is the primary entry point called by Agent.\_delegate\_to\_backend().

## Signature

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

## Parameters

<ParamField query="prompt" type="str" required={true}>
  The user message to send to the managed agent. \*\*kwargs: Provider-specific options (e.g., timeout, metadata).
</ParamField>

### Returns

<ResponseField name="Returns" type="str">
  The agent's complete text response.
</ResponseField>

## Used By

* [`CodeAgent.execute_code`](../functions/CodeAgent-execute_code)
* [`CodeAgent.aexecute`](../functions/CodeAgent-aexecute)
* [`MiddlewareManager.execute_model_call`](../functions/MiddlewareManager-execute_model_call)
* [`MiddlewareManager.execute_tool_call`](../functions/MiddlewareManager-execute_tool_call)
* [`HookRunner.execute_async`](../functions/HookRunner-execute_async)

## Source

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