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
refactor(prompts): import shared render helpers from crate::prompts
Steven Enamakel6813f9b693a9
diff --git a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rsindex 5cf6258fda..76a059ce35 100644--- a/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs+++ b/crates/openhuman-core/src/agent/subagent_host/ops/runner.rs@@ -11,9 +11,8 @@ use std::time::Instant;use crate::agent::harness::artifact_offload::offload_run_result;use crate::agent::harness::fork_context::ParentExecutionContext;-use crate::agent::prompts::{- PromptContext, SubagentRenderOptions, render_subagent_system_prompt_with_format,-};+use crate::agent::prompts::{PromptContext, SubagentRenderOptions};+use crate::prompts::{render_subagent_system_prompt_with_format};use crate::agent::subagent_host::definition_iter_cap;use crate::agent::subagent_host::tool_prep::{filter_tool_indices, is_subagent_spawn_tool, load_prompt_source, subagent_prompt_protocol,@@ -814,7 +813,7 @@ async fn run_typed_mode(// Shared one-line stamp (#3602), in the user's zone like the main agent's.// On the user message: sub-agent system prompts are byte-stable for caching.let zone = config.as_ref().ok().map(|c| c.time_zone());- let now_str = crate::agent::prompts::current_datetime_line(zone.as_deref());+ let now_str = crate::prompts::current_datetime_line(zone.as_deref());let mut context_parts: Vec<&str> = Vec::new();if !definition.extensions.omit_memory_context {diff --git a/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rsindex 251c9da071..aa9f0a3e18 100644--- a/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/critic/prompt.rs@@ -4,7 +4,8 @@//! (from the sibling `prompt.md`) plus the same section helpers the//! runtime uses for every other agent.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rsindex f49292881f..98556b2521 100644--- a/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/image_agent/prompt.rs@@ -3,7 +3,8 @@//! Returns the final, fully-assembled system prompt — archetype body (from the//! sibling `prompt.md`) plus the shared section helpers every agent uses.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rsindex 9e348c3a05..caaa038aae 100644--- a/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/morning_briefing/prompt.rs@@ -5,9 +5,8 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{- PromptContext, render_ambient_environment, render_tools, render_workspace,-};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_ambient_environment, render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rsindex 4ba443c470..d6a27f77fd 100644--- a/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/orchestrator/prompt.rs@@ -10,10 +10,8 @@//! delegate to any more. That prose lives here (not in the shared prompts//! module) so nobody has to branch on `agent_id` in a shared section impl.-use crate::agent::prompts::{- ConnectedIntegration, PromptContext, render_datetime, render_identity, render_tools,- render_workspace,-};+use crate::agent::prompts::{ConnectedIntegration, PromptContext};+use crate::prompts::{render_datetime, render_identity, render_tools, render_workspace};use crate::agent_registry::host_definition::AgentDefinitionRegistry;use crate::tools::orchestrator_tools::sanitise_slug;use crate::tools::toolpacks;diff --git a/crates/openhuman-core/src/agent_registry/agents/planner/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/planner/prompt.rsindex 41189f65a1..b8530ed6dc 100644--- a/crates/openhuman-core/src/agent_registry/agents/planner/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/planner/prompt.rs@@ -5,7 +5,8 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext, render_datetime, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_datetime, render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rsindex 2848b375ea..a281de74e8 100644--- a/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/presentation_agent/prompt.rs@@ -1,6 +1,7 @@//! System prompt builder for the `presentation_agent` built-in agent.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rsindex 94f0c2da8b..20b6b111d4 100644--- a/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/summarizer/prompt.rs@@ -5,7 +5,8 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;/// The summarizer archetype: TinyJuice's extraction contract, verbatim.diff --git a/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rsindex 5780703fb2..cc804774b0 100644--- a/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/task_manager_agent/prompt.rs@@ -1,6 +1,7 @@//! System prompt builder for the `task_manager_agent` built-in agent.-use crate::agent::prompts::{PromptContext, render_safety, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_safety, render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rsindex b256b47a00..f8071d9ced 100644--- a/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/video_agent/prompt.rs@@ -3,7 +3,8 @@//! Returns the final, fully-assembled system prompt — archetype body (from the//! sibling `prompt.md`) plus the shared section helpers every agent uses.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rs b/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rsindex 173ee56ebc..eb1b89641a 100644--- a/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rs+++ b/crates/openhuman-core/src/agent_registry/agents/vision_agent/prompt.rs@@ -4,7 +4,8 @@//! (from the sibling `prompt.md`) plus the same section helpers the//! runtime uses for every other agent.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rs b/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rsindex b26d9c4e3f..afdea4fa89 100644--- a/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rs+++ b/crates/openhuman-core/src/flows/agents/flow_discovery/prompt.rs@@ -8,7 +8,8 @@//! external effect); the "read, then suggest — never act" invariant lives in//! the archetype body instead.-use crate::agent::prompts::{render_tools, render_workspace, PromptContext};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = tinyflows_copilot::prompts::FLOW_DISCOVERY;diff --git a/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rs b/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rsindex c063eaf1c0..cfe05d6b96 100644--- a/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rs+++ b/crates/openhuman-core/src/flows/agents/workflow_builder/prompt.rs@@ -7,7 +7,8 @@//! real external effect (the "propose, never persist" invariant lives in the//! archetype body instead).-use crate::agent::prompts::{render_tools, render_workspace, PromptContext};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = tinyflows_copilot::prompts::WORKFLOW_BUILDER;diff --git a/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rs b/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rsindex 0723de06c5..f4a9cecb59 100644--- a/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rs+++ b/crates/openhuman-core/src/integrations/composio/connected_integrations/fetch.rs@@ -182,9 +182,7 @@ fn fetch_connected_integrations_uncached(pub(crate) fn to_prompt_integrations(resp: tinyconnectors_bus::ComposioConnectedIntegrationsResponse,) -> Vec<ConnectedIntegration> {- use crate::agent::prompts::{- ConnectedIntegrationTool, GatedIntegrationTool, IntegrationConnection,- };+ use crate::agent::prompts::{ConnectedIntegrationTool, GatedIntegrationTool, IntegrationConnection};resp.integrations.into_iter().map(|i| {diff --git a/crates/openhuman-core/src/memory/lifecycle/date_hint.rs b/crates/openhuman-core/src/memory/lifecycle/date_hint.rsindex 0b69927a18..76927cb560 100644--- a/crates/openhuman-core/src/memory/lifecycle/date_hint.rs+++ b/crates/openhuman-core/src/memory/lifecycle/date_hint.rs@@ -40,7 +40,7 @@ pub async fn extract(};let system = format!("{}\n\n{INSTRUCTION}",- crate::agent::prompts::current_datetime_line(Some(zone))+ crate::prompts::current_datetime_line(Some(zone)));let mut request = ModelRequest::new(vec![Message::system(system), Message::user(user_text)]);request.max_tokens = Some(400);diff --git a/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rs b/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rsindex 8f53649897..f0a7d78b8c 100644--- a/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rs+++ b/crates/openhuman-core/src/skills/catalog/agent/skill_setup/prompt.rs@@ -1,6 +1,7 @@//! System prompt builder for the `skill_setup` built-in agent.-use crate::agent::prompts::{render_safety, render_tools, render_workspace, PromptContext};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_safety, render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("prompt.md");diff --git a/crates/openhuman-core/src/triage/trigger_reactor_prompt.rs b/crates/openhuman-core/src/triage/trigger_reactor_prompt.rsindex 04ad90a71f..5afe580b0c 100644--- a/crates/openhuman-core/src/triage/trigger_reactor_prompt.rs+++ b/crates/openhuman-core/src/triage/trigger_reactor_prompt.rs@@ -5,7 +5,8 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("../agent_registry/agents/trigger_reactor/prompt.md");diff --git a/crates/openhuman-core/src/triage/trigger_triage_prompt.rs b/crates/openhuman-core/src/triage/trigger_triage_prompt.rsindex ec2327a637..fc2b3de131 100644--- a/crates/openhuman-core/src/triage/trigger_triage_prompt.rs+++ b/crates/openhuman-core/src/triage/trigger_triage_prompt.rs@@ -5,7 +5,8 @@//! in the order it wants — so the output IS what the LLM sees, no//! post-processing in the runner.-use crate::agent::prompts::{PromptContext, render_tools, render_workspace};+use crate::agent::prompts::{PromptContext};+use crate::prompts::{render_tools, render_workspace};use anyhow::Result;const ARCHETYPE: &str = include_str!("../agent_registry/agents/trigger_triage/prompt.md");