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

# Safe Run • AI Agent SDK

> safe_run: Execute tool with error handling, returning ToolResult.

# safe\_run

Method

> This is a method of the [**BaseTool**](https://praison.ai/docs/sdk/reference/praisonaiagents/classes/BaseTool.md) class in the [**base**](https://praison.ai/docs/sdk/reference/praisonaiagents/modules/base.md) module.

Execute tool with error handling, returning ToolResult.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
def safe_run() -> ToolResult
```

### Returns

**Returns** `ToolResult`

The result of the operation.

## Uses

* `run`
* `ToolResult`
* `logging.error`

## Source

> [card] [View on GitHub](https://github.com/MervinPraison/PraisonAI/blob/main/src/praisonai-agents/praisonaiagents/tools/base.py#L310)
>
> `praisonaiagents/tools/base.py` at line 310


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