How elliottech/lighter-agent-kit works
Lighter Agent Kit is an agent skill for querying Lighter markets and accounts, submitting live trades, and simulating paper trades. The principal workflow starts with an agent request, routes to a JSON CLI script, resolves symbols and deployment metadata as needed, and reads from or writes to Lighter. Paper trading instead simulates supported orders against live order-book snapshots and persists local state. The README documents broader read, write, transfer, and account-configuration capabilities. Source excerpts are partial, so the graph omits unverified internal call details.
Main entry points: trade.py Live trading writes · paper.py Paper trading · query.py Market and account reads · _symbols.py Symbol resolution
Components 14
Agent interfaces
- Market and account reads
scripts/query.py - Live trading writes
scripts/trade.py - Paper trading
scripts/paper.py
Shared runtime
- Symbol resolution
scripts/_symbols.py - Asset registry
scripts/_assets.py - SDK and credentials
scripts/_sdk.py - JSON CLI helpers
scripts/_cli.py - Local path policy
scripts/_paths.py
Local data
- Paper state file
- Symbol cache
- Asset cache
- Credentials file
Other components
- AI agent
- Lighter API
Connections 23
- AI agent → Market and account reads: requests reads
README.md - AI agent → Live trading writes: requests writes
README.md - AI agent → Paper trading: requests simulation
README.md - Market and account reads → Lighter API: fetches data
README.md - Live trading writes → Lighter API: submits signed writes
README.md - Paper trading → Lighter API: fetches live books
README.md - Market and account reads → Symbol resolution: resolves markets
scripts/query.py - Live trading writes → Symbol resolution: resolves markets
scripts/trade.py - Paper trading → Symbol resolution: resolves markets
scripts/paper.py - Live trading writes → Asset registry: resolves assets
scripts/trade.py - Market and account reads → SDK and credentials: loads SDK
scripts/query.py - Live trading writes → SDK and credentials: loads SDK
scripts/trade.py - Paper trading → SDK and credentials: loads SDK
scripts/paper.py - Market and account reads → JSON CLI helpers: uses output helpers
scripts/query.py - Live trading writes → JSON CLI helpers: uses output helpers
scripts/trade.py - Paper trading → JSON CLI helpers: uses output helpers
scripts/paper.py - SDK and credentials → Local path policy: locates credentials
scripts/_sdk.py - Symbol resolution → Local path policy: locates cache
scripts/_symbols.py - Asset registry → Local path policy: locates cache
scripts/_assets.py - SDK and credentials → Credentials file: reads credentials
scripts/_sdk.py - Symbol resolution → Symbol cache: reads and writes
scripts/_symbols.py - Asset registry → Asset cache: reads and writes
scripts/_assets.py - Paper trading → Paper state file: persists state
README.md