Skip to main content

GitHub All-Stars #13: Matchlock - Your Agent's Bulletproof Cage (With Room Service)

Picture of Artur Skowroński, Head of Application Development

Artur Skowroński

Head of Application Development
Feb 11, 2026|21 min read
star_in_purple_space
this_is_fine_meme

matchlock_vm_graph

1matchlock run --image python:3.12-alpine \
2 --secret ANTHROPIC_API_KEY@api.anthropic.com \
3 python call_api.py
1# Interactive shell
2matchlock run --image alpine:latest -it sh
3
4# With network allowlisting
5matchlock run --image python:3.12-alpine \
6 --allow-host "api.openai.com" python agent.py
7
8# Long-lived sandboxes
9matchlock run --image alpine:latest --rm=false # prints VM ID
10matchlock exec vm-abc12345 -it sh # attach later
11
12# Full lifecycle
13matchlock list | kill | rm | prune
14
15# Build from Dockerfile (BuildKit runs inside a VM)
16matchlock build -f Dockerfile -t myapp:latest .
1client, _ := sdk.NewClient(sdk.DefaultConfig())
2defer client.Close()
3
4sandbox := sdk.New("alpine:latest").
5 AllowHost("dl-cdn.alpinelinux.org", "api.anthropic.com").
6 AddSecret("ANTHROPIC_API_KEY", os.Getenv("ANTHROPIC_API_KEY"), "api.anthropic.com")
7
8client.Launch(sandbox)
9result, _ := client.Exec("echo $ANTHROPIC_API_KEY")
10fmt.Print(result.Stdout) // "SANDBOX_SECRET_a1b2c3d4..."
1from matchlock import Client, Config, Sandbox
2
3sandbox = (
4 Sandbox("alpine:latest")
5 .allow_host("dl-cdn.alpinelinux.org", "api.anthropic.com")
6 .add_secret("ANTHROPIC_API_KEY", os.environ["ANTHROPIC_API_KEY"], "api.anthropic.com")
7)
8
9with Client(Config()) as client:
10 client.launch(sandbox)
11 client.exec_stream(curl_cmd, stdout=sys.stdout, stderr=sys.stderr)
deny_default_meme

Image Alt

Subscribe to our newsletter and never miss an article