oharness-loop
Agent, Loop trait, and shipped loop implementations for
open-harness — the
user-facing orchestration layer.
What's in here
Agent+AgentBuilder— the top-level "I want to run an agent" entry point. Threads LLM, tools, memory, event sink, budget, critics, and a chosenLoopinto a run.Looptrait — a loop owns the turn-taking policy. Shipped:ReactLoop(featurereact, default-on) — the classic reason-act-observe loop with tool dispatch.ConversationLoop(featureconversation) — alternates assistant turns with aUserSimulator.
run_reflexion(featurereflexion) — multi-episode wrapper that threadsReflector-produced notes into the next episode viaReflectionInjector.UserSimulatortrait +ScriptedUserSimulator+LlmUserSimulator— the user-side model for conversational loops.
Quickstart — first agent in 10 lines
use ;
use FsToolSet;
use Task;
use Arc;
let agent = builder
.with_llm // impl Llm
.with_tools
.with_loop
.with_max_turns
.build?;
let outcome = agent.run.await?;
See examples/hello_scripted.rs for a runnable version. The
examples/ directory ships 11 runnable examples covering tools,
critics, budgets, replay, reflexion, custom middleware, custom
memory policies, and multi-agent conversation.
Feature flags
react(default) —ReactLoop.conversation—ConversationLoop.reflexion—run_reflexionhelper.llm-judge— forwards tooharness-critic/llm-judgeso thellm_judge_criticexample builds.
License
Dual-licensed under MIT or Apache-2.0.