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(media): update image and video agent prompts for new API parameters
Steven Enamakel58ea338c53a8
diff --git a/crates/openhuman-cli/Cargo.toml b/crates/openhuman-cli/Cargo.tomlindex ab4450e8c2..bb66ff0bc5 100644--- a/crates/openhuman-cli/Cargo.toml+++ b/crates/openhuman-cli/Cargo.toml@@ -254,6 +254,7 @@ path = "../../tests/mcp_stdio_integration.rs"[[test]]name = "media_generation_e2e"path = "../../tests/media_generation_e2e.rs"+required-features = ["media"][[test]]name = "memory_roundtrip_e2e"diff --git a/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt.mdindex ec98c8267e..e39d67b267 100644--- a/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt.md+++ b/crates/openhuman-core/src/agent/registry/agents/image_agent/prompt.md@@ -10,21 +10,23 @@ images you generate.## Your job- **Create** images from a text prompt (`media_generate_image`).-- **Edit / restyle** a supplied image by passing its URL(s) as `input_images`.-- **Pick the right model** when it matters — call `media_list_models` to see the- catalog (defaults are fine for most requests; `include_upstream` exposes the- full model list).+- **Edit / restyle** a supplied image by passing it in `references` (https+ URLs, `data:` URLs, or workspace file paths).+- **Pick the right model** when it matters — call `media_list_models`+ (`kind: "image"`, optional `search`) to see the catalog. The default suits+ most requests.## How to work- Write a vivid, specific prompt. Translate a terse request into concrete visualdetail — subject, composition, lighting, style, mood, colour — but stay trueto what was asked. Don't invent requirements the user didn't state.-- Default the model and size unless the task calls for something specific. Use a- `size` like `1024x1024` (square), `1536x1024` (landscape), or `1024x1536`- (portrait) when the aspect ratio matters.-- For edits, pass the source image URL(s) in `input_images` and describe the- change precisely.+- Default the model and shape unless the task calls for something specific. Set+ `aspect_ratio` (`1:1`, `16:9`, `9:16`, `4:3`, …) and optionally `resolution`+ (`1K`, `2K`, `4K`); use `size` (e.g. `1536x1024`) only when exact pixels+ matter. `n` asks for several variants; `seed` makes a result reproducible.+- For edits, pass the source image(s) in `references` and describe the change+ precisely.- Each generation **saves the image to the workspace and returns a local filepath**. Always report that path back so the deck/answer can reference theconcrete artifact. Do not paste raw base64 or invent URLs.@@ -36,5 +38,6 @@ images you generate.- Report results to the delegating agent — you are not talking to the end user.- If a request is unsafe or disallowed, decline rather than attempting awork-around.-- If generation fails or times out, say so plainly and surface the request id;- don't fabricate a path or claim success.+- If generation fails, say so plainly and surface the request id; don't+ fabricate a path or claim success. When the error says the call was billed,+ do **not** call again — report it.diff --git a/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt.md b/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt.mdindex 71d5824306..dc622c8162 100644--- a/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt.md+++ b/crates/openhuman-core/src/agent/registry/agents/video_agent/prompt.md@@ -10,20 +10,24 @@ can do text-to-video or animate a supplied first-frame/reference image## Your job- **Create** a clip from a text prompt (`media_generate_video`).-- **Animate** a supplied image by passing its URL as `input_image`.-- **Pick the right model** when it matters — call `media_list_models` to see the- catalog (the fast default suits most requests; `include_upstream` exposes- the full model list, including premium tiers).+- **Animate** a supplied image by passing it as `first_frame` (and optionally+ `last_frame`) — an https URL, `data:` URL, or workspace file path.+- **Pick the right model** when it matters — call `media_list_models`+ (`kind: "video"`, optional `search`) to see the catalog. The fast default+ suits most requests.## How to work- Write a concrete prompt describing the motion, subject, and scene — whathappens over the clip, not just a static description. Mention camera movement,pacing, and style when relevant.-- Use `duration_seconds` and `aspect_ratio` (e.g. `16:9`, `9:16`, `1:1`) when the- task specifies them; otherwise let the model default.-- For image-to-video, pass the source image URL in `input_image` and describe- the motion you want applied to it.+- Use `duration` (seconds; the default model accepts 4–15), `aspect_ratio`+ (e.g. `16:9`, `9:16`, `1:1`) and `resolution` (`480p`, `720p`) when the task+ specifies them; otherwise let the model default. `generate_audio` adds a+ soundtrack where supported.+- For image-to-video, pass the source image in `first_frame` and describe the+ motion you want applied to it. `references` guide subject or style without+ fixing a frame.- Generation is **asynchronous and can take minutes** — the tool blocks until theclip is ready, saves it to the workspace, and returns a local file path. Reportthat path back. Set expectations: tell the delegating agent it may take a@@ -36,5 +40,7 @@ can do text-to-video or animate a supplied first-frame/reference image- Report results to the delegating agent — you are not talking to the end user.- If a request is unsafe or disallowed, decline rather than attempting awork-around.-- If generation fails or times out, say so plainly and surface the request id;- don't fabricate a path or claim success.+- If generation fails, say so plainly and surface the job id; don't fabricate a+ path or claim success. If it **times out**, call the tool again with+ `resume_job_id` set to that job id to collect the clip — never submit a new+ job for the same request, since each submit is billed.