Skip to main content
This tutorial walks you through wiring a LangChain ReAct agent with a tool that executes shell commands in a K7 sandbox.

Prerequisites

  • K7 API running (k7 install deploys it by default; check with k7 api status) and reachable
  • API key generated: k7 generate-api-key <name>
  • Python 3.10+

Setup

Create a .env file with your credentials and defaults:
Install dependencies:

Agent code

You can shell into the same sandbox in parallel: k7 shell lc-agent.