Code assistant agent
Create a sandbox, define an agent, deploy, and run it.sandboxes/dev-env.ts
agents/code-assistant.ts
GitHub PR Review Bot
Install the GitHub tool, connect GitHub, and add the tool slug to your agent.agents/pr-reviewer.ts
Email Assistant
OAuth-backed tools can resolve connected accounts during hosted tool execution.agents/email-assistant.ts
Custom Tool + Agent
tools/customer-db.ts
agents/support-agent.ts
Programmatic Sandbox Management
Best Practices
Use current core tool names
Use current core tool names
New projects created by
runtools init use exec_command, write_stdin, apply_patch, view_image, web_search, and get_dev_url.Link sandbox-backed agents explicitly
Link sandbox-backed agents explicitly
in_sandbox agents require sandbox.Use OAuth before manual provider tokens
Use OAuth before manual provider tokens
Prefer Connected Apps for OAuth-backed marketplace tools.
Store reusable credentials as secrets
Store reusable credentials as secrets
Use
runtools tool credentials for installed API-key tools. Use runtools secret or rt.secrets for named secrets that your own code or direct tool calls reference.Pause or destroy sandboxes when done
Pause or destroy sandboxes when done
Keep long-lived environments only when you need their state.