Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.litellm-agent-platform.ai/llms.txt

Use this file to discover all available pages before exploring further.

The lap CLI talks to a running LiteLLM Agent Platform deployment and spins up sandboxes on demand. This guide walks you through installing the CLI, authenticating against your platform, and opening your first sandbox session.

Prerequisites

  • Node 18 or newer installed on your machine.
  • A running LiteLLM Agent Platform deployment with at least one agent configured. If you don’t have one yet, see Self-hosting to set up a local instance.
  • The base URL of your platform (e.g. https://lap.acme.dev or http://localhost:3000) and a master key.

Setup

1

Install the lap CLI from source

Clone the repository, install dependencies, and symlink the binary onto your PATH:
git clone https://github.com/BerriAI/litellm-agent-platform.git
cd litellm-agent-platform/cli
npm install
chmod +x bin/lap.mjs
mkdir -p ~/.local/bin
ln -sf "$PWD/bin/lap.mjs" ~/.local/bin/lap
If ~/.local/bin is not yet on your PATH, add it:
echo 'export PATH="$HOME/.local/bin:$PATH"' >> ~/.zshrc && exec zsh
If you prefer a system-wide install, use sudo ln -sf "$PWD/bin/lap.mjs" /usr/local/bin/lap instead.
2

Log in to your platform

Run lap login and enter your platform URL and master key when prompted:
lap login
Agent platform URL: https://lap.acme.dev
Master key:         ••••••••••••••••
✓ saved to ~/.lap/config.json
Config is saved with mode 0600. To clear it later, run lap logout.
3

List available agents

Verify your connection and see which agents are configured on your platform:
lap agents
This calls GET /api/v1/managed_agents/agents and prints each agent’s name and harness type. You’ll use the agent name in the next step.
4

Open your first sandbox

Pass the agent name as the argument to lap:
lap claude-code-cli1
Replace claude-code-cli1 with any agent name from lap agents. You can also pass a UUID.What happens next:
  1. lap resolves the name to an agent ID.
  2. A new session is created via POST /agents/{id}/session.
  3. lap polls until the pod is ready.
  4. Your terminal attaches to the sandbox TTY over WebSocket.
A fresh Kubernetes pod starts, the repo is cloned inside, and you drop straight into the agent. The pod’s environment contains only stub credentials — the vault proxy swaps them for real keys on every outbound connection.
5

Detach when you're done

Press Ctrl-D to detach from the sandbox. Your local terminal returns to normal, but the remote session stays alive. You can reconnect at any time by running lap <agent-name> again.
Sessions are reaped automatically after 24 hours of message inactivity. You don’t need to explicitly stop them.

Common commands

CommandDescription
lap <agent-name>Open a sandbox for the named agent
lap --agent <name>Same as above (flag form)
lap agentsList all agents on the platform
lap configShow your current base URL and authentication state
lap logoutDelete saved config

Next steps