Code Execution

Configure execution environments for LLM tool calls

K
Docs
LIVE

Code execution for my-ai-agent project

LLM Tool Integration

Stateful Code Execution for AI Agents

Configure execution templates that your LLM uses via the code_exec tool. Sessions persist state between calls - your LLM can resume execution with the same sandbox ID, saving tokens and enabling parallel tool calls.

Sub-50ms cold start
Stateful sessions
Custom Docker configs

55.4K

Total Executions

2

Active Sessions

How it works

1LLM calls code_exec
{
  "tool": "code_exec",
  "code": "x = 1 + 1\nprint(x)"
}
2We return result + sandbox_id
{
  "output": "2",
  "sandbox_id": "sb-exec-a8f3k2"
}
3LLM resumes with sandbox_id
{
  "tool": "code_exec",
  "sandbox_id": "sb-exec-a8f3k2",
  "code": "print(x * 10)"  // x still = 2
}

Configure Docker-based environments for code execution. Set one as default for your code_exec tool.

TypeScript (Bun)

DEFAULT

Lightning-fast Bun runtime with native TypeScript support

oven/bun:latest

Packages

zodcheeriolodash-esdate-fns

256MB

Memory

0.5 CPU

CPU

30s

Timeout

18,420 executionsLast used 2 minutes ago

TypeScript (Node)

Node.js 20 with tsx for native TypeScript execution

node:20-alpine

Packages

tsxzodaxioscheerio+1 more

256MB

Memory

0.5 CPU

CPU

30s

Timeout

12,300 executionsLast used 5 minutes ago

Node.js

Node.js 20 LTS with common utility packages

node:20-alpine

Packages

axioscheeriolodashmoment+1 more

256MB

Memory

0.5 CPU

CPU

30s

Timeout

8,900 executionsLast used 30 minutes ago

Python

Python 3.12 with requests, BeautifulSoup, and common utilities

python:3.12-slim

Packages

requestsbeautifulsoup4httpxpydantic

256MB

Memory

0.5 CPU

CPU

30s

Timeout

9,500 executionsLast used 15 minutes ago

Deno

Secure Deno runtime with built-in TypeScript and web APIs

denoland/deno:latest

Packages

256MB

Memory

0.5 CPU

CPU

30s

Timeout

4,200 executionsLast used 1 hour ago

Go

Go 1.22 for fast compiled execution

golang:1.22-alpine

Packages

256MB

Memory

0.5 CPU

CPU

30s

Timeout

2,100 executionsLast used 2 hours ago