Apo Adk Cli banner
pouriamrt pouriamrt

Apo Adk Cli

AI community

Description

CLI tool that automatically optimizes LLM prompts using APO (textual gradients + beam search). Built with AgentLightning and Google ADK.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

APO — Automatic Prompt Optimizer

Automatically optimize your LLM prompts using gradient-based beam search

APO Paper · AgentLightning Docs · Google ADK Docs


A CLI tool that takes your LLM prompt and makes it better — automatically. It uses the **APO (Automatic Prompt Optimization)** algorithm to iteratively critique, edit, and improve prompts through beam search over "textual gradients." Built with [Microsoft AgentLightning](https://github.com/microsoft/agent-lightning) for the optimization loop and [Google ADK](https://github.com/google/adk-python) with [LiteLLM](https://docs.litellm.ai/) for flexible model access across 100+ LLM providers.

How It Works

APO treats prompt optimization like gradient descent, but with natural language instead of numbers:

  1. Evaluate — Run your prompt on a batch of tasks and measure performance
  2. Critique — An LLM generates "textual gradients" — natural language feedback about what's wrong
  3. Edit — Another LLM applies the critique to produce improved prompt candidates
  4. Select — Beam search keeps the top-k performing prompts
  5. Repeat — Iterate until convergence

*"APO is an iterative prompt optimization algorithm that uses LLM-generated textual gradients to improve prompts through a beam search process."* — [Pryzant et al., 2023](https://arxiv.org/abs/2305.03495)

Dashboard

APO includes a **real-time dashboard** (powered by AgentLightning) that launches automatically at `http://localhost:4747` during optimization.

AgentLightning Dashboard

Tab What It Shows
**Rol