This talks about harness, context, evals and RL Environments
Agent Harness: This involves engineering systems around model intelligence. There are 3 sides of same problem: what wraps model, what goes in the window, how we know it works:
- Harness: what wraps the model
- Context: what does in the window
- Evals: training data for the harness
If you are not the model you are the harness (Agent = Model + Harness). Let’s talk about some Harness primitives, each one patches a specific model deficiency:
- File System: Non Durable State
- Bash + Code: No general purpose action
- Sandbox: unsafe execution at scale
- Sub agents: context contamination
- Middleware: no deterministic interventions
Why is a Harness so Important ?
Same Model with different harness, why don’t they get the same score. We pay companies for compute (in the forms of tokens to rent & run their proprietary LLMs) .
Now the coding harnesses like Codex & Claude Code that they provide abstracts a lot of what it does under the hood and how it routes calls to the LLM models which limits our control over the models.
Like a harness used in rock climbing to anchor to a stable point so that we don’t drift off, similarly an agent harness is everything around model which grounds it to a stable environment.
It Includes: Tool Registry, Model, Context Management, Guardrails, Agent loop
Ex: BrowserUse Harness for Hacker News: Go to Hacker news using the playwright browser and give the agent harness tools to interact with browser session and system prompt to carry out task
Model Harness Fit:
Harness is part of the model’s effective parameters. Same operations, different vocabs, backed in by post training
3 Consequences:
- No model agnostic agent: honest version, per model harness you pick a product not a model
- Mid chat model swaps break: transcript OOD, cache miss, tool surface mismatch, all at once
- Matched pair shifts: yesterday’s load bearing scaffold is today’s dead weight
Primitives are derived, not invented. Match the pair: harness = model and scaffolding goes stale, delete code. Now we can add primitives and watch failures fix:
- tool result clearing: fix output bloat
- loop detection: break out of doom loops
- sub agent dispatch: protect parent context
Context Rot: Accuracy declines with input length (frontier models break on a trivial copy task as input grows).
Context is finite, in performance not just tokens (n tokens = n2 pairwise relationships, every token costs attention budget). So in principle use the smallest set of high signal tokens since Context has diminishing marginal returns.
Right altitude: system prompts not too rigid, not too vague
- brittle: hardcoded if/else
- goldilocks: specific behaviour, flexible judgements
- vague: be helpful, be safe
Long horizon strategies:
- compaction: used in conversational flow. Ex: summary-then-continue
- note taking: used when iterative milestones. Ex: Notes[dot]md and scratchpad
- sub agent: parallel exploration. Ex: clean context per branch
Evals: Training data for harness improvements since harness + evals + harness engineering lead to a better agent (same loop as supervised learning, gradient flows into the harness)
Mirage of Generic Metrics: MMLU, HELM, BERTScore, these don’t tell you if your product works, you need custom evals catered towards your product.
Critique shadowing: Hamel husain’s process of building product evals
- Find THE principal domain expert
- Build diverse dataset (features × scenarios × personas)
- Pass / fail + detailed critique
- Fix obvious agent errors
- Build LLM judge, iterate to alignment
- Error analysis at scale
LLM Judgment alignment: diff splits than ML, small train, big test
The harness flywheel:
Build an aligned LLM judge:
- Synthesize 20 diverse queries for company-research agent
- Hand-label pass / fail with critiques
- Train / dev / test split — write judge v1 (no few-shot)
- Iterate to v2 with few-shot, lock and test
- Cluster failure modes → harness backlog
Three Takeaways:
- Agent = Model + Harness: harness is part of the model’s effective parameters
- Context is finite — in performance. smallest set of high-signal tokens, JIT > pre-load
- Evals are training data: binary > Likert, aligned LLM judge, the flywheel never ends
RL Environments for LLMs:
Environments are synthetic data engines, RL trainers and eval harness the same artifact, three jobs. Thus same environment (same artifact) can be used for all of these 4 use-cases:
- Evaluation (run rollout, average rubric)
- RL training (rubric scores, become rewards)
- Synthetic data generation (keep high rubric rollouts)
- Agent harness experimentation (swap models, swap scaffolds)
Dataset: Task Inputs usually with ground truth or rubric
- GSM8K — grade-school math
- HumanEval — coding problems with tests
- τ-bench — customer service dialogues
- SWE-bench — real GitHub issues
- BrowseComp — web research tasks
Build it once. Use it four ways. Now lets revise how RL works where the goal is to learn a policy that maximises cumulative reward. Everything in modern LLM RL training is a special case of this loop.
But how does classical RL translate to RL in LLMs
Why verifiability equals unhackability ?
The reward function has nothing to manipulate expect the actual capability you want
But why study about environments now, since closed labs are racing to build proprietary envs.
Ex: for INTELLECT-3
- Released: 26 November 2025
- Architecture: 106B Mixture-of-Experts
- Base model: GLM-4.5-Air
- Compute: 512 NVIDIA H200 GPUs · ~2 months
- Stack: Verifiers + Environments Hub + prime-rl
Verifiers:
Built by Prime Intellect (github[dot]com/PrimeIntellect-ai/verifiers), it is an open source Python framework for training and evaluating AI models using environments, tools and reward functions.
Think of it as infrastructure that teaches an AI agent how to perform tasks and measures whether it performed them correctly.
Imagine you want to train an AI agent that can solve Python programming problems. You need to:
- Give the model a programming question
- Let it generate code
- Execute that code
- Check whether the code passes the test cases
- Give the model a score based on its performance
- Use that score to improve the model through reinforcement learning (RL)
Core Abstractions of Abstraction:
- SingleTurnEnv: One prompt, one response
- MultiTurnEnv: Iterative Dialogue
- ToolEnv: Native tool calling
- CodeEnv: Code Execution
- Rubric: Composable scoring
- Parser: Structured Extraction
OpenEnv:
OpenEnv is an open-source framework for creating and running isolated environments in which AI agents can interact with the real world through standardized APIs.
It is developed through collaboration between Meta and Hugging Face, and was presented at the PyTorch Conference on 23 October 2025.
The easiest way to understand it:
Imagine you build an AI agent that needs to interact with a computer, execute code, use a browser, or operate a simulated environment.
You need a controlled place where the agent can:
- Take an action
- Observe what happened
- Take another action
- Reset the environment
- Eventually finish the task
OpenEnv provides infrastructure for building these environments. The Environments Hub is a public registry (like a pip for environments) so every published env can be evaluated, used as a data engine, or trained on.
So to summarise the main points:
- same model, different harness leads to different results so model harness fit is important
- Environment = dataset + rollout + rubric (3 pieces)
- Same artifact: eval, training, data , harness (Build once, use 4 ways)
- Rubric brittleness is the #1 footgun (parse first, score second)
- Verifiable rewards are unhackable (everything else, you fight)
- Multi turn is where the real RL lives (single turn is for benchmarks)