Nexu releases harness-engineering-guide for AI agent runtimes
An open guide to building AI agent harnesses, covering tool execution, memory management, and multi-agent orchestration with practical Python examples.
Nexu has published the , an open-source repository providing concepts and tutorials for building AI agent runtimes. The guide defines a harness as the runtime wrapper that transforms a bare language model into an autonomous agent capable of perceiving environments and taking multi-step actions. It provides the necessary infrastructure for executing tools, managing memory, and enforcing safety boundaries that models cannot handle independently.
Components of the agentic loop and tool systems
The guide breaks down the think-act-observe cycle, including loop detection, parallel tool calls, and streaming. It details tool system implementation through registries, the MCP protocol, and both static and dynamic loading patterns.
Memory management is addressed via two-tier systems combining daily logs with long-term storage. The material includes strategies for context assembly and session management using AGENTS.md and MEMORY.md patterns to handle token budgeting and compression.
Infrastructure for sandboxing and security
To ensure safety, the guide covers the implementation of trust boundaries and permission models. It suggests using Docker and Firecracker for network isolation and filesystem restrictions to create secure sandboxes.
The repository describes a classifier-based permissions system that uses model-based classifiers to reduce approval fatigue. This approach employs a two-layer defense and four threat models to protect against prompt injection.
Patterns for multi-agent orchestration and scaling
The material outlines several orchestration patterns, such as pipeline, fan-out, and supervisor models. It describes a Leader-Worker pattern for sub-agents that utilizes file-based communication and session isolation for parallel execution.
One documented case study involves 16 parallel Claude instances coordinating via git to build a 100K-line C compiler. This process used a Ralph-loop and GCC-as-oracle bisection for coordination. Such complex setups often require specific token limit management to maintain stability.
Long-running agent design and evaluation
For agents operating over extended periods, the guide proposes a generator-evaluator architecture inspired by GANs to combat self-evaluation bias. It also introduces a two-phase harness consisting of an initializer and a coding agent to maintain a clean state via JSON feature lists.
The guide includes a side-by-side implementation comparison of several tools, including Codex, Claude Code, OpenClaw, Cline, Aider, and Cursor. It also notes that resource configuration swings can affect benchmark scores by 6 percentage points, necessitating floor and ceiling enforcement strategies.
Related reading
- Google Opens ARTEMIS AI Tool for Android Automation (Open Source)
- MiniMax Code Goes Open Source: Performance Beats Codex & Claude
- Inspo Inspo MCP Server Launches Free Open‑Source Design Agent
Sources
Related news
- PythonAnimator: AI-Driven Whiteboard Video Generation from TextAnimator is a Python-based tool that converts a single text prompt into a narrated whiteboard animation, handling scriptwriting, drawing, and voiceovers.·by shared tag
- OpenAIPython Tool uv Author Charlie Marsh Accelerates Codex CLI 25x at OpenAICharlie Marsh, creator of Python's uv package manager, joins OpenAI and immediately optimizes Codex CLI startup to near-instant speeds.·by shared tag
PythonPerplexity introduces Search as Code for agentsPerplexity launches a new search architecture where agents generate Python code to interact with the search stack, reducing latency and context window clutter.·by shared tag
PythonCodeFormer restores faces on damaged photos with Codebook Lookup TransformerNeurIPS 2022 project from NTU S-Lab balances restoration quality against identity preservation and adds colorization, inpainting, and background upscaling via Real-ESRGAN.·by shared tag
Comments
Weekly digest
The best of vibe coding, AI agents and open source — once a week, no spam.