Settings

Theme

Show HN: An agent sandboxing quickstart based on Claude Code

github.com

2 points by lebovic a month ago · 0 comments · 2 min read

Reader

Hey HN! I built an agent sandboxing quickstart that's heavily inspired by the APIs and UX from Claude Code on the web (claude.ai/code).

It's built as a base for quickly prototyping domain-specific custom agents. You can fork the repo, point Claude Code at it, and quickly get to a working and usable prototype.

I built this after collaborating with a team that's building an agent for biology. If they used something like this as a base when they started, I think it would have sped things up at the start.

This is yet another agent sandboxing project, but this one is interoperable with Claude Code's built-in session management. It does this by using the three arguments that I learned about from trying out claude.ai/code: --replay-user-messages, --sdk-url, and --resume. The --sdk-url arg enables live interaction over a WebSocket, and the --resume arg pulls session history from a URL.

This starter includes persistent sessions that are interoperable with what Claude Code expects, event streaming over a WebSocket, a web app, and spawning sandboxes through Modal or a Docker host.

Long-lived credentials stay outside of the sandbox; it has a basic credential-injecting proxy for the Anthropic API and GitHub. The proxy limits git pushes to a session-scoped branch.

There's still a gap between forking this app and charging users for a custom agent, but I think it's a somewhat sane set of choices for quickly prototyping.

(I used to work at Anthropic, but this isn't affiliated with them and was built solely with public information.)

No comments yet.

Keyboard Shortcuts

j
Next item
k
Previous item
o / Enter
Open selected item
?
Show this help
Esc
Close modal / clear selection