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

# Run Command • Rust AI Agent SDK

> run_command: Run a shell command in the sandbox.

# run\_command

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

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

Run a shell command in the sandbox.

## Signature

```python theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
async def run_command(
        &self,
        command: &str,
        limits: Option<ResourceLimits>,
        env: Option<HashMap<String, String>>,
        working_dir: Option<String>,
    ) -> Result<SandboxResult>
```

## Parameters

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

<ParamField query="limits" type="Option<ResourceLimits>" required={true}>
  No description available.
</ParamField>

<ParamField query="env" type="Option<HashMap<String" required={true}>
  No description available.
</ParamField>

<ParamField query="working_dir" type="Option<String>" required={true}>
  No description available.
</ParamField>

### Returns

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

***

## Related Documentation

<CardGroup cols={2}>
  <Card title="Rust CLI" icon="terminal" href="/docs/rust/cli" />
</CardGroup>
