Examples
End-to-end examples that show what you can build with a Lightning AI Sandbox. The complete, ready-to-run code for each lives in the SDK repo.
- Run arbitrary code in a sandboxed environment: Install multiple language runtimes into one sandbox, run bash, Python, Node.js, Ruby, and PHP, stream long-running output, and safely run dangerous code.
- Build a stateful, sandboxed code interpreter: Run a long-lived Python driver over a PTY session to build a stateful
exec()-based interpreter that keeps variables alive between snippets. - Build a coding agent with LangChain: Orchestrate a LangGraph agent that writes Python code and runs it inside a sandbox, iterating on failures until it succeeds.
Was this page helpful?
Thanks for the feedback.