Skip to content

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

fix(agent_cli): correct mock import path for library profile

Steven Enamakel55aaa4cd632c
diff --git a/crates/openhuman-cli/src/bin/library_profile/mock.rs b/crates/openhuman-cli/src/bin/library_profile/mock.rs
index f074544a3c..32a198162a 100644
--- a/crates/openhuman-cli/src/bin/library_profile/mock.rs
+++ b/crates/openhuman-cli/src/bin/library_profile/mock.rs
@@ -31,6 +31,7 @@ fn joined_request(request: &ModelRequest) -> String {
Message::User(_) => "user",
Message::Assistant(_) => "assistant",
Message::Tool(_) => "tool",
+ Message::Custom(_) => "custom",
};
format!("{role}: {}", message.text())
})
@@ -62,6 +63,7 @@ fn model_response(response: ChatResponse) -> ModelResponse {
content,
tool_calls,
usage: None,
+ origin: None,
},
usage: None,
raw: None,
diff --git a/crates/openhuman-core/src/core/agent_cli.rs b/crates/openhuman-core/src/core/agent_cli.rs
index 2664214fbf..4bda9c7a9c 100644
--- a/crates/openhuman-core/src/core/agent_cli.rs
+++ b/crates/openhuman-core/src/core/agent_cli.rs
@@ -6,10 +6,9 @@
//! agent definitions / tool registry and printing something.
//!
//! Usage:
-//! openhuman agent dump-prompt --agent <id> [--toolkit <slug>] [--workspace <path>] [--json] [--with-tools] [--wire] [-v]
-//! (--toolkit is REQUIRED when --agent is `integrations_agent`.)
+//! openhuman agent dump-prompt --agent <id> [--workspace <path>] [--json] [--with-tools] [--wire] [-v]
//! openhuman agent dump-all --out <dir> [--workspace <path>] [--model <name>] [-v]
-//! openhuman agent prompt-size [--agent <id>] [--toolkit <slug>] [--workspace <path>] [--json] [-v]
+//! openhuman agent prompt-size [--agent <id>] [--workspace <path>] [--json] [-v]
//! openhuman agent list [--json] [-v]
//!
//! `dump-prompt` is the main tool: it renders the exact system prompt the
@@ -18,8 +17,8 @@
//! [`OpenHumanSessionHost::build_system_prompt`] on the live session, so the output is
//! byte-identical to what the LLM sees on turn 1. Pass
//! `--agent orchestrator` for the orchestrator prompt; otherwise pass
-//! any built-in or workspace-custom agent id (e.g. `integrations_agent`,
-//! `welcome`, `code_executor`).
+//! any built-in or workspace-custom agent id (e.g. `researcher`,
+//! `welcome`).
use anyhow::{anyhow, Result};
use std::path::PathBuf;
@@ -71,7 +70,6 @@ struct PromptSizeFlags {
/// `None` means "every registered agent" — the fleet-wide view the ratchet
/// consumes.
agent: Option<String>,
- toolkit: Option<String>,
workspace: Option<PathBuf>,
model: Option<String>,
json: bool,
@@ -83,7 +81,6 @@ struct PromptSizeFlags {
fn parse_prompt_size_flags(args: &[String]) -> Result<PromptSizeFlags> {
let mut agent: Option<String> = None;
- let mut toolkit: Option<String> = None;
let mut workspace: Option<PathBuf> = None;
let mut model: Option<String> = None;
let mut json = false;
@@ -104,14 +101,6 @@ fn parse_prompt_size_flags(args: &[String]) -> Result<PromptSizeFlags> {
);
i += 2;
}
- "--toolkit" | "-t" => {
- toolkit = Some(
- args.get(i + 1)
- .ok_or_else(|| anyhow!("missing value for --toolkit"))?
- .clone(),
- );
- i += 2;
- }
"--workspace" | "-w" => {
workspace = Some(PathBuf::from(
args.get(i + 1)
@@ -144,7 +133,6 @@ fn parse_prompt_size_flags(args: &[String]) -> Result<PromptSizeFlags> {
}
Ok(PromptSizeFlags {
agent,
- toolkit,
workspace,
model,
json,
@@ -185,7 +173,6 @@ fn run_prompt_size(args: &[String]) -> Result<()> {
let reports: Vec<PromptSizeReport> = match &flags.agent {
Some(agent_id) => {
let mut options = DumpPromptOptions::new(agent_id.clone());
- options.toolkit = flags.toolkit.clone();
options.workspace_dir_override = flags.workspace.clone();
options.config_path_override = config_path.clone();
options.model_override = flags.model.clone();
@@ -250,7 +237,6 @@ fn print_prompt_size_help() {
println!();
println!("Options:");
println!(" --agent, -a <id> One agent. Omit to report every registered agent.");
- println!(" --toolkit, -t <slug> REQUIRED when `--agent integrations_agent`.");
println!(" --workspace, -w <p> Workspace to resolve identity/memory files against.");
println!(" --model, -m <name> Override the resolved model name.");
println!(" --hermetic Also resolve config + credentials from the --workspace");
@@ -312,8 +298,6 @@ fn parse_dump_all_flags(args: &[String]) -> Result<DumpAllFlags> {
println!("Usage: openhuman agent dump-all --out <dir> [--workspace <path>] [--model <name>] [-v]");
println!();
println!("Render every registered agent's turn-1 system prompt into <dir>.");
- println!("`integrations_agent` is expanded into one file per currently-connected");
- println!("Composio toolkit; if no toolkit is connected, it is skipped.");
std::process::exit(0);
}
other => return Err(anyhow!("unknown dump-all arg: {other}")),
@@ -366,7 +350,6 @@ fn run_dump_all(args: &[String]) -> Result<()> {
struct DumpFlags {
agent: Option<String>,
- toolkit: Option<String>,
workspace: Option<PathBuf>,
model: Option<String>,
json: bool,
@@ -378,7 +361,6 @@ struct DumpFlags {
fn parse_dump_flags(args: &[String]) -> Result<DumpFlags> {
let mut out = DumpFlags {
agent: None,
- toolkit: None,
workspace: None,
model: None,
json: false,
@@ -397,14 +379,6 @@ fn parse_dump_flags(args: &[String]) -> Result<DumpFlags> {
);
i += 2;
}
- "--toolkit" | "-t" => {
- out.toolkit = Some(
- args.get(i + 1)
- .ok_or_else(|| anyhow!("missing value for --toolkit"))?
- .clone(),
- );
- i += 2;
- }
"--workspace" | "-w" => {
out.workspace = Some(PathBuf::from(
args.get(i + 1)
@@ -450,29 +424,20 @@ fn parse_dump_flags(args: &[String]) -> Result<DumpFlags> {
fn run_dump_prompt(args: &[String]) -> Result<()> {
let flags = parse_dump_flags(args)?;
let agent = flags.agent.clone().ok_or_else(|| {
- anyhow!("--agent <id> is required (e.g. `orchestrator`, `integrations_agent`, `welcome`)")
+ anyhow!("--agent <id> is required (e.g. `orchestrator`, `researcher`, `welcome`)")
})?;
- if agent == "integrations_agent" && flags.toolkit.is_none() {
- return Err(anyhow!(
- "--toolkit <slug> is required when --agent is `integrations_agent` \
- (e.g. `--toolkit gmail`). Run `composio list_connection` to see active slugs."
- ));
- }
-
init_quiet_logging(flags.verbose);
log::debug!(
- "[agent-cli] run_dump_prompt entry: agent={} toolkit={:?} workspace={:?} model={:?}",
+ "[agent-cli] run_dump_prompt entry: agent={} workspace={:?} model={:?}",
agent,
- flags.toolkit,
flags.workspace,
flags.model
);
let options = DumpPromptOptions {
agent_id: agent,
- toolkit: flags.toolkit.clone(),
workspace_dir_override: flags.workspace.clone(),
// `dump-prompt` deliberately keeps reading the real install: its job is
// to show what the signed-in user's agent actually receives, including
@@ -517,9 +482,6 @@ fn print_human(dumped: &DumpedPrompt, with_tools: bool) {
// in `core/cli.rs` (banner to stderr, JSON result to stdout).
eprintln!("# Agent prompt dump");
eprintln!("agent: {}", dumped.agent_id);
- if let Some(tk) = &dumped.toolkit {
- eprintln!("toolkit: {tk}");
- }
eprintln!("mode: {}", dumped.mode);
eprintln!("model: {}", dumped.model);
eprintln!("workspace: {}", dumped.workspace_dir.display());
@@ -546,13 +508,6 @@ fn print_json(dumped: &DumpedPrompt, with_tools: bool) -> Result<()> {
"agent_id".into(),
serde_json::Value::String(dumped.agent_id.clone()),
);
- obj.insert(
- "toolkit".into(),
- match &dumped.toolkit {
- Some(tk) => serde_json::Value::String(tk.clone()),
- None => serde_json::Value::Null,
- },
- );
obj.insert(
"mode".into(),
serde_json::Value::String(dumped.mode.to_string()),
@@ -707,7 +662,7 @@ fn print_agent_help() {
println!(" openhuman agent list [--workspace <path>] [--json]");
println!(" openhuman agent dump-prompt --agent <id> [--workspace <path>] [--model <name>] [--with-tools] [--wire] [--json] [-v]");
println!(" openhuman agent dump-all --out <dir> [--workspace <path>] [--model <name>] [-v]");
- println!(" openhuman agent prompt-size [--agent <id>] [--toolkit <slug>] [--workspace <path>] [--json] [-v]");
+ println!(" openhuman agent prompt-size [--agent <id>] [--workspace <path>] [--json] [-v]");
println!();
println!("Run `openhuman agent <subcommand> --help` for details.");
}
@@ -720,13 +675,9 @@ fn print_dump_prompt_help() {
println!();
println!("Required:");
println!(" --agent, -a <id> Target agent id — any built-in or workspace-custom id");
- println!(" (e.g. `orchestrator`, `integrations_agent`, `welcome`).");
+ println!(" (e.g. `orchestrator`, `researcher`, `welcome`).");
println!();
println!("Options:");
- println!(" --toolkit, -t <slug> REQUIRED when `--agent integrations_agent`. Names the");
- println!(" Composio toolkit to bind this dump to (e.g. `gmail`,");
- println!(" `notion`). Must match a currently-connected integration —");
- println!(" run `composio list_connection` to see the active slugs.");
println!(" --workspace, -w <p> Override the workspace directory (defaults to");
println!(" Config::workspace_dir / ~/.openhuman/workspace).");
println!(" --model, -m <name> Override the resolved model name (affects only the");
@@ -746,10 +697,8 @@ fn print_dump_prompt_help() {
println!(" # Orchestrator prompt, JSON for scripting.");
println!(" openhuman agent dump-prompt --agent orchestrator --json");
println!();
- println!(" # integrations_agent bound to the user's gmail connection.");
- println!(
- " openhuman agent dump-prompt --agent integrations_agent --toolkit gmail --with-tools"
- );
+ println!(" # Researcher prompt with its tool list.");
+ println!(" openhuman agent dump-prompt --agent researcher --with-tools");
}
fn is_help(value: &str) -> bool {