# Uprząż agenta

EN: **Agent harness** · id `agentharness` · aliases: harness engineering, agent scaffolding, uprąż agenta

Path: [AI Atlas](https://aiatlasgraph.com/llms.txt) › [Aplikacje LLM i agenci](https://aiatlasgraph.com/t/applications.md) › [Agenci i orkiestracja](https://aiatlasgraph.com/t/agentsnode.md) › Uprząż agenta

## Description

- PL: Pętla, narzędzia, kontekst i ograniczenia, które zamieniają wywołanie modelu w agenta wykonującego pracę.
- EN: The loop, tools, context and constraints that turn a model call into an agent that carries out work.

## In one sentence

- PL: Program wokół modelu, który decyduje, co model widzi, jakie ma narzędzia i kiedy kończy.
- EN: The program around a model that decides what the model sees, which tools it has and when it stops.

## Problem it solves

- PL: Sam model odpowiada tekstem, ale nie prowadzi długiej pracy, nie uruchamia narzędzi i nie pamięta ustaleń między sesjami.
- EN: A model alone replies with text, but does not carry long work, run tools or keep decisions between sessions.

## What it does

- PL: Jak stanowisko pracy: podaje materiały, narzędzia i reguły, a potem dopisuje wynik każdego kroku do kolejnego.
- EN: Like a workbench: it supplies materials, tools and rules, then appends each step's result to the next.

## Everyday example

- PL: Zlecasz poprawkę w projekcie. Uprząż daje asystentowi pliki, pozwala uruchomić test i zatrzymuje go, gdy test nie przejdzie.
- EN: You ask for a project fix. The harness gives the assistant the files, lets it run the test and stops it when the test fails.

## This concerns you if you…

- PL: asystent gubi się w zadaniu trwającym dłużej niż jedną rozmowę
- PL: chcesz ograniczyć, co asystent może zmienić albo uruchomić
- PL: ten sam model raz działa dobrze, a raz nie, zależnie od otoczenia
- EN: the assistant gets lost on work longer than one conversation
- EN: you want to limit what the assistant can change or run
- EN: the same model works well or poorly depending on its surroundings

## Keywords

agent harness · harness engineering · agent loop · tool dispatch · sandbox · approval policy · context compaction · long-running agents

## How it works

- PL: Uprząż składa historię, instrukcje i wyniki narzędzi w kolejne wywołanie, wykonuje żądane narzędzia i decyduje, czy pętla trwa. Osobno ustala, co model widzi, jakie działania są dozwolone i jak stan przechodzi między sesjami. Ten sam model w innej uprzęży może kończyć inne zadania.
- EN: The harness assembles history, instructions and tool results into the next call, executes requested tools and decides whether the loop continues. Separately it sets what the model sees, which actions are allowed and how state crosses sessions. The same model in another harness can finish different tasks.

## Limits

- PL: Uprząż dopasowana do jednego modelu i jednego sprawdzianu może nie przenieść się dalej. Zła kompakcja albo zbyt szerokie uprawnienia psują wynik mimo mocnego modelu. Budowa uprzęży nie zastępuje oceny na zadaniach spoza zestawu treningowego.
- EN: A harness tuned to one model and one test suite may not transfer. Bad compaction or overly broad permissions spoil results despite a strong model. Building a harness does not replace evaluation on tasks outside the tuning set.

## Key terms

- PL: **pętla agenta**: Kolejne wywołanie modelu, uruchomienie narzędzia i decyzja, czy iść dalej.
- PL: **ograniczenie działania**: Reguła, co agent może zmienić albo uruchomić.
- PL: **stan sesji**: To, co zostaje z pracy po zamknięciu bieżącej rozmowy.
- EN: **agent loop**: The next model call, a tool run, and a decision to continue.
- EN: **action constraint**: A rule for what the agent may change or run.
- EN: **session state**: What remains of the work after the current conversation closes.

## Know first

- [Prompty i kontekst (Prompting and context engineering)](https://aiatlasgraph.com/t/prompting.md)
- [Zarządzanie oknem kontekstu (Context window management: placement, compaction and context rot)](https://aiatlasgraph.com/t/contextmanagement.md)

## Subtopics (7 direct, 11 in total)

- [Budżety czasu dla agentów (Time-budgeted agent control)](https://aiatlasgraph.com/t/agenttimebudget.md): Harness and learning mechanisms that help an agent adhere to a wall-clock time budget.
- [Kompozycyjne przeszukiwanie uprzęży (Compositional harness search)](https://aiatlasgraph.com/t/harnesscomposition.md): Modular harness with pools of implementations; a contextual bandit selects combinations for evaluation.
- [Mapa dokumentów dla agenta (Repository map for agents)](https://aiatlasgraph.com/t/harnessdocs.md): The agent's entry point is a short map to versioned documents, not a full manual in one file.
- [Mechaniczne reguły środowiska agenta (Mechanical invariants for agent environments)](https://aiatlasgraph.com/t/harnessinvariants.md): Architectural and style invariants enforced by tests and linters, with a repair hint in the error.
- [Przekazanie pracy między sesjami (Cross-session handoff for agents)](https://aiatlasgraph.com/t/sessionhandoff.md): Passing state between context windows through a log, a feature list and change history, not through compaction alone.
- [Uczenie uprzęży agentów (Harness learning)](https://aiatlasgraph.com/t/harnesslearning.md): Meta-learning over harness code: a proposer generates edits, reinforcement learning on execution outcomes.
  - [Adaptacja uprzęży podczas RL (Harness adaptation during agentic reinforcement learning)](https://aiatlasgraph.com/t/harnessadaptrl.md): RL in which the policy and harness adapt together based on training trajectories.
  - [Koewolucja modelu i uprzęży agenta (Weight-harness co-evolution)](https://aiatlasgraph.com/t/weightharnesscoevo.md): A single policy acts as proposer and reflector; harness edit logs train its weights.
  - [Rekurencyjna uprżąż z rewizją wsteczną (Recurrent harness with backward revision)](https://aiatlasgraph.com/t/reharness.md): A harness that adapts textual state by reading and writing reflections, then revising them from the outcomes of their downstream use.
  - [Skalowanie uprzęży w agenticznym RL (Harness-diversity scaling for agentic reinforcement learning)](https://aiatlasgraph.com/t/harnessscaling.md): Scaling agentic RL by training on diverse harness configurations instead of one fixed one.
- [Zgodność intencji z wykonaniem narzędzia (Tool-call intent–execution correspondence)](https://aiatlasgraph.com/t/intentexecution.md): The property that the action actually executed by a tool matches the action denoted by the call under the tool contract.

## Related topics

Untyped, symmetric "see also" links.

- [Autor i recenzent (Maker–checker review)](https://aiatlasgraph.com/t/makerchecker.md)
- [Orkiestracja subagentów (Subagent orchestration)](https://aiatlasgraph.com/t/subagents.md)
- [Sterowanie przed pierwszą edycją kodu (Pre-edit planning intervention for coding agents)](https://aiatlasgraph.com/t/pause.md)
- [Zarządzanie oknem kontekstu (Context window management: placement, compaction and context rot)](https://aiatlasgraph.com/t/contextmanagement.md)

## Sources

- [Effective harnesses for long-running agents](<https://www.anthropic.com/engineering/effective-harnesses-for-long-running-agents>) `anthropic-long-harness-2025` · by Anthropic · sponsored
- [Harness engineering: leveraging Codex in an agent-first world](<https://openai.com/index/harness-engineering/>) `openai-harness-2026` · by Ryan Lopopolo, OpenAI · sponsored

---

AI Atlas revision 122 (2026-10-30) · HTML: https://aiatlasgraph.com/t/agentharness · index: https://aiatlasgraph.com/llms.txt · everything: https://aiatlasgraph.com/llms-full.txt · updated 2026-10-30
