Skip to main content

Crate harness_loop

Crate harness_loop 

Source
Expand description

ReAct agent loop with self-correction.

Minimal v0.0.1 implementation:

  • Applies guides once at the start.
  • Sends Context (with tools) to the model.
  • Dispatches each returned tool call via ToolRegistry.
  • Runs Sensor::SelfCorrect sensors after each action; auto-fix patches are applied directly to the world, blocking signals are fed back to the model.
  • Stops when the model returns no tool calls, or when policy.max_iters is hit.

Re-exports§

pub use learning::*;
pub use memory_layer::*;
pub use profile_guide::*;
pub use recall_layer::*;
pub use registry::*;
pub use replay::*;
pub use subagent::*;

Modules§

learning
Self-evolving learning loop for crate::AgentLoop.
memory_layer
Long-term-memory wiring for crate::AgentLoop.
profile_guide
Opt-in Guide that renders harness_core::UserProfile into the agent’s system prompt.
recall_layer
Cross-session recall wiring for crate::AgentLoop.
registry
A tiny name-keyed tool registry used by AgentLoop.
replay
Session record + replay (DESIGN.md §15 v0.2+).
subagent
Subagent: an isolated agent loop spawned from a parent.

Structs§

AgentLoop
The agent loop.

Enums§

Outcome
Where a run finished. Marked #[non_exhaustive] so future fields don’t break downstream matches — always include .. when destructuring.

Functions§

apply_patches
Apply auto-fix patches; return short descriptions of those that succeeded.
is_default_safe_fix
Audit #7: default safelist for FixPatch::RunCommand.