Topic

CLI Development

All digests tagged CLI Development

How to go from your agent's traces to a fine-tuned model in one workflow thumbnail

· 9:01

How to go from your agent's traces to a fine-tuned model in one workflow

This walkthrough introduces LangSmith Fine-Tuning and the SmithTune CLI, providing a single, end-to-end workflow to convert agent traces (trajectories) into custom, fine-tuned models. The process involves dataset creation and preparation from LangSmith trajectories, training using providers like Fireworks or Baseten, and subsequent evaluation, all managed through the SmithTune CLI. The overall workflow is: Create $\rightarrow$ Prepare $\rightarrow$ Plan $\rightarrow$ Train $\rightarrow$ Evaluate $\rightarrow$ Deploy.

Key takeaways

  1. Supervised Fine-Tuning (SFT) Purpose

    SFT teaches a model desired behavior (e.g., tool selection, workflow adherence) using 'golden examples' derived from agent traces, improving task accuracy and tool reliability.

  2. Trajectory Format Importance 0:01

    The LangSmith trajectory format is critical because it provides a detailed reconstruction of the agent's context, including tools available at each turn, which is necessary for post-training jobs.

  3. SmithTune Workflow Overview 0:02

    The process starts by pulling trajectories from a LangSmith tracing project, defining a task-specific rubric, having a model council judge the traces, and then pushing the approved traces back to LangSmith to form a training dataset.

  4. Training and Evaluation 0:07

    After preparing the dataset (specifying provider, base model, and splits), the user runs `smithtune plan` to review settings, followed by `smithtune train` to execute the job. Evaluation compares the fine-tuned model against the base model on held-out test data.

  5. Deployment 0:08

    If results meet quality targets, `smithtune deploy` is used to serve the tuned model and connect it to the application. Otherwise, the process iterates by refining examples or training settings.

Watch on YouTube Full article

How to set up Herdr for multi-agent coding (full guide) thumbnail

· 28:40

How to set up Herdr for multi-agent coding (full guide)

This guide details setting up Herder, a tool described as the 'meta' for multi-agent coding, allowing developers to manage and orchestrate multiple AI coding agents and projects within a persistent terminal environment. The setup emphasizes creating isolated 'spaces' for different projects, integrating various AI model harnesses (e.g., Grock, Codeex, Claude), and optimizing the workflow using advanced CLI tools like zoxide, Neovim, and Lazygit. The core benefit is achieving a single, persistent interface for complex, multi-agent development cycles, minimizing context switching and session loss.

Key takeaways

  1. Persistent Session Management

    Herder allows developers to maintain persistent terminal sessions (spaces) that survive terminal closures, similar to T-Mix, ensuring continuous work history and state for CLI-based coding tools.

  2. Agent Orchestration and Delegation

    The Herder skill enables agents to communicate and delegate tasks across different sessions and models (e.g., using Claude to review code started by Grock), providing full transparency into the multi-agent workflow.

  3. Customization via config.toml 20:32

    All aspects of Herder—including colors, spacing, and keyboard shortcuts—can be customized using the `config.toml` file, which can even be configured by an AI agent.

  4. Optimizing Navigation and Workflow

    Integrating tools like zoxide for faster folder navigation and Lazygit for Git status review allows the entire development process to be contained within a single, optimized terminal interface.

Watch on YouTube Full article

The Dark Arts of Web Automation: Teaching Agents to Use Websites Like Humans — Corey Gallon, Rexmore thumbnail

· 21:38

The Dark Arts of Web Automation: Teaching Agents to Use Websites Like Humans — Corey Gallon, Rexmore

This talk details advanced web automation techniques for AI agents to interact with websites that actively resist bots. The core methodology involves treating the agent as a 'meat bag with a mouse,' leveraging the Chrome DevTools Protocol (CDP) through a Command Line Interface (CLI). Automation is structured around a 'Sense, Act, Verify' loop and progresses up a three-rung 'Meatbag Ladder'—moving from simple API calls to simulated human input (jitter, overshoot)—to defeat modern security measures like Cloudflare Turnstile and reCAPTCHA v2.

Key takeaways

  1. CLI vs. MCP for Automation 3:30

    While capability is comparable (both achieved tasks 83% of the time), a CLI approach significantly outperforms an MCP server in speed, reuse, and cost. Specifically, a CLI sequence can be programmed once and reused infinitely without model calls, making it faster and up to 75 times cheaper in token cost than repeated model interaction.

  2. The Sense-Act-Verify Loop 9:07

    Effective automation requires a continuous loop: Sensing (via DOM, accessibility tree, or screenshot), Acting (clicking/typing), and Verifying (checking network traffic or screen state). This process must be repeated until the desired action is confirmed.

  3. The Meatbag Ladder Methodology 10:38

    Web resistance requires escalating techniques. Rung One uses synthetic JavaScript clicks (API-like). Rung Two employs real CDP input events, which the page recognizes as trusted inputs. Rung Three simulates full human behavior, including jitter and deliberate overshoot, to bypass advanced bot detection.

  4. Solving reCAPTCHA v2 18:18

    The final challenge (reCAPTCHA v2) is solved by splitting the work: deterministic code handles the rapid, repeatable actions (trusted clicks, iframe piercing), while a specialized AI agent provides the 'eyes and brain' to interpret visual challenges (e.g., identifying specific objects in a grid).

Watch on YouTube Full article