Documentation Index
Fetch the complete documentation index at: https://agent37.com/docs/llms.txt
Use this file to discover all available pages before exploring further.
POST /v1/instances/{id}/exec runs a shell command inside the instance, straight from your backend. It is the escape hatch for anything the API does not wrap as its own call.
The command runs inside the instance as the agent’s own user, on the same box the agent works on, so it sees the agent’s files, tools, and connected accounts. Anything you would do in a terminal, you do here without one: install a package, wire up a channel, run a script, or inspect state while debugging.
Request
The shell command to run inside the instance.
Response
A command that runs but exits nonzero is a normal result: you get200 with its exit_code, stdout, and stderr. Only an instance that is unreachable or not running returns an error.
The command’s exit code. Nonzero is still a
200; read this to branch.Standard output. Combined
stdout and stderr output is capped at 512 KB; see truncated.Standard error. Shares the 512 KB output cap with
stdout.true when output spilled past the 512 KB cap and was cut.Output is capped at 512 KB, with
truncated set when it spills, and a command runs for up to 300 seconds.Example
Build on exec
Anything the API does not wrap as its own endpoint, you build onexec. A “Connect Telegram” button, for example, is two commands: add the channel, then approve the pairing code your end user pasted in.
curl
Next steps
Terminal, desktop & files
Hand an end user a live terminal instead of running commands yourself.
Skills & plugins
Install skills with
skills add over exec.