Pipelign SoftwarePIPELIGNSOFTWARE
AI FOUNDATIONS / VISUAL GUIDE

From Prediction to Action

A visual guide to language models and agents

In this article

To understand how modern AI systems work, it helps to start with how their models learn. A language model is a vast network of calculations, loosely inspired by connected neurons, whose connections are shaped by numbers called parameters (coloquially, often called "weights"). These calculations have one purpose: given a sequence of input text, predict the next bit of text (or "token": usually about one word).

We can make the model better at predicting by tuning these numerical “knobs” through repeated practice: predict the next token, compare it with what actually came next, and make small adjustments to the weights. This broad initial phase is called pretraining.[1] The illustrative example below shows those adjustments making the observed next word, “open,” more likely.

Training: open is the target, not initially the favorite. Early illustrative probabilities favor duck at 80 percent and give open only 1 percent. Later stages favor close, then open. Comparison with the target adjusts the model's numerical settings.TRAINING · LEARN TO PREDICT THE NEXT TOKENExample textThe menu shouldopenwhen clicked.“open” is the targetText shown to modelThe menu should(what comes next?)Neural networkNext-token probabilitiesA score for every possible token.Five candidates are shown below,plus all remaining tokens.open · targetclosedisplayrespondduckall other tokensEARLY IN LEARNING1%2%3%4%80%10%Top choice: duck ≠ targetAFTER MORE TRAINING30%35%10%8%5%12%Top choice: close ≠ targetLATER IN TRAINING55%18%10%7%1%9%Top choice: open = targetCOMPARE, THEN ADJUST THE KNOBSThe actual next token was “open”.Its predicted probability determinesan error signal. Small updates changethe parameters across the network.Before an updateAfter an updateLearned numerical parametersRepeat across vast amounts of text: small updates accumulate into useful capabilities.
FIG. 1 Training compares probabilities with the observed target, even when the model favors another token: “duck,” then “close,” and later “open” in these snapshots. Each column totals 100%; the exaggerated changes illustrate the process rather than a typical learning curve.

Inference: the model in use.

A trained model produces text one token at a time.

Once trained, the model is ready for inference: producing a response from its learned capabilities, ordinarily without retraining. It works from its context, a sequence containing the input it was given and the tokens it has generated so far. By predicting what could come next, adding a selected token, and repeating, it builds a response one token at a time.[2] The context window limits how much of that sequence it can see at once.

Inference: a trained model predicts probabilities for the next token from The menu should. Select open, append it, and predict again with The menu should open. Continue with when and clicked. Each selected token extends the context for the next prediction.INFERENCE · USE THE TRAINED MODELContext (input so far)The menu shouldTrained networkLearned parameters shape the predictionNEXT-TOKEN PROBABILITIESopen55%close18%display10%respond7%duck1%all others9%Select one token. Append it. Feed it back.1The menu shouldopenNow part of the next input2The menu should openwhenNew context, new probabilities3The menu should open whenclickedContinue one token at a timeRepeat until an end-of-output signal or another stopping condition is reached.
FIG. 2 Each selected token follows the return arrow to join the input for the next prediction, with the rows showing successive trips around that loop. Words stand in for tokens, and the probabilities are illustrative.

What happens inside?

People designed the learning process without specifying every pattern the model would learn. Although we can inspect its calculations and trace some of those patterns, we cannot yet fully explain how they combine to produce each particular response.[4]

Why responses can differ

Many systems deliberately allow some randomness in token selection, so “close” could be chosen here even when “open” is the favorite.[2] This means the same prompt can produce different responses each time. Note that even the most likely response may be untrue!

More than finishing sentences.

At enormous scale, a simple training task leads to surprisingly broad abilities.

Researchers scaled this training exercise with bigger networks, far more material, and better methods. The transformer architecture helped make that growth practical by allowing much more training work to happen in parallel, though its inner workings are beyond the scope of this guide.[11]

