LP Agent CLI
lpagent is the command-line interface for LP Agent.
It lets users and AI agents discover pools, inspect positions, and execute zap-in/zap-out transaction workflows from terminal scripts.
- Works as a standalone CLI
- Works well in coding-agent environments
- JSON output for automation, table output for humans
CLI Repository
Source code, releases, and issue tracking for the LP Agent CLI.
Install
Quick install script
Alternative install methods
Initial setup
Core command groups
Positions
Pools
Zap-In / Zap-Out transaction flow
tx zap-out-estimates shows what each output option (allToken0, allToken1, both, allBaseToken) pays out before you run decrease-tx. It needs CLI v0.4.0 or later, where tx decrease-quotes is kept as an alias for it. Older versions call the removed /position/decrease-quotes endpoint and fail, so run lpagent upgrade.Token and raw API access
Output modes
All commands support:json(default)tablequiet
Configuration
Config file path:~/.lpagent/config.json
Priority order:
- CLI flags
- Environment variables
- Config file
AI Agent usage pattern
When integratinglpagent into AI workflows:
- prefer
-o jsonfor machine parsing - keep wallet signing in trusted runtime boundaries
- run a dry read step (
positions open,pools info) before execution commands - use generated transaction + landing command pairs for reliability