AI Engineer

Burn Your Flags: Interactive CLIs for Agents — Mark Lummus & Navinkumar Patil, PayPal

Published 2026-10-11 · Duration 53:43

Summary

This workshop addresses the challenge of making interactive Command Line Interfaces (CLIs) usable by AI agents. Traditional methods, like adding command flags, fail when the workflow is contextual, sequential, or depends on live API responses. The presentation introduces advanced techniques—including `tmux` sessions, IPC side channels, and context injection—to provide agents with the necessary structured context and state management, moving beyond simple screen scraping to enable robust, multi-step agentic workflows.

Download summary

Key takeaways

  1. Interactive CLI Limitations for Agents 7:15

    Agents struggle with interactive CLIs because they may fail silently (e.g., seeing a redraw loop instead of a question) [0:00, 0:00]. Flags are insufficient when choices are contextual or depend on real-time API responses, unlike simple, independent command flows [4:35].

  2. Advanced Agentic CLI Techniques 43:11

    Three key approaches were presented to improve agent interaction with CLIs: 1) Using `tmux` sessions for key sending and capturing terminal state [25:51]. 2) Implementing IPC side channels to expose structured JSON output instead of relying on screen scraping [28:28]. 3) Context injection, which explicitly provides constraints and options to the agent, mimicking human guidance [31:00].

  3. The Importance of Determinism

    For a CLI to be reliably used by an LLM, it must be deterministic. The CLI should act as a 'small sharp instrument' that provides the same response every time a command is given, leaving the non-deterministic role to the LLM [42:00].

Technical details

  • Agentic Workflow Design 0s

    The goal is to adapt an interactive CLI (e.g., Barista 9000) so that agents can follow complex decision trees, which is superior to simple script automation [0:00].

  • Terminal State Management 2591s

    Using `tmux` sessions allows for key sending and capturing terminal state, enabling agents to manage multiple, long-running tasks and communicate across different sessions [25:51].

  • Structured Communication 2828s

    IPC side channels are recommended as an upgrade from screen scraping. They allow the CLI to expose structured JSON output, providing machine-readable data that agents can reliably parse, rather than relying on visual inference [28:28].

  • Context Injection 3100s

    This technique involves providing explicit context, constraints, and options (e.g., 'low on oat milk,' 'only two gallons left') to the agent, allowing the CLI to handle scenarios that are not visible in a standard human-facing flow [31:00].

Mentioned resources

  • Barista 9000 (CLI Example)
  • PayPal cafe (Repository)

Channel & topics

Watch on YouTube · Back to latest

This independent, AI-assisted summary is provided for commentary and informational purposes. It may contain errors or omit important context. Please watch the original video for the creator's complete presentation. Video, thumbnail, and related copyrights belong to their respective owners.