Two chronological charts of the same public models. GPT-3 in 2020: 175 billion parameters and 300 billion training tokens. Llama 3.1 in 2024: 405 billion parameters and 15.6 trillion training tokens. DeepSeek V4 Pro in 2026: 1.6 trillion parameters and 33 trillion training tokens. Both vertical axes start at zero, with different scales.MORE LEARNED SETTINGSParameters in the whole model012trillion · linear scale175 billion2020GPT-3 [1]405 billion2024Llama 3.1 [12]1.6 trillion2026DeepSeek V4Pro [9]MORE MATERIAL TO LEARN FROMTokens processed during training02040trillion · linear scale300 billion2020GPT-3 [1]15.6 trillion2024Llama 3.1 [12]33 trillion2026DeepSeek V4Pro [9]
FIG. 3a The scale of learning has grown dramatically: larger networks, trained on far more material. OpenAI and Anthropic do not disclose exact sizes for their latest models, so their scale cannot be directly compared here.

From familiar patterns to new situations

As models became more fluent, they also learned relationships between words and ideas that could carry over to unfamiliar prompts—an ability called generalization.[1] A person can describe a particular situation, and the model can produce a plausible response even if it never encountered that exact situation during training.

A familiar curls-and-glasses character uses a phone beside a drooping plant. Prompt: My peace lily is drooping. The soil feels dry. What should I do? Illustrative response: Check below the surface. If it is dry there too, water slowly and let excess drain.PROMPT“My peace lily is drooping.The soil feels dry.What should I do?”RESPONSE“Check below the surface.If it’s dry there too, water slowlyand let excess drain.”
FIG. 3b Learned relationships connect the details of a prompt to a practical response in this illustrative conversation. It's quite possible the model was never exposed to this exact situation in its training data, but can generalize that a drooping plant may be thirsty, especially if the bulk soil is dry.

These learned relationships let a model draw on the details of an unfamiliar request or a long passage supplied as context to produce a useful response, though success is not assured.[12] The response still emerges one token at a time, with predictions informed by relationships across the input rather than only the continuation of a familiar phrase.

Code puts prediction to work.

Large language models can turn learned patterns into useful software, whose behavior we can check by running it.

Learning from examples

When a model is learning to program, it begins with the same next-token practice, applied to source code: the model predicts what comes next, and training compares that prediction with the example. Across many examples, it learns how a programming language’s keywords, names, and symbols fit together to form valid code. This syntax includes patterns such as placing parentheses around a function’s inputs, assigning a value to a variable, and writing a loop. Comments and descriptions connect those patterns to the code’s intended behavior, helping the model turn a request into a proposed solution one token at a time.[13]

Learning from results

Code also offers a powerful way to learn from results. A generated program can be compiled and run against tests that check whether it works and meets a stated requirement. These checks provide automatic feedback at scale, even though passing them does not guarantee a good program. During further training, the model tries possible solutions, the test results supply a score, or reward, and the training system adjusts its parameters to make successful outputs more likely. Because the reward comes from checking a result against a known requirement, this is reinforcement learning with verifiable rewards.[3] Its value depends on the checks: a program can pass every test and still fail in situations they do not cover.

Illustrative clockwise training loop: the task to write a program that adds every number in a list enters the language model. First, it generates candidate A on the upper right. Tests below reveal an off-by-one error and give it a score of one out of three. That reward guides a model update at the bottom. The updated model later generates candidate B on the lower left; the tests above it pass all three checks. Further rewards can continue the loop. A single update does not guarantee this correction.TRAINING TASK“Write a program that adds every number in the list.”Language modelgenerates code01 / CANDIDATE A · FIRST TRYdef add(a):total = 0for i in range(len(a)-1):total += a[i]return total02 / RUN CHECKS[] → 00 · pass[2, 3] → 52 · FAIL[2, 3, 4] → 95 · FAILREWARD SCORE1 / 3 pass04 / CANDIDATE B · LATER TRYdef add(a):total = 0for i in range(len(a)):total += a[i]return total05 / RUN CHECKS[] → 00 · pass[2, 3] → 55 · pass[2, 3, 4] → 99 · passREWARD SCORE3 / 3 pass03 / UPDATE THE MODELTest scores guide changes.
FIG. 4 Candidate A skips the final number and fails two checks. Its score guides an update; a later model output, candidate B, passes all three.

Reasoning gives prediction a path.

Reinforcement learning can encourage intermediate work that helps later predictions.

We have seen how generalization helps a model propose an idea in chat and how reinforcement learning can help it produce working code. The same foundations also help explain how models tackle difficult math and science problems, where a useful answer may require several steps.

Reinforcement learning can encourage the model to break a problem down, try an approach, and check its work. As it generates possible solutions during training, rewards guide small weight updates across many attempts, making reasoning patterns that lead to better results more likely.[3]

Like a student showing their work, a model can receive feedback on intermediate steps. In process supervision, people assess those steps and train a grader to provide similar feedback at scale.[15] Other approaches reward correct final answers without grading each step.[3] For open-ended tasks that cannot be checked automatically, human judgments can guide training too, though they provide a less exact measure.[14]

First, training: a worked example for 36 passengers in 8-seat vans gets two intermediate steps right but concludes with too few vans. Illustrative step feedback yields a score of 2 out of 3; scores across many attempts guide weight updates. Then, inference: three snapshots of the same context for 42 passengers retain earlier reasoning while adding a step, leading to the answer of 6 vans.01 / DURING TRAININGExample: learning from graded steps.36 passengers. Each van seats 8.How many vans do we need?14 full vans seat 32 people.24 people still need seats.3So book 4 vans.Those 4 still need a van!Grade the workSplit into groups ✓Keep the remainder ✓Include everyone ×2 / 3Simplified example scoreAdjust weightsSmall changes makehigher-reward workmore likely.Repeat across many training problems02 / AT INFERENCEEach new step joins the context for what follows.42 passengers · 8 seats per van5 vans seat 40 people.42 passengers · 8 seats per van5 vans seat 40 people.2 people still need seats.42 passengers · 8 seats per van5 vans seat 40 people.2 people still need seats.They need one more van.Answer: Book 6 vans.The same context window over time: earlier notes stay; the highlighted step is added.
FIG. 5 The invented grading marks and 2/3 score make process supervision visible in this simplified example; reasoning training can also reward final answers without grading each step. At inference, generated reasoning tokens form a scratchpad that supplies context for later predictions and need not be shown to the user.

What if the model could ask for help?

A lookup, calculation, or action can help it proceed; the harness makes that possible.

When a problem calls for a fact, an exact calculation, or an action, a model can learn to request that help and continue with the result. Training provides opportunities to practice these requests, and reinforcement learning can reward successful attempts.[16]

Turning a generated request into a completed step requires software around the model to run the lookup or calculation, carry out the action, and bring the result back for another model call.

The harness connects text to action

This surrounding software, called the harness, supplies function definitions in the model’s context so it can see each function’s name, purpose, and required inputs.[5]

On each model call, the output takes shape one token at a time and may become either a final answer or a function call: a specially formatted request naming a function and its input values, or arguments. Producing that request does not execute the function; execution belongs to the harness.

The harness passes the task and a function definition into the model's context. The task is to transport 42 passengers using shuttle-2 vans. The definition names lookup_vehicle, describes a seating-capacity lookup, and requires a text input called vehicle_id. Through the same reasoning and next-token prediction, the model generates formatted text requesting lookup_vehicle with vehicle_id set to shuttle-2. The harness executes the function; the model's text only requests it. The request format and reasoning are illustrative.THE HARNESS SUPPLIES THE MODEL’S CONTEXTUSER’S TASKPlan transport for 42 passengersusing shuttle-2 vans.Other functions may be defined here too.FUNCTION DEFINITIONlookup_vehicleLook up a vehicle’s seating capacity.Required input: vehicle_id (text)Same reasoning and next-token predictionILLUSTRATIVE REASONING“Before I can choose the numberof vans, I need their capacity.”SelectFORMATTED TEXT · FUNCTION CALLlookup_vehicle(vehicle_id: "shuttle-2")The model outputs a request. The harness executes the function.
FIG. 6 When the model requests a function call, the harness executes it and supplies the result in another model call. This readable illustration simplifies the exchange; exact call formats vary.

The harness checks each request, executes the permitted function, and prompts the model again with the result in context. Further function requests keep this prompting loop going until the model returns a final answer or hands control back.

A brain needs a way to act.

A coding assistant uses a harness to turn model requests into real actions.

In a local Claude Code session, the language model acts as the assistant’s “brain,” interpreting your request and choosing the next response or function call. The harness supports that work by gathering context, supplying function definitions, checking requested actions, and returning results for the next model call.[18]

The harness opens files or runs code, then supplies their contents or outcomes in a later prompt.[5] The figure shows a common setup in which it runs on your computer and the model is hosted remotely.

A local harness supplies context to a separate model service and receives generated text. The context contains the task, function definitions, history, file contents, code output, and other results. The model does not directly open files or run programs; it can reason about what the harness includes. The harness checks requests, invokes functions, and returns outcomes to context along a separate left-hand path. An illustrative lookup returns eight seats. Separate locations are optional.YOUR COMPUTERMODEL SERVICEHarness softwareCONTEXT FOR EVERY CALLTask + function definitions + historyFile contents + code output + resultsRead the responseCheck permissions; run a functionor return the final answer.AVAILABLE FUNCTIONSLookup8 seatsFilesRun codeLanguage modelHosted remotely hereReasoning + predictionMODEL INPUTcontext supplied as tokensMODEL RESPONSEgenerated textanswer or function requestSeparate locations are optional.File contents and execution results become part of what the model can read.
FIG. 7 The model has no direct connection to your files or running programs. The harness adds selected file contents and execution results to the context it supplies. The lookup and eight-seat result are illustrative.

So, what is an agent?

"Agent" is a broad term for software that can act autonomously toward a goal. Here, we mean a software assistant that pursues a goal on your behalf, with a model choosing next steps and a harness carrying them out.[17]

Combining a reasoning model, tools, and a harness that builds context dynamically makes this approach adaptable to many kinds of work. A coding agent, for example, can inspect a project, plan a repair, edit files, and use test results to decide what to do next. Shared instructions, the task’s scope, and evolving evidence give each run its focus.[18]

A bug report becomes a repair.

Reason, request an action, use the result—and continue.

Imagine telling Claude Code that the account menu stays open when you press Escape, but it is supposed to close. To begin the repair, the harness combines your report with project guidance and definitions for its tools—the callable functions that let it work with files and the terminal.[18]

Project guidance can come from CLAUDE.md, an ordinary Markdown file that the harness recognizes by convention. When Claude Code starts in a project directory, it discovers this guidance and includes the text in the context for the first model call.[20] Related conventions, such as SKILL.md, can supply additional guidance as needed, though their details are beyond this example.[23]

From there, the model may ask the harness to search, read, edit, or run shell commands, using each result to guide the next step.[5] The whole exchange, from your request to a reply or handoff, is a turn and can contain many model calls. The following section unfolds the context growing across those calls.

Illustrative bug-fix loop. A user reports that the account menu stays open on Escape. CLAUDE.md says to run unit tests with npm test and add a regression test for bug fixes. The harness assembles these inputs, Read, Edit, and Bash definitions, conversation, and results into context for the language model. The model reasons and outputs either a tool call or a final answer. Tool calls return to the harness, which searches through Bash, reads or edits the component and test, and runs npm test. File contents, edit results, and failing then passing unit-test output return through the harness into the next model call. The final reply explains the repair and passing tests.USER REPORT“The account menu stays open on Escape.Can you diagnose and fix it?”CLAUDE.mdRun unit tests: npm testAdd a regression test for bug fixes.HARNESS · PROMPTAssemble contextBug report + project instructionsTool definitions + conversationLatest file contents and resultsLANGUAGE MODELReason from contextInterpret the evidence.Choose what to do next.Generate an output.PromptHARNESS · REPLY“Fixed Escape-to-close.Added a regression test.Unit tests pass.”AnswerTool callHARNESS · TERMINAL + FILESYSTEMBashgrep -R "AccountMenu" src/Read / EditAccountMenu.tsx + its testBashnpm testRESULT RETURNSEvidence for the next callFile content · edit resultUnit tests: FAIL, then PASSResultAdd result
FIG. 8 File contents, edit results, and unit-test output provide context for each successive model call. The following section follows that accumulation across the entire turn.

The context grows with the work.

One bug-fix turn can prompt the model again and again.

As the repair unfolds, the model’s view expands from the initial instructions, project guidance, function definitions, and user report to include the requests and results that follow. After each function returns, the harness prompts the model afresh with the context accumulated so far. In this example, the growing sequence fits within the model’s bounded context window.[21]

Role / sourceAccumulating contextNew prompt
HARNESS · INSTRUCTIONSYou are a coding assistant. Follow project guidance. Use the available functions to inspect and change files. …
PROJECT · CLAUDE.mdRun unit tests: npm test. Add a regression test for bug fixes.
HARNESS · FUNCTIONSRead(path) · Edit(path, change) · Bash(command). Descriptions and schemas omitted here.
USERThe account menu stays open when I press Escape. Can you diagnose and fix it?PROMPT 1
ASSISTANT · THINKING*[Earlier reasoning about the Escape handler, if retained in this call.]
ASSISTANT · TEXTI’ll find the menu code and check its Escape behavior.
ASSISTANT · TOOL CALLBash("grep -R 'AccountMenu' src/")
TOOL RESULTsrc/AccountMenu.tsx · src/AccountMenu.test.tsxPROMPT 2
ASSISTANT · TOOL CALLRead("src/AccountMenu.tsx")
TOOL RESULTEscape handler clears focus but leaves the menu open. …PROMPT 3
ASSISTANT · TOOL CALLBash("npm test")
TOOL RESULTEscape closes menu: FAIL · other unit tests: PASSPROMPT 4
ASSISTANT · TOOL CALLEdit("src/AccountMenu.tsx" and its regression test)
TOOL RESULTEdit applied to the handler and test.PROMPT 5
ASSISTANT · TOOL CALLBash("npm test")
TOOL RESULTEscape closes menu: PASS · other unit tests: PASSPROMPT 6
New tokens generated by the model · assistant to user“I fixed the Escape handler, added a regression test, and ran npm test. The unit tests pass.”
FIG. 9 This illustrative agent turn presents the message sequence as readable text. Each numbered marker is a new prompt to the same model, containing the context through that row, with long instructions and file contents abridged. The reply below is generated after prompt 6 and is outside its input.[5]

The shaded reasoning row represents a separate generated block rather than a verbatim thought trace. These blocks use tokens, although retention of earlier reasoning in later calls depends on the model and settings.[22] Each call generates new tokens until the model requests another function or returns a final reply.[2]

In summary: from prediction to action.

A stateless model becomes part of an ongoing task through the harness.

So, in summary, the core operation for agentic AI is next-token prediction. It can produce replies, reasoning, or tool requests. The model itself is stateless across inference calls: it does not independently remember earlier exchanges or actions. Each call uses learned parameters and the context supplied for that call.[1][3][21]

Continuity comes from the harness and its stored state. It preserves conversation history, tool results, and saved memory, then supplies relevant material as context for the next call. Using that material does not change the model’s parameters: ordinary inference does not train the model. The surrounding software connects separate calls into an ongoing task.[7][20][21]

The system’s behavior depends on training data, the training process, and inference-time context and guardrails. Training shapes capability; the harness manages memory, tools, permissions, and checks.[14][7][17] Agents use this loop to pursue goals with some independence, whether researching, organizing information, or writing code. Their progress depends on what the system retains and provides at each step.[7][17]

A trained neural network, extended by context, tools, and guardrailsTRAININGSIMPLE COREAT INFERENCE TIMEData + training processExamples · objectives · feedbackShape learned capabilityToken predictionPredict → append → repeatContext + toolsExtend what can be doneGuardrails bound actionsResults inform the next step
FIG. 10 The harness carries history and results forward as context; the model predicts from the context it receives.

The model is stateless; the harness gives an agent memory, tools, and continuity.

Selected references

  1. [1]Brown, T. B., et al. (2020). Language Models are Few-Shot Learners.
  2. [2]Hugging Face (2026). Generation strategies.
  3. [3]DeepSeek-AI (2025). DeepSeek-R1: Incentivizing Reasoning Capability in LLMs via Reinforcement Learning.
  4. [4]Anthropic (2025). Tracing the thoughts of a large language model.
  5. [5]Anthropic (2026). How tool use works.
  6. [6]Van Aken, G. (2026). Agentic Coding: Practices and Evidence.
  7. [7]Anthropic (2025). Effective context engineering for AI agents.
  8. [8]Kimi Team (2026). Kimi K3: Open Frontier Intelligence.
  9. [9]DeepSeek-AI (2026). DeepSeek-V4: Towards Highly Efficient Million-Token Context Intelligence.
  10. [10]Kaplan, J., et al. (2020). Scaling Laws for Neural Language Models.
  11. [11]Vaswani, A., et al. (2017). Attention Is All You Need.
  12. [12]Llama Team, Meta (2024). The Llama 3 Herd of Models.
  13. [13]Chen, M., et al. (2021). Evaluating Large Language Models Trained on Code.
  14. [14]Ouyang, L., et al. (2022). Training Language Models to Follow Instructions with Human Feedback.
  15. [15]Uesato, J., et al. (2022). Solving Math Word Problems with Process- and Outcome-Based Feedback.
  16. [16]Jin, B., et al. (2025). Search-R1: Training LLMs to Reason and Leverage Search Engines with Reinforcement Learning.
  17. [17]Anthropic (2024). Building Effective Agents.
  18. [18]Anthropic (2026). How Claude Code works.
  19. [19]Anthropic (2026). Tools reference.
  20. [20]Anthropic (2026). How Claude remembers your project.
  21. [21]Anthropic (2026). Context windows.
  22. [22]Anthropic (2026). Thinking.
  23. [23]Anthropic (2026). Extend Claude with skills.

Further reading and the source collection for this paper: pipelign/agentic-ai-resources.

Glossary: models and learning.

A quick reference to the fuller explanations.

The model and its predictions

Model Training the model · Using the trained model

A learned system that maps input to predictions or outputs, with its responses shaped by its design and numerical parameters.

Language model Training the model · Using the trained model · How big are we talking?

A model that learns patterns in language and code and generates tokens from context. LLM stands for large language model.

Neural network Training the model

A model built from connected layers of calculations whose numerical settings are adjusted during training to learn useful patterns.

Transformer How big are we talking?

A neural-network design widely used for language models. It learns relationships between tokens and supports efficient training at large scale.

Parameters (weights) Training the model

Numbers adjusted during training that shape a model’s behavior. “Weights” often serves as shorthand for these learned settings.

Token Training the model · Using the trained model

A unit a model processes: often a word, part of a word, or punctuation. A sentence can contain several tokens.

Next-token prediction Training the model · Using the trained model

Estimating which token could follow the current sequence, then selecting and adding a token before repeating the process to build a longer response.

Inference Using the trained model

Using a trained model to generate an output from context, as happens each time the harness invokes the model.

Learning and solving problems

Training Training the model · Learning to write code · Reasoning through a problem

Adjusting a model’s parameters using examples or feedback so that useful predictions and behaviors become more likely.

Generalization How big are we talking?

Applying learned patterns to a new situation, such as proposing code for a request the model has not seen before.

Reinforcement learning (RL) Learning to write code · Reasoning through a problem

Training through rewards for attempted actions or solutions, using repeated feedback and parameter updates to make higher-reward behavior more likely.

Reward Learning to write code · Reasoning through a problem

A score used during training to favor desirable behavior, reflecting a correct result, a useful step, or a human preference.

Verifiable rewards Learning to write code

Rewards based on checks with clear answers, such as passing tests. Reinforcement learning with verifiable rewards is often shortened to RLVR.

Process supervision Reasoning through a problem

Feedback on intermediate steps in a solution, used to train the model or a grader that guides further training.

Human feedback Reasoning through a problem

People’s judgments about an output’s quality or usefulness, which can guide training when correctness is difficult to check automatically.

Reasoning (thinking) Reasoning through a problem · A growing model context

Intermediate work generated while solving a problem to help later predictions; some models keep these tokens separate from the user-visible answer.

Glossary: context and agents.

How information, software, and model calls work together.

Supplying the context

Prompt Learning to request help · A coding agent at work · A growing model context

Input supplied to a model: instructions, the user’s request, and any included history, function definitions, or observations.

Model call Learning to request help · A growing model context

One invocation of the model with a supplied context. Its output may include reasoning, a reply, or a request to run a function.

Context Using the trained model · A growing model context

The token sequence available for a prediction—supplied input plus tokens generated so far—which forms the model’s working view of the current task.

Context window Using the trained model · A growing model context

The limit on how much context the model can consider at once, measured in tokens.

Context engineering In summary

Designing and maintaining the instructions, information, and tool interfaces available to the model so each step has sufficient, relevant context.

Tool definition Learning to request help

The description given to the model of a callable function: its name, purpose, and expected inputs.

Arguments Learning to request help · A growing model context

The input values included in a function request, such as a file path or the command npm test.

CLAUDE.md A coding agent at work · A growing model context

An ordinary Markdown file the harness recognizes by convention. Claude Code loads discovered project instructions into its starting context before the first model call.

Working as an agent

Harness Learning to request help · The software around the model

The software around the model that assembles context, invokes model calls, handles function requests, and returns results to keep the work moving.

Agent The software around the model · A coding agent at work

Broadly, software that can act autonomously toward a goal. In this paper, a software assistant that uses a model to choose next steps and a harness to carry them out on your behalf, guided by instructions, tools, and evolving context.

Tool (function) Learning to request help · The software around the model · A coding agent at work

A callable capability exposed to the model by the harness, such as reading a file, editing code, or running a command.

Tool call Learning to request help · A growing model context

A formatted model output that requests a named function with specific arguments. The harness handles execution.

Tool result (observation) Learning to request help · The software around the model · A coding agent at work · A growing model context

Information returned after a tool runs, such as file contents or test output, that the harness can include in the next prompt.

Prompting loop Learning to request help · A coding agent at work · A growing model context

The repeating cycle of prompting the model, handling a requested action, and prompting again with the result, until a reply or handoff.

Turn The software around the model · A coding agent at work · A growing model context

The span from a user’s request to the agent’s reply or handoff, potentially containing several model calls and tool results.

Unit and regression tests A coding agent at work · A growing model context

A unit test checks a small piece of code. A regression test checks that a known bug does not return after a change.