{"slug": "bring-your-own-harness", "title": "Bring Your Own Harness", "summary": "A developer has created Casper, a single-file coding agent that runs with a single curl command and requires no installation, supporting API keys from OpenAI, Anthropic, or Google. The tool is designed for quick, temporary access to a coding agent on any machine, such as a VM or Raspberry Pi, without the overhead of installing a full binary. Casper executes commands directly, so users are advised to only run it on machines where they are comfortable granting that level of power.", "body_md": "# Bring Your Own Harness\n\nEvery so often, you access some random machine: the VM hosting a silly side project, the Raspberry Pi running a toy robot, a friend’s laptop.\n\nInstalling a coding agent there is certainly possible, and sometimes worthwhile. But should you really spend the time to install, log in, and manage your authentication once you are done with your task, just to ask Claude how to restart a system daemon? Maybe you shouldn’t. Maybe you should Bring Your Own Harness.\n\n## Just two loops\n\nCoding agents, at their core, are quite trivial to implement: roughly two nested loops.\n\n```\nhistory = []\nwhile prompt := input(\"> \"):  # human → agent\n  history.append({\"role\": \"user\", \"content\": prompt})\n  while True:                 # agent ↔ tools\n    reply = model(history, tools=TOOLS)\n    history.append(reply)\n\n    if reply.text:\n      print(reply.text, end=\"\")\n\n    if not reply.tool_call:\n      break                   # agent is done\n\n    result = run_tool(reply.tool_call)\n    history.append({\n      \"role\": \"tool\",\n      \"tool_call_id\": reply.tool_call.id,\n      \"content\": result,\n    })\n```\n\nDo you really need to install a 200 MB binary?\n\n## Casper 👻\n\n[Casper](https://github.com/ziggy42/casper) is a coding agent that fits into\na single file. Given an API key you already have (OpenAI, Anthropic, or Google), you can\nrun it with a single command:\n\n```\ncurl -fsSL https://raw.githubusercontent.com/ziggy42/casper/main/casper.py | ANTHROPIC_API_KEY=... python3\n```\n\nOr avoid leaking the key in your shell history and provide it when Casper asks for it at runtime.\n\nIt does not support any “advanced” features, such as loading skills, confirming destructive commands, automatically compacting context, and many more. But you get a coding agent running in a couple of seconds: no installation, no nothing.\n\nIt will happily run commands, so use it only on machines where you are comfortable giving it that level of power.\n\nI’ve ended up using this little thing far more than I expected.", "url": "https://wpnews.pro/news/bring-your-own-harness", "canonical_source": "https://andreapivetta.com/posts/bring-your-own-harness.html", "published_at": "2026-07-21 21:09:20+00:00", "updated_at": "2026-07-21 21:22:16.436049+00:00", "lang": "en", "topics": ["developer-tools", "ai-agents", "artificial-intelligence"], "entities": ["Casper", "OpenAI", "Anthropic", "Google"], "alternates": {"html": "https://wpnews.pro/news/bring-your-own-harness", "markdown": "https://wpnews.pro/news/bring-your-own-harness.md", "text": "https://wpnews.pro/news/bring-your-own-harness.txt", "jsonld": "https://wpnews.pro/news/bring-your-own-harness.jsonld"}}