TheDocumentation 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.
lap CLI talks to a running LAP instance. If you havenβt deployed one yet, see Installation.
First time? Install the CLI:
1. Log in
MASTER_KEY when prompted. Saved to ~/.lap/config.json.
2. Open an agent
lap spins up a Kubernetes-sandboxed pod running the Google Gemini CLI in --yolo mode, wraps it in a tmux session so it survives WS reconnects (lap --resume <id> lands you on the same in-progress REPL), and attaches your local terminal to its TTY over a WebSocket.
The harness routes Gemini through your LiteLLM gateway by mapping LITELLM_API_KEY β GEMINI_API_KEY and LITELLM_API_BASE β GOOGLE_GEMINI_BASE_URL + /gemini at boot β so Gemini talks to your LiteLLM proxyβs Gemini passthrough, and your proxy fans out to Google with whatever upstream credentials itβs configured with.
Press Ctrl-D to detach β the session stays alive for 24h.
Creating an agent
In the UI choose gemini from the Harness picker and pick a Gemini model, or via API:LITELLM_API_KEY and LITELLM_API_BASE are wired through automatically.
Prerequisite: register a Gemini model on your LiteLLM proxy
Unlikeclaude-code, codex, and hermes (which speak OpenAIβs protocol and hit LiteLLMβs /v1/chat/completions), Gemini CLI speaks Googleβs native Gemini API. LiteLLM exposes that as a passthrough route at LITELLM_API_BASE/gemini/v1beta/... β but the proxy needs at least one gemini/* model registered in its config.yaml with a real Google API key behind it.
Example config.yaml entry:
LITELLM_API_KEY must also be a virtual key (starts with sk-) β not the proxy master key. Mint one with:
200, youβre done. If you get "no healthy deployments for this model", the Gemini model isnβt registered on the proxy yet.
Picking a model
Gemini CLIβs auto-default sometimes lands on a preview model your project doesnβt have access to. Pin a stable model inside the TUI:gemini-2.5-flash, gemini-2.5-pro, gemini-2.0-flash.
Advanced: bypass the LiteLLM proxy
If your LiteLLM deployment doesnβt have a Gemini model registered and you need to get up and running fast, you can bring your own Google credentials. The harness detects either and uses it instead of the LiteLLM passthrough.Option A β Bring a Gemini API Key
Mint one at aistudio.google.com/app/apikey and pass it as an agent env var:stub_β¦, and vault swaps for the real value at the wire.
Option B β Vertex AI service account
For Vertex AI access (different model catalog, no rate-limit surprises from AI Studio quotas), put your SA JSON in a private gist and point the agent at it:/work/repo/key.json is present after the clone, the entrypoint auto-exports GOOGLE_APPLICATION_CREDENTIALS, GOOGLE_GENAI_USE_VERTEXAI=true, GOOGLE_CLOUD_PROJECT (extracted from the JSON), GOOGLE_CLOUD_LOCATION=us-central1, and GEMINI_CLI_TRUST_WORKSPACE=true. The CLI picks it all up automatically.
Smoke-testing without the TUI
SetGEMINI_SELFTEST_PROMPT (any value) in the agentβs env_vars and the pod runs gemini -m gemini-2.5-flash -p "..." once at boot. The reply lands in pod stdout β readable via the diagnose endpoint without needing the WebSocket /tty flow: