diff --git a/README.md b/README.md index 2999ee5..bc84086 100644 --- a/README.md +++ b/README.md @@ -797,7 +797,7 @@ AI SDK-based image generation using OpenAI GPT Image 2, Azure OpenAI, Google, Op | `--image` | Output image path (required) | | `--batchfile` | JSON batch file for multi-image generation | | `--jobs` | Worker count for batch mode | -| `--provider` | `google`, `openai`, `azure`, `openrouter`, `dashscope`, `zai`, `minimax`, `jimeng`, `seedream`, or `replicate` | +| `--provider` | `google`, `openai`, `azure`, `openrouter`, `dashscope`, `zai`, `minimax`, `jimeng`, `seedream`, `replicate`, or `agnes` | | `--model`, `-m` | Model ID or deployment name. Azure uses deployment name; OpenRouter uses full model IDs; Z.AI uses `glm-image`; MiniMax uses `image-01` / `image-01-live` | | `--ar` | Aspect ratio (e.g., `16:9`, `1:1`, `4:3`) | | `--size` | Size (e.g., `1024x1024`; `gpt-image-2` accepts valid custom sizes up to 3840px max edge) | @@ -871,9 +871,9 @@ AI SDK-based image generation using OpenAI GPT Image 2, Azure OpenAI, Google, Op **Provider Auto-Selection**: 1. If `--provider` is specified → use it -2. If `--ref` is provided and no provider is specified → try Google, then OpenAI, Azure, OpenRouter, Replicate, Seedream, and finally MiniMax +2. If `--ref` is provided and no provider is specified → try Google, then OpenAI, Azure, OpenRouter, Replicate, Seedream, MiniMax, and finally Agnes 3. If only one API key is available → use that provider -4. If multiple providers are available → default to Google, then OpenAI, Azure, OpenRouter, DashScope, Z.AI, MiniMax, Replicate, Jimeng, Seedream +4. If multiple providers are available → default to Google, then OpenAI, Azure, OpenRouter, DashScope, Z.AI, MiniMax, Replicate, Jimeng, Seedream, Agnes #### baoyu-danger-gemini-web diff --git a/README.zh.md b/README.zh.md index 57f2a6a..db7c8c4 100644 --- a/README.zh.md +++ b/README.zh.md @@ -798,7 +798,7 @@ AI 驱动的生成后端。 | `--image` | 输出图片路径(必需) | | `--batchfile` | 多图批量生成的 JSON 文件 | | `--jobs` | 批量模式的并发 worker 数 | -| `--provider` | `google`、`openai`、`azure`、`openrouter`、`dashscope`、`zai`、`minimax`、`jimeng`、`seedream` 或 `replicate` | +| `--provider` | `google`、`openai`、`azure`、`openrouter`、`dashscope`、`zai`、`minimax`、`jimeng`、`seedream`、`replicate` 或 `agnes` | | `--model`, `-m` | 模型 ID 或部署名。Azure 使用部署名;OpenRouter 使用完整模型 ID;Z.AI 使用 `glm-image`;MiniMax 使用 `image-01` / `image-01-live` | | `--ar` | 宽高比(如 `16:9`、`1:1`、`4:3`) | | `--size` | 尺寸(如 `1024x1024`;`gpt-image-2` 支持最长边不超过 3840px 的有效自定义尺寸) | @@ -872,9 +872,9 @@ AI 驱动的生成后端。 **服务商自动选择**: 1. 如果指定了 `--provider` → 使用指定的 -2. 如果传了 `--ref` 且未指定 provider → 依次尝试 Google、OpenAI、Azure、OpenRouter、Replicate、Seedream,最后是 MiniMax +2. 如果传了 `--ref` 且未指定 provider → 依次尝试 Google、OpenAI、Azure、OpenRouter、Replicate、Seedream、MiniMax,最后是 Agnes 3. 如果只有一个 API 密钥 → 使用对应服务商 -4. 如果多个可用 → 默认使用 Google,然后依次为 OpenAI、Azure、OpenRouter、DashScope、Z.AI、MiniMax、Replicate、即梦、豆包 +4. 如果多个可用 → 默认使用 Google,然后依次为 OpenAI、Azure、OpenRouter、DashScope、Z.AI、MiniMax、Replicate、即梦、豆包、Agnes #### baoyu-danger-gemini-web diff --git a/skills/baoyu-image-gen/SKILL.md b/skills/baoyu-image-gen/SKILL.md index 68bae1c..f468e54 100644 --- a/skills/baoyu-image-gen/SKILL.md +++ b/skills/baoyu-image-gen/SKILL.md @@ -1,6 +1,6 @@ --- name: baoyu-image-gen -description: AI image generation with OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream and Replicate APIs. Supports text-to-image, reference images, aspect ratios, and batch generation from saved prompt files. Sequential by default; use batch parallel generation when the user already has multiple prompts or wants stable multi-image throughput. Use when user asks to generate, create, or draw images. +description: AI image generation with OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope, Z.AI GLM-Image, MiniMax, Jimeng, Seedream, Replicate and Agnes APIs. Supports text-to-image, reference images, aspect ratios, and batch generation from saved prompt files. Sequential by default; use batch parallel generation when the user already has multiple prompts or wants stable multi-image throughput. Use when user asks to generate, create, or draw images. version: 2.1.0 metadata: openclaw: @@ -13,7 +13,7 @@ metadata: # Image Generation (AI SDK) -Official API-based image generation. Supports OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope (阿里通义万象), Z.AI GLM-Image, MiniMax, Jimeng (即梦), Seedream (豆包) and Replicate. +Official API-based image generation. Supports OpenAI GPT Image 2, Azure OpenAI, Google, OpenRouter, DashScope (阿里通义万象), Z.AI GLM-Image, MiniMax, Jimeng (即梦), Seedream (豆包), Replicate and Agnes. ## User Input Tools @@ -111,7 +111,7 @@ When the user wants a person/object preserved from reference images: | `--image ` | Output image path (required in single-image mode) | | `--batchfile ` | JSON batch file for multi-image generation | | `--jobs ` | Worker count for batch mode (default: auto, max from config, built-in default 10) | -| `--provider google\|openai\|azure\|openrouter\|dashscope\|zai\|minimax\|jimeng\|seedream\|replicate\|codex-cli` | Force provider (default: auto-detect; `codex-cli` is never auto-selected — must be pinned via CLI or EXTEND.md) | +| `--provider google\|openai\|azure\|openrouter\|dashscope\|zai\|minimax\|jimeng\|seedream\|replicate\|codex-cli\|agnes` | Force provider (default: auto-detect; `codex-cli` is never auto-selected — must be pinned via CLI or EXTEND.md) | | `--model `, `-m` | Model ID — see provider references for defaults and allowed values | | `--ar ` | Aspect ratio (`16:9`, `1:1`, `4:3`, …) | | `--size ` | Explicit size (e.g., `1024x1024`; for `gpt-image-2`, width/height must be multiples of 16, max edge 3840px, ratio no wider than 3:1) | @@ -136,7 +136,7 @@ When the user wants a person/object preserved from reference images: | `REPLICATE_API_TOKEN` | Replicate API token | | `JIMENG_ACCESS_KEY_ID`, `JIMENG_SECRET_ACCESS_KEY` | Jimeng (即梦) Volcengine credentials | | `ARK_API_KEY` | Seedream (豆包) Volcengine ARK API key | -| `_IMAGE_MODEL` | Per-provider model override (`OPENAI_IMAGE_MODEL`, `GOOGLE_IMAGE_MODEL`, `DASHSCOPE_IMAGE_MODEL`, `ZAI_IMAGE_MODEL`/`BIGMODEL_IMAGE_MODEL`, `MINIMAX_IMAGE_MODEL`, `OPENROUTER_IMAGE_MODEL`, `REPLICATE_IMAGE_MODEL`, `JIMENG_IMAGE_MODEL`, `SEEDREAM_IMAGE_MODEL`) | +| `_IMAGE_MODEL` | Per-provider model override (`OPENAI_IMAGE_MODEL`, `GOOGLE_IMAGE_MODEL`, `DASHSCOPE_IMAGE_MODEL`, `ZAI_IMAGE_MODEL`/`BIGMODEL_IMAGE_MODEL`, `MINIMAX_IMAGE_MODEL`, `OPENROUTER_IMAGE_MODEL`, `REPLICATE_IMAGE_MODEL`, `JIMENG_IMAGE_MODEL`, `SEEDREAM_IMAGE_MODEL`, `AGNES_IMAGE_MODEL`) | | `AZURE_OPENAI_DEPLOYMENT` (alias `AZURE_OPENAI_IMAGE_MODEL`) | Azure default deployment | | `_BASE_URL` | Per-provider endpoint override | | `AZURE_API_VERSION` | Azure image API version (default `2025-04-01-preview`) | @@ -207,13 +207,14 @@ Each provider has its own quirks (model families, size rules, ref support, limit | OpenRouter (multimodal models, `/chat/completions` flow) | `references/providers/openrouter.md` | | Replicate (nano-banana, Seedream, Wan) | `references/providers/replicate.md` | | Codex CLI (wraps bundled `scripts/codex-imagegen/`; Codex login, no `OPENAI_API_KEY`) | `references/providers/codex-cli.md` | +| Agnes (agnes-image-2.1-flash, reference-image support) | `references/providers/agnes.md` | ## Provider Selection -1. `--ref` provided + no `--provider` → auto-select Google → OpenAI → Azure → OpenRouter → Replicate → Seedream → MiniMax (MiniMax's subject reference is more specialized toward character/portrait consistency) -2. `--provider` specified → use it (if `--ref`, must be google/openai/azure/openrouter/replicate/seedream/minimax/codex-cli) +1. `--ref` provided + no `--provider` → auto-select Google → OpenAI → Azure → OpenRouter → Replicate → Seedream → MiniMax → Agnes (MiniMax's subject reference is more specialized toward character/portrait consistency) +2. `--provider` specified → use it (if `--ref`, must be google/openai/azure/openrouter/replicate/seedream/minimax/codex-cli/agnes) 3. Only one API key present → use that provider -4. Multiple keys → default priority: Google → OpenAI → Azure → OpenRouter → DashScope → Z.AI → MiniMax → Replicate → Jimeng → Seedream +4. Multiple keys → default priority: Google → OpenAI → Azure → OpenRouter → DashScope → Z.AI → MiniMax → Replicate → Jimeng → Seedream → Agnes 5. `codex-cli` is **never auto-selected** — set `default_provider: codex-cli` in EXTEND.md or pass `--provider codex-cli`. It spawns `codex exec` via the bundled `scripts/codex-imagegen/main.ts` TS entrypoint (run with `bun`) and uses the user's Codex subscription (no `OPENAI_API_KEY`). Requires `codex` on `PATH` with an active `codex login`. ## Quality Presets @@ -281,6 +282,7 @@ If `--provider openai --model gpt-image-2` fails because `OPENAI_API_KEY` is mis | `references/providers/minimax.md` | MiniMax image-01 + subject reference | | `references/providers/openrouter.md` | OpenRouter multimodal flow | | `references/providers/replicate.md` | Replicate supported families + guardrails | +| `references/providers/agnes.md` | Agnes (agnes-image-2.1-flash) sizing, refs, and limits | | `references/config/preferences-schema.md` | EXTEND.md schema | | `references/config/first-time-setup.md` | First-time setup flow | diff --git a/skills/baoyu-image-gen/references/config/first-time-setup.md b/skills/baoyu-image-gen/references/config/first-time-setup.md index 1f4103a..448be85 100644 --- a/skills/baoyu-image-gen/references/config/first-time-setup.md +++ b/skills/baoyu-image-gen/references/config/first-time-setup.md @@ -59,6 +59,8 @@ options: description: "MiniMax image generation with subject-reference character workflows" - label: "Replicate" description: "Curated Replicate image families - nano-banana-2, Seedream, and Wan image models" + - label: "Agnes" + description: "Sapiens AI Agnes - optimized for high information density, complex layouts, reference-image support" ``` ### Question 2: Default Google Model @@ -187,6 +189,7 @@ default_model: zai: [selected Z.AI model or null] minimax: [selected minimax model or null] replicate: null + agnes: null --- ``` @@ -358,6 +361,7 @@ default_model: zai: [value or null] minimax: [value or null] replicate: [value or null] + agnes: [value or null] ``` Only set the selected provider's model; leave others as their current value or null. diff --git a/skills/baoyu-image-gen/references/config/preferences-schema.md b/skills/baoyu-image-gen/references/config/preferences-schema.md index cd0b3e4..4099ba6 100644 --- a/skills/baoyu-image-gen/references/config/preferences-schema.md +++ b/skills/baoyu-image-gen/references/config/preferences-schema.md @@ -11,7 +11,7 @@ description: EXTEND.md YAML schema for baoyu-image-gen user preferences --- version: 1 -default_provider: null # google|openai|azure|openrouter|dashscope|zai|minimax|replicate|jimeng|seedream|codex-cli|null (null = auto-detect; codex-cli is never auto-detected — pin it here or via --provider) +default_provider: null # google|openai|azure|openrouter|dashscope|zai|minimax|replicate|jimeng|seedream|codex-cli|agnes|null (null = auto-detect; codex-cli is never auto-detected — pin it here or via --provider) default_quality: null # normal|2k|null (null = use default: 2k) @@ -31,6 +31,7 @@ default_model: minimax: null # e.g., "image-01" replicate: null # e.g., "google/nano-banana-2" codex-cli: null # Logical label only — Codex image_gen has no user-selectable model. Default: "codex-image-gen" + agnes: null # e.g., "agnes-image-2.1-flash" batch: max_workers: 10 @@ -62,6 +63,9 @@ batch: codex-cli: concurrency: 1 start_interval_ms: 2000 + agnes: + concurrency: 3 + start_interval_ms: 1100 --- ``` @@ -84,6 +88,7 @@ batch: | `default_model.minimax` | string\|null | null | MiniMax default model | | `default_model.replicate` | string\|null | null | Replicate default model | | `default_model.codex-cli` | string\|null | null | Codex-CLI logical label (Codex image_gen has no user-selectable model) | +| `default_model.agnes` | string\|null | null | Agnes default model | | `batch.max_workers` | int\|null | 10 | Batch worker cap | | `batch.provider_limits..concurrency` | int\|null | provider default | Max simultaneous requests per provider | | `batch.provider_limits..start_interval_ms` | int\|null | provider default | Minimum gap between request starts per provider | @@ -118,6 +123,7 @@ default_model: zai: "glm-image" minimax: "image-01" replicate: "google/nano-banana-2" + agnes: "agnes-image-2.1-flash" batch: max_workers: 10 provider_limits: @@ -136,5 +142,8 @@ batch: minimax: concurrency: 3 start_interval_ms: 1100 + agnes: + concurrency: 3 + start_interval_ms: 1100 --- ``` diff --git a/skills/baoyu-image-gen/references/usage-examples.md b/skills/baoyu-image-gen/references/usage-examples.md index 1ae0056..904871c 100644 --- a/skills/baoyu-image-gen/references/usage-examples.md +++ b/skills/baoyu-image-gen/references/usage-examples.md @@ -83,6 +83,15 @@ ${BUN_X} {baseDir}/scripts/main.ts --prompt "A cinematic portrait" --image out.p # Codex CLI with reference images (style/composition guidance) ${BUN_X} {baseDir}/scripts/main.ts --prompt "Match this color palette" --image out.png --provider codex-cli --ref source.png --ar 1:1 + +# Agnes (default model) +${BUN_X} {baseDir}/scripts/main.ts --prompt "A detailed infographic" --image out.png --provider agnes + +# Agnes with aspect ratio and URL output +${BUN_X} {baseDir}/scripts/main.ts --prompt "A cinematic scene" --image out.txt --provider agnes --ar 16:9 --response-format url + +# Agnes with reference image +${BUN_X} {baseDir}/scripts/main.ts --prompt "Apply this style" --image out.png --provider agnes --ref source.png ``` Notes on `codex-cli`: