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

# Code Execution CLI

> Command-line interface for code execution

```mermaid theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
graph LR
    U[Input] --> A[Agent]
    A --> O[Output]

    classDef agent fill:#8B0000,color:#fff
    classDef tool fill:#189AB4,color:#fff

    class A agent
    class U,O tool
```

# Code Execution CLI

Execute Python code from the command line.

## Prerequisites

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
npm install @vercel/sandbox
```

## Basic Usage

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools code-execution \
  --prompt "Calculate the factorial of 20"
```

## With Options

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools "code-execution:timeout=60000" \
  --prompt "Find all prime numbers under 1000"
```

## Examples

### Math Calculations

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --tools code-execution \
  --prompt "Calculate the sum of squares from 1 to 100"
```

### Data Analysis

```bash theme={"theme":{"light":"vitesse-light","dark":"vitesse-dark"}}
praisonai-ts agent run \
  --instructions "You are a data analyst" \
  --tools code-execution \
  --prompt "Calculate mean, median, and std dev of [1,2,3,4,5,6,7,8,9,10]"
```

## Environment Variables

| Variable         | Required | Description    |
| ---------------- | -------- | -------------- |
| `OPENAI_API_KEY` | Yes      | OpenAI API key |
