Skip to content

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

feat(agent): let an embedder actually supply a payload summarizer\n\n`AgentBuilder::payload_summarizer` is a public setter taking\n`Arc<dyn PayloadSummarizer>` — an advertised extension point — while the trait,\nits outcome type and its reason enum were all `pub(crate)`. So the setter was\nuncallable from outside this crate: an embedder could see the seam and could not\nuse it.\n\nThat is not a hypothetical gap. The default implementation dispatches the\n`summarizer` sub-agent, which is exactly what an embedder may be unable to do —\nOpenCompany withholds spawn tools entirely because upstream's use a\nprocess-global registry and a budget bypass that are unsafe when one process\nserves many tenants. "Bring your own summarizer" is therefore the case this seam\nexists for rather than an exotic one, and it was the case it could not serve.\n\nAlso exposes `summarizer::prompt::ARCHETYPE`, and for the same reason one level\ndown: the trait invites a replacement, and the archetype is where the extraction\ncontract is actually written. Without it every embedder reinvents the prompt,\nand reinvents it worse — a hand-written one tried against this seam dropped the\nper-record identifier section, the structural hints that let a caller decide\nwhether to re-fetch, the error-payload rule and the binary-payload rule. The\nfirst of those was visible immediately: a task asking for issue numbers got\nthirty numbers and no titles, because nothing required an identifying line per\nrecord regardless of what was asked.\n\n`build` stays the entry point for the sub-agent path, which additionally wants\nthe user-files, tools and workspace sections. A caller running one tool-less\nmodel call wants the archetype and nothing else.\n

sanil-231e45c219d02e
diff --git a/src/openhuman/agent/registry/agents/summarizer/prompt.rs b/src/openhuman/agent/registry/agents/summarizer/prompt.rs
index 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.rs
index 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;