bash
Execute bash commands from an agent. Returns stdout + stderr as a string. Unix/Mac only.
The simplest way to give an agent shell access: from connectonion import bash and pass it as a tool.
Quick Start
main.py
API Reference
main.py
| Parameter | Type | Default | Description |
|---|---|---|---|
| command | str | required | Bash command to run |
| description | str | required | What the command does (shown to user) |
| cwd | str | "." | Working directory |
| timeout | int | 120 | Seconds before timeout (max 600) |
Examples
main.py
Combined with FileTools
A common pair — FileTools for reading/editing, bash for running:
main.py
Notes
• Output truncated at 10,000 characters to prevent token overflow
• stdout and stderr are merged in the returned string
• Non-zero exit codes included in output (Exit code: 1)
• Unix/Mac only — use Shell for cross-platform
