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

AsyncMethod

> This is a method of the [**ManagedBackendProtocol**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/ManagedBackendProtocol.md) class in the [**protocols**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/protocols.md) 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

**prompt** `str` *required*

The user message to send to the managed agent. \*\*kwargs: Provider-specific options (e.g., timeout, metadata).

### Returns

**Returns** `str`

The agent's complete text response.

## 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)
* [`fire_hook`](../functions/fire_hook)

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/agent/protocols.py#L368)
>
> `praisonaiagents/agent/protocols.py` at line 368


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.