The fastest, cheapest, most efficient open-source agent harness. Run more than 500 agents on a $10 VPS.
Rust agent-orchestrationai-agentsai-assistantdesktopllmlocal-firstmcppersonal-aiprivacyrustsecond-braintauri
feat(agent): let an embedder actually supply a payload summarizer
sanil-23f61a693bc1b4
diff --git a/src/openhuman/agent/registry/agents/summarizer/prompt.rs b/src/openhuman/agent/registry/agents/summarizer/prompt.rsindex d7263a4ccc..084f73c2c8 100644--- a/src/openhuman/agent/registry/agents/summarizer/prompt.rs+++ b/src/openhuman/agent/registry/agents/summarizer/prompt.rs@@ -10,7 +10,23 @@ use crate::openhuman::agent::context::prompt::{};use anyhow::Result;-const ARCHETYPE: &str = include_str!("prompt.md");+/// The summarizer archetype, verbatim.+///+/// `pub` since issue #6014, for the same reason+/// [`payload_summarizer`](crate::openhuman::agent::tinyagents::payload_summarizer)+/// is: the trait invites an embedder to supply its own summarizer — the default+/// implementation dispatches a sub-agent, which an embedder may be unable to do+/// — and the archetype is where the extraction contract is actually written+/// down. Without it, anyone taking that invitation has to reinvent the prompt,+/// and will reinvent it worse: the identifier rule, the structural hints that+/// let a caller decide whether to re-fetch, the error-payload and+/// binary-payload edge cases, and the "do not solve the parent task" boundary+/// are all easy to omit and expensive to discover missing.+///+/// [`build`] remains the entry point for the sub-agent path, which additionally+/// wants the user-files, tools and workspace sections. A caller running one+/// tool-less model call wants this and nothing else.+pub const ARCHETYPE: &str = include_str!("prompt.md");pub fn build(ctx: &PromptContext<'_>) -> Result<String> {let mut out = String::with_capacity(4096);diff --git a/src/openhuman/agent/tinyagents/mod.rs b/src/openhuman/agent/tinyagents/mod.rsindex 3f553b1362..96bee3f189 100644--- a/src/openhuman/agent/tinyagents/mod.rs+++ b/src/openhuman/agent/tinyagents/mod.rs@@ -30,7 +30,18 @@ pub(crate) mod middleware;pub(crate) mod model;pub(crate) mod observability;pub(crate) mod orchestration;-pub(crate) mod payload_summarizer;+// `pub` since issue #6014, and the inconsistency it removes is the point:+// `AgentBuilder::payload_summarizer` is a **public** setter taking+// `Arc<dyn PayloadSummarizer>`, so the seam was already advertised to embedders+// — while the trait itself, its outcome type and its reason enum were all+// `pub(crate)`, which made the setter uncallable from outside this crate. An+// embedder could therefore see the extension point, and could not use it.+//+// The default implementation dispatches a sub-agent, which is exactly what an+// embedder may be unable to do (OpenCompany withholds spawn tools under+// multi-tenancy), so "bring your own summarizer" is the case this seam exists+// for rather than an exotic one.+pub mod payload_summarizer;mod policy_denial;pub(crate) mod replay;pub mod resolved_route;