API¶
The names below are the complete top-level API exported from harness for the
current release. Implement protocol boundaries in deployment code and use the
records and helpers to preserve the shapes consumed by the Agentic Loop.
Runtime and context¶
API |
Role |
|---|---|
|
Compose one Session and run instruction-driven Tasks |
|
Hold Resident, Refreshed, and Accumulated context |
|
Provider-neutral model boundary consumed by the loop |
|
Normalized model text, reasoning, stop reason, and Tool Calls |
|
One provider-neutral model-selected Tool request |
|
One completed blocking Tool execution and its emitted events |
|
Compose deterministic pre-execution and evaluator post-execution behavior |
|
Build an observability snapshot of one model request |
|
Closable deployment resource owned by one Harness |
Configuration and compaction¶
API |
Role |
|---|---|
|
Invalid trusted runtime configuration |
|
Validate Harness-owned configuration sections and invariants |
|
Typed Accumulated-context budgets |
|
Replace an older Accumulated prefix with a bounded checkpoint |
Tools and MCP¶
API |
Role |
|---|---|
|
Protocol implemented by every executable Tool |
|
In-process Tool with explicit JSON Schema and optional post-condition |
|
Proxy for a Tool discovered from a trusted MCP process |
|
Register, validate, describe, and execute one flat Tool set |
|
Callable type for functions that add Tools to a registry |
|
Minimal discovery, call, and close boundary for MCP clients |
Provider constructors and adapters live in the explicit harness.models
submodule. For example, import build_model with
from harness.models import build_model.
Observation and safety¶
API |
Role |
|---|---|
|
Current visual and clearance evidence for one model decision |
|
One named encoded image or HTTP(S)/data URL |
|
Forward, backward, left, and right obstacle clearance in metres |
|
Capture current evidence before a model decision |
|
Restricted context surface available to an Observation provider |
|
Replace the current Observation and emit a bounded public event |
|
Render typed Observation data for provider adapters |
|
Capture fresh four-direction clearance without exposing a Tool |
|
Refresh clearance and constrain supported base motion |
|
Protocol for deterministic interception before execution |
|
Rewritten call, hook events, or blocked result returned by a pre-hook |
Scene Graph¶
API |
Role |
|---|---|
|
Refresh, Brief, and evaluator-confirmed update boundary for persistent world state |
|
Ref validation, relation lookup, and stored-image lookup boundary |
|
Field-selected projection of the working graph |
|
Decision-facing fields for one persistent object ref |
|
Robot pose and holding state in the Brief |
|
One typed relation to another ref |
|
Supported |
|
Render the canonical Refreshed-context text |
|
Register |
|
Empty protocol implementation for non-robot or standalone Tasks |
Evaluation¶
API |
Role |
|---|---|
|
Per-Tool post-condition and matching post-execution evidence |
|
Independent outcome-judgment boundary |
|
|
|
Typed status, evidence, and failure cause |
|
Resolve a Tool |
|
Hidden adapter that exposes the evaluator through the shared Tool boundary |
|
Reference multimodal evaluator over any |
|
Malformed model-generated evaluator verdict |
Memory and Task Notes¶
API |
Role |
|---|---|
|
Task-start, in-task, and task-end Memory lifecycle boundary |
|
Task-local working-record boundary used by the loop |
|
Goal, phase, and compact Tool-result timeline with optional file mirror |
|
Typed completed or in-progress notes supplied to consolidation |
|
File-backed Task Notes, durable Memory, and Tool Experience |
|
Controlled |
|
One candidate cross-task entry for |
|
|
|
One candidate lesson keyed by Tool and outcome |
|
Typed pair of Memory entries and Tool Experience entries |
|
Extract durable candidates from completed Task Notes |
|
Reference model-backed consolidation implementation |
|
Summarize one Tool ledger for its Tool Definition |
|
Reference model-backed Tool Experience summarizer |
|
Task Notes without an operator-facing mirror file |
|
No-persistence implementation used by standalone Tasks |
Embodiment Profile¶
API |
Role |
|---|---|
|
Validated stable body-specific Markdown document |
|
Canonical three sections and seven required item names |
|
Resolve the configured deployment-owned profile path |
|
Load and optionally validate the selected profile |
Minimal imports¶
from harness import (
Harness,
Observation,
SceneGraphBrief,
ToolRegistry,
)
Inspect an installed signature and its annotations directly:
python -c 'import inspect, harness; print(inspect.signature(harness.Harness))'