mirror of
https://github.com/RightNow-AI/openfang.git
synced 2026-07-30 06:32:17 +00:00
Merge pull request #685 from Fail-Safe/fix/researcher-hand-defaults
fix: make heartbeat interval configurable and reduce researcher max_iterations
This commit is contained in:
@@ -161,7 +161,10 @@ provider = "default"
|
||||
model = "default"
|
||||
max_tokens = 16384
|
||||
temperature = 0.3
|
||||
max_iterations = 80
|
||||
max_iterations = 25
|
||||
# Researcher makes long LLM calls; 30s (kernel default) causes false-positive
|
||||
# recovery triggers. 120s matches typical deep-research call latency.
|
||||
heartbeat_interval_secs = 120
|
||||
system_prompt = """You are Researcher Hand — an autonomous deep research agent that conducts exhaustive investigations, cross-references sources, fact-checks claims, and produces comprehensive structured reports.
|
||||
|
||||
## Phase 0 — Platform Detection & Context (ALWAYS DO THIS FIRST)
|
||||
|
||||
@@ -293,6 +293,11 @@ pub struct HandAgentConfig {
|
||||
pub system_prompt: String,
|
||||
#[serde(default)]
|
||||
pub max_iterations: Option<u32>,
|
||||
/// Heartbeat interval in seconds for autonomous agents. Overrides the
|
||||
/// AutonomousConfig default (30s), which is too aggressive for agents
|
||||
/// making long LLM calls. Omit to use the kernel default.
|
||||
#[serde(default)]
|
||||
pub heartbeat_interval_secs: Option<u64>,
|
||||
}
|
||||
|
||||
fn default_module() -> String {
|
||||
|
||||
@@ -3320,6 +3320,10 @@ impl OpenFangKernel {
|
||||
],
|
||||
autonomous: def.agent.max_iterations.map(|max_iter| AutonomousConfig {
|
||||
max_iterations: max_iter,
|
||||
// Use the hand-declared heartbeat interval if provided.
|
||||
// The kernel default (30s) is too aggressive for hands making long LLM calls;
|
||||
// HAND.toml authors should set this to reflect expected call latency.
|
||||
heartbeat_interval_secs: def.agent.heartbeat_interval_secs.unwrap_or(30),
|
||||
..Default::default()
|
||||
}),
|
||||
// Autonomous hands must run in Continuous mode so the background loop picks them up.
|
||||
|
||||
Reference in New Issue
Block a user