liveBook · Manning

Code execution

Code execution is the process of running program instructions or computational operations in a computing environment.

How 3 Manning books explain it

Build an AI Agent (From Scratch)

Code execution is the running of a program or code fragment in a computational environment to obtain behavior or results.

How it is used
Uses generated programs to replace repeated agent tool calls when tasks need loops, transformations, or tool composition.
How deep it goes
Builds through Agent configuration, sandbox lifecycle, execution results, tool portability, and practical tests.
Examples
Works through daily Wikipedia reference counts and spreadsheet sales analysis.
What you can do after
Build it from scratch by adding sandbox-backed Python execution to an Agent and choosing when batching outweighs execution overhead.

Read how Build an AI Agent (From Scratch) explains code execution →

Data Pipelines with Apache Airflow, Second Edition

An execute method is the Airflow operator method that performs the operator's work during task execution.

How it is used
Places a custom operator’s task work in the method Airflow calls during a DAG run.
How deep it goes
Works through a hook-backed implementation and direct unit calls, while distinguishing those calls from live-run setup.
Examples
Uses a MovieLens ratings-to-JSON operator and a BashOperator test that asserts the result of `execute(context={})`.
What you can do after
Build it from scratch in a custom operator, then test its work with direct `execute()` calls and mocked dependencies.

Read how Data Pipelines with Apache Airflow, Second Edition explains code execution →

Reinforcement Learning from Human Feedback

Code execution is the process of running source code to obtain its computational behavior or result.

How it is used
Uses a code interpreter as a tool for precise computation, complex logic, mathematics, and reasoning-model verification.
How deep it goes
Defines execution as tool use, then traces calls, outputs, orchestration, and continued generation without detailing interpreter internals.
Examples
Demonstrates a Python Fibonacci loop that computes the 50th value and returns 12586269025.
What you can do after
Apply it via a code interpreter to compute exact results and feed those results back into model generation.

Read how Reinforcement Learning from Human Feedback explains code execution →

Related concepts

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.