Skip to content

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

docs(agent): clarify TinyAgents ownership of prompt section assembly

Steven Enamakele0617cb4f202
diff --git a/crates/openhuman-core/src/agent/README.md b/crates/openhuman-core/src/agent/README.md
index ef89178a5a..2afa09444a 100644
--- a/crates/openhuman-core/src/agent/README.md
+++ b/crates/openhuman-core/src/agent/README.md
@@ -236,8 +236,8 @@ display-safe `AgentDefinitionDisplay` for the UI.
`prompts/` holds the bundled identity files (`SOUL.md`, `IDENTITY.md`,
`ROLE.md`, `STYLE.md`, `USER.md`) and `SystemPromptBuilder`, which renders
-ordered `PromptSection`s into the system prompt, optionally as a
-`TieredPrompt` with cache breakpoints. `context/` keeps per-session
+selects OpenHuman product content and delegates tier assembly to TinyAgents,
+optionally returning a `TieredPrompt` with cache breakpoints. `context/` keeps per-session
`ContextManager` state and the byte-stable channel prompt builder. `debug/`
renders the exact prompt a live session would send, by building a real
session host and calling `build_system_prompt`.
diff --git a/crates/openhuman-core/src/agent/context/mod.rs b/crates/openhuman-core/src/agent/context/mod.rs
index 4241666a7e..dc7a1708f5 100644
--- a/crates/openhuman-core/src/agent/context/mod.rs
+++ b/crates/openhuman-core/src/agent/context/mod.rs
@@ -3,10 +3,10 @@
//! This module is the single home for everything that shapes what an LLM
//! sees during a conversation:
//!
-//! 1. **System prompt assembly** — [`prompt::SystemPromptBuilder`] and its
-//! composable [`prompt::PromptSection`] trait. Main agents, sub-agents,
-//! and channels all build their opening system prompts through this
-//! module; there is no parallel implementation elsewhere in the crate.
+//! 1. **System prompt composition** — OpenHuman selects product content through
+//! [`prompt::SystemPromptBuilder`], while TinyAgents owns portable section
+//! and tier assembly. Main agents, sub-agents, and channels all build their
+//! opening system prompts through this module.
//!
//! 2. **Middleware configuration** — `ContextConfig` configures the TinyAgents
//! turn middleware stack.
diff --git a/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rs b/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rs
index 7637257f37..07584d8771 100644
--- a/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rs
+++ b/crates/openhuman-core/src/core/agent_cli/debug/prompt_size.rs
@@ -41,8 +41,8 @@ pub const EST_BYTES_PER_TOKEN: usize = 4;
/// One markdown section of the rendered system prompt.
///
/// Sections are derived by scanning `#` / `##` / `###` headings in the rendered
-/// text rather than by asking the builder, because the builder joins its
-/// [`crate::agent::prompts::PromptSection`]s into one string and a
+/// text rather than by asking the builder, because product prompt adapter composes its
+/// content through TinyAgents into one string and a
/// single section routinely emits several headings (the orchestrator archetype
/// alone contributes a dozen). Heading-derived attribution is what a reader
/// editing a prompt actually wants: it points at the block of text to cut.
diff --git a/crates/openhuman-core/src/prompts/sections.rs b/crates/openhuman-core/src/prompts/sections.rs
index 3cb8f82c62..c9d7f918ca 100644
--- a/crates/openhuman-core/src/prompts/sections.rs
+++ b/crates/openhuman-core/src/prompts/sections.rs
@@ -127,7 +127,7 @@ pub struct UserIdentitySection;
pub struct PersonalityRosterSection;
// ─────────────────────────────────────────────────────────────────────────────
-// PromptSection implementations
+// OpenHuman content renderers adapted to the TinyAgents section contract
// ─────────────────────────────────────────────────────────────────────────────
impl PersonalityRosterSection {