Skip to content

In development. Expect rough edges and changes. The source code is not public yet.

Hugging Face 14 min read Case study mediumAdept

Designing the hf CLI as an agent-optimized way to work with the Hub

Hugging Face rebuilt its hf CLI to serve both humans and coding agents. It detects agents via environment variables like CLAUDECODE and CODEX_SANDBOX and switches to untruncated, ANSI-free TSV output, sends hints and errors to stderr, fails fast instead of prompting, and supports idempotent retries, --dry-run and consistent resource+verb commands. In a benchmark of ~1,000 graded runs across 18 Hub tasks on Claude Code (Sonnet 4.6) and Codex (GPT-5.5), agents hand-rolling curl or the Python SDK used 1.3-1.8× more tokens overall, and up to 6× on multi-step tasks. On Sonnet they also succeeded less often (84% vs 94%) and falsely reported success more often. A generated skill file covering the full command surface adds a further small reduction in tool calls.

Assumes: command-line toolscoding agentsHugging Face Hub basics

Related posts

  • Agent experience and agent-led growth: a chat with Caelean Barnes

    Mux easyNovice

    Coding agents like Claude Code and Codex increasingly choose which developer tools get adopted, and Gauge measures that choice by running agents in sandboxes, checkpointing sessions, and testing variants of prompts, docs, skills and CLIs against success criteria over many trials. Technical documentation, especially framework-specific setup guides that match the agent's codebase, drives tool selection more than marketing content. Small wording changes have large effects: turning Clerk's "claim your key" prompt into an error roughly tripled CLI account creation, and rephrasing a skill-install suggestion as "verify you have the skill installed" stopped agents from treating it as prompt injection. Detailed, actionable error messages and CLIs with well-defined commands tend to work better for agents than static skill files, which are hard to update.

  • Agents hate friction: early thoughts on building for agents

    ClickHouse easyNovice

    Tools designed with good human developer experience (CLIs, SDKs) work with agents but often only adequately, because agents use them differently and abandon products when they hit friction. In ClickHouse's testing with model/harness combinations given varying context, agents have given up after around 30 failed attempts and switched to another database. The author proposes dimensions for measuring agent experience: steps to completion, error messages that enable self-correction, run-to-run consistency, context and token efficiency, and reusing familiar CLI patterns like gh or kubectl. Adding actionable hints to errors is called the lowest-hanging fruit, with the caveat that these lessons may shift as models improve.

  • How we make AI coding more cost efficient without sacrificing task quality

    GitHub Engineering mediumAdept

    GitHub Copilot cut agent costs by optimizing for whole-task outcomes rather than per-tool-call token counts, after finding that aggressive shell-output compression (RTK) made agents reread or rerun commands and raised end-to-end cost. Four changes were validated with offline benchmarks and online A/B tests. They were selective output compression that preserves source-like output such as git diff and keeps a recovery path (5.5%), removing line-number prefixes from the view tool (3.1%), a meta-prompted task-tool prompt saving about 1,300 tokens per turn (2.9%), and batching background-task completion results to avoid retrieval turns (2.3%). The prompt rewrite initially serialized parallel agents, which shows that prompt behaviour needs regression tests and that savings must be measured in each workflow where a change ships.

  • Agent-driven development in Copilot Applied Science

    GitHub Engineering mediumAdept

    A Copilot Applied Science researcher built eval-agents, a set of Copilot SDK-based agents that automate analysis of coding-agent trajectories from benchmarks like TerminalBench2 and SWEBench-Pro, and developed it primarily through coding agents. Three principles made this work: conversational, verbose prompting in plan mode; continuous refactoring, documentation and dead-code cleanup so the repo is easy for agents to navigate; and a "blame process, not agents" approach backed by strict typing, linters, and human-only contract tests that prevent agents from rewriting regression tests. With this setup five contributors added 11 agents and four skills in under three days, using a loop of /plan, /autopilot, automated Copilot Code Review iterations, and human review, plus weekly agent-run audits for missing tests, duplication and doc gaps.

  • Building Your Own AI Agent

    Kogan.com Dev Blog easyNovice

    A coding agent is essentially a few hundred lines of boilerplate running an inference loop: send the prompt and conversation history to an LLM, print direct answers, and when the model emits a tool-use signal, execute a local function and feed the result back. Drawing on Geoffrey Huntley's DataEngBytes 2025 talk, five primitive tools (read, list, bash, edit, and ripgrep-based search) are enough for an agent to create, run and revise a Node.js FizzBuzz script. The broader argument is that engineers should become producers of agentic automation for pipelines, CI/CD and their own workflows rather than fear it.

The quest for software engineering knowledge.

Look:
Layout: