Using Llama App with Agents
Llama App can be easily paired with your agents, this section shows how to do it for Pi and Codex / ChatGPT.
We recommend running models with a context window of at least 32k tokens, as agents can fill up context quickly. For good models to use, please refer to the recommended models in this list, paying special attention to those that mention “agentic coding”.
How It Works
The setup has two components running locally:
- Llama App — Serves the model.
- Your agent — The agent process that sends prompts to the local server, reasons about tasks, and executes actions.
┌─────────┐ API calls ┌──────────────────┐
│ Agent │ ───────────────▶ │ llama.cpp server│
│ │ ◀─────────────── │ (local model) │
└─────────┘ responses └──────────────────┘
│
▼
Your files,
terminal, etc. Once you start serving a model on Llama App, you can use them with coding agents.
Pi
Pi is an efficient and performant coding harness (it’s also the one behind OpenClaw). It integrates easily with Llama App.
Install Pi:
curl -fsSL https://pi.dev/install.sh | sh Start Pi in your project directory:
cd /path/to/project
pi Configure Pi to use your Llama App server by running
/login llama.cpp Enter the server URL, the default is http://127.0.0.1:9931. Then run /model in Pi to select the model to use for the current session.
ChatGPT desktop and Codex CLI
You can also use the ChatGPT desktop app and the OpenAI Codex CLI with Llama App. First, you need to install Codex CLI.
npm install -g @openai/codex To use Llama App with both Codex CLI and ChatGPT Desktop, add the following configuration to ~/.codex/config.toml.
model = "ggml-org/Qwen3.5-35B-A3B-GGUF" # id of the model you serve
model_provider = "llamacpp"
[model_providers.llamacpp]
name = "llama.cpp"
base_url = "http://127.0.0.1:9931/v1"
wire_api = "responses"
requires_openai_auth = false
supports_websockets = false To use Codex CLI, just run it in your project directory as follows.
cd /path/to/project
codex To use ChatGPT Desktop, simply quit and restart the app.
Other Agents
You can use Llama App with any OpenAI-compatible agent by pointing it to the base endpoint URL (http://127.0.0.1:9931/v1 by default).