Skip to content

The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.

fix(agent): restore missing agent definition struct

Steven Enamakel12749bddc88a
diff --git a/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs b/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs
index 69ceed2b05..ed270a1f22 100644
--- a/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs
+++ b/crates/openhuman-core/src/agent/harness/definition/agent_definition.rs
@@ -1,5 +1,5 @@
//! The [`AgentDefinition`] record itself plus the small policy enums it
-//! embeds directly ([`IterationPolicy`], [`TriggerMemoryAgent`]) and the
+//! embeds directly ([`IterationPolicy`]) and the
//! serde default helpers its `#[serde(default = ...)]` attributes name.
use serde::{Deserialize, Serialize};
@@ -42,17 +42,6 @@ pub enum IterationPolicy {
Extended,
}
-/// Policy for running the memory retrieval agent before a normal agent turn.
-#[derive(Debug, Clone, Copy, Serialize, Deserialize, PartialEq, Eq, Default)]
-#[serde(rename_all = "snake_case")]
-pub enum TriggerMemoryAgent {
- /// Do not run the memory agent automatically.
- #[default]
- Never,
- /// Run `agent_memory` once before the user's prompt is sent to this agent.
- Always,
-}
-
// ─────────────────────────────────────────────────────────────────────────────
// Agent definition
// ─────────────────────────────────────────────────────────────────────────────
@@ -84,7 +73,8 @@ pub struct AgentDefinition {
#[serde(default = "defaults::true_")]
pub omit_identity: bool,
- /// If `true`, the parent's memory context is stripped.
+ /// If `true`, the compiled memory context (`context.md`) is not injected
+ /// as the first user message of a new session for this agent.
#[serde(default = "defaults::true_")]
pub omit_memory_context: bool,
@@ -92,29 +82,6 @@ pub struct AgentDefinition {
#[serde(default = "defaults::true_")]
pub omit_safety_preamble: bool,
- /// If `true`, the user's `PROFILE.md` (generated by the onboarding
- /// enrichment pipeline — LinkedIn scrape, etc.) is NOT injected into
- /// the rendered prompt. Defaults to `true` so sub-agents stay lean:
- /// only agents that need to personalise user-facing output (welcome,
- /// orchestrator, the trigger pair) opt in with `omit_profile = false`.
- #[serde(default = "defaults::true_")]
- pub omit_profile: bool,
-
- /// If `true`, the archivist-curated `MEMORY.md` (long-term distilled
- /// memory file) is NOT injected into the rendered prompt. Defaults
- /// to `true` for the same reason as `omit_profile` — narrow
- /// specialists stay lean; user-facing agents opt in.
- ///
- /// **KV-cache contract:** like every workspace file, once MEMORY.md
- /// is rendered into a session's system prompt the bytes are frozen
- /// for that session's lifetime. Archivist writes that land
- /// mid-session do not retroactively update the in-flight prompt —
- /// they are picked up on the next session. This matches the
- /// byte-stability invariant documented on
- /// [`crate::agent::prompts::render_subagent_system_prompt`].
- #[serde(default = "defaults::true_")]
- pub omit_memory_md: bool,
-
// ── model ───────────────────────────────────────────────────────────
/// Strategy for picking which model to use for this sub-agent.
#[serde(default)]
@@ -193,12 +160,6 @@ pub struct AgentDefinition {
#[serde(default)]
pub background: bool,
- /// Optional pre-turn memory retrieval hook. When set to `always`, the
- /// harness runs the built-in `agent_memory` agent once with the user
- /// prompt and prepends its result to the prompt sent to this agent.
- #[serde(default)]
- pub trigger_memory_agent: TriggerMemoryAgent,
-
/// Per-agent TokenJuice tool-result compression profile.
///
/// `auto` keeps compression on for normal agents, but resolves coding-model
@@ -254,8 +215,7 @@ pub struct AgentDefinition {
/// * `Reasoning` MUST NOT list another `Reasoning` agent in
/// `subagents`. Reasoning composes downward into `Worker`s.
/// * `Worker` MUST NOT list open-ended subagents. Workers execute;
- /// they do not orchestrate. Pre-turn memory retrieval is configured
- /// separately via [`AgentDefinition::trigger_memory_agent`].
+ /// they do not orchestrate.
/// * `{ skills = "*" }` entries admit no sub-agent, so they are always
/// allowed.
///