Skip to content

Add runnable helper scripts, prompt templates, and prompt component reference for agnes-ai-models - #2

Open
oh-summy wants to merge 3 commits into
AgnesAI-Labs:mainfrom
oh-summy:feature/add-helper-scripts
Open

Add runnable helper scripts, prompt templates, and prompt component reference for agnes-ai-models#2
oh-summy wants to merge 3 commits into
AgnesAI-Labs:mainfrom
oh-summy:feature/add-helper-scripts

Conversation

@oh-summy

Copy link
Copy Markdown

Resolves #1

This PR adds the helper scripts + prompt templates discussed in #1, plus a condensed prompt component reference and a Prompt Enhancement section in the skill.

What this PR adds

1. Runnable helper scripts (scripts/)

Drop-in shell + Python wrappers that call the same endpoints the skill already documents. Each script honors AGNES_API_KEY and AGNES_BASE_URL and prints JSON unless an output path is given.

Script Workflow Model
scripts/image_understand.py Analyze a local image or URL agnes-2.5-flash
scripts/image_generate.py Generate or edit images agnes-image-2.1-flash
scripts/video_understand.py Analyze a video via sampled frames (requires ffmpeg) agnes-2.5-flash
scripts/video_generate.py Generate video and poll for result agnes-video-v2.0
scripts/smoke_chat.py Sanity-check the chat endpoint agnes-2.5-flash

2. references/prompt-templates.md

Ready-made prompt templates and structured-output schemas for all four modalities, plus JSON-output patterns for image and video generation.

3. references/prompt-components.md (new)

Condensed (~155 lines) prompt-assembly vocabulary for agnes-image-2.1-flash and agnes-video-v2.0: assembly formulas, 10 styles, 3-tier quality boosters, 8 lighting types, 8 composition types, categorized negative prompts (universal / human / video / style conflicts), and 8 camera-movement keywords. Mirrors the structure of the larger prompt-components skill but trimmed for this repo.

4. SKILL.md updates

  • Added a ## Runnable Helper Scripts section that documents the new scripts and their usage.
  • Added a ## Prompt Enhancement section that points agents at references/prompt-components.md and codifies the three-step interaction model (clear request → assemble, partial request → suggest, vague → ask up to 3 focused questions).
  • Bumped the default chat model in the Model Selection table to agnes-2.5-flash.

Why this is compatible

  • Same base URL, auth header, and AGNES_API_KEY env var the existing skill documents.
  • No new runtime dependencies beyond openai (already standard) and ffmpeg for video understanding.
  • Reference files are pure Markdown with MIT-licensed original content.

Notes for review

  • All script and reference files are MIT-licensed per the existing LICENSE style.
  • The two new commits are sequenced: feature commit then a small fix-up aligning the assembly formulas with their referenced sections.
  • No breaking changes to the existing skill surface — only additions and one default-model bump.

🤖 Generated with Claude Code

oh-summy and others added 3 commits July 31, 2026 08:49
Contribution proposed in AgnesAI-Labs#1, following the
structure requested by the maintainer:

- scripts/image_understand.py: image analysis via chat completions
  (agnes-2.5-flash); text/structured/JSON output; local files sent
  as data URLs.
- scripts/image_generate.py: text-to-image and image-to-image via
  agnes-image-2.1-flash; writes files only when --output is given.
- scripts/video_understand.py: frame sampling with ffmpeg plus
  multi-image chat completions analysis; URL inputs are fetched
  into a temporary directory that is removed on exit.
- scripts/video_generate.py: agnes-video-v2.0 task creation and
  video_id status polling via direct HTTP requests (httpx), as
  recommended by SKILL.md for endpoints the SDK does not expose;
  downloads only when --output is given.
- references/prompt-templates.md: prompt templates, structured
  output schemas, and parameter guidance for all four workflows.

All helpers resolve AGNES_API_KEY from the environment (covering
shell rc files on macOS/Linux and system settings on Windows) with
a .env file fallback (./.env.local, ./.env, skill dir, home dir),
and support AGNES_BASE_URL (default https://apihub.agnes-ai.com/v1)
with a one-time switch to the alternate international route on
network-level failures only. Transient HTTP errors (408/429/5xx)
are retried with exponential backoff; HTTP 400/401/403/422/429
never switch routes. Downloads use explicit timeouts. Secrets are
never logged. Style mirrors scripts/smoke_chat.py.

Offered under the MIT License, adapted from
https://github.com/oh-summy/skills.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Contribution offer: runnable helper scripts + prompt templates for image/video skills

1 participant