agentverse-image-gen
Generate images using AI agents on Fetch.ai's Agentverse. Sends a text prompt to an image generation agent and returns the generated image URL. Handles agent discovery, relay deployment, and response parsing automatically. Requires AGENTVERSE_API_KEY env var. Use when asked to generate, create, or make an image via Agentverse.
- License 许可
- Apache-2.0
- 最近更新
- 2026-06-30
- Stars
- ★ 2
- Forks
- 3
01 前言 Front Matter
- name
- agentverse-image-gen
- license
- Apache-2.0
- metadata
- { "author": "Fetch.ai", "version": "1.1.0", "last-updated": "2026-05-04" }
- description
- Generate images using AI agents on Fetch.ai's Agentverse. Sends a text prompt to an image generation agent and returns the generated image URL. Handles agent discovery, relay deployment, and response parsing automatically. Requires AGENTVERSE_API_KEY env var. Use when asked to generate, create, or make an image via Agentverse.
- allowed-tools
- Read Bash(python3 *) Bash(curl *) Bash(pip install requests)
- compatibility
- Python 3.8+, network access, AGENTVERSE_API_KEY env var
02 资源文件 1
- 脚本scripts/generate_image.py18.7 KB
03 SKILL.md 正文
Agentverse Image Generation
Overview
Generate images by sending text prompts to AI image generation agents on Agentverse. Returns a public URL to the generated image. Fully automatic — discovers agents, deploys relay, sends prompt, returns result.
When to Use
- User asks to "generate an image using Agentverse"
- User asks to "use an AI agent to create a picture"
- User wants AI-generated art via the Fetch.ai agent network
- User says "make me an image of..." in context of Agentverse
Prerequisites
AGENTVERSE_API_KEYenvironment variable set- Python 3.8+ with
requests
Quick Steps
1. Generate an image
python3 scripts/generate_image.py \
--prompt "A futuristic AI robot launching a rocket from a launchpad, cyberpunk style, neon colors" \
--wait 60
2. With a specific agent
python3 scripts/generate_image.py \
--prompt "A dragon made of circuit boards on a Tokyo rooftop at sunset" \
--agent "agent1qdynamic8lgnax37n20296xr4kcfllahlnse7gy5mrkdt4q9v9h06qkmclkl" \
--wait 60
3. Parse the result
When the image comes back as a CDN URL (e.g. Cloudinary), image_url is already browser-openable:
{
"status": "success",
"prompt": "A dragon made of circuit boards...",
"image_url": "https://res.cloudinary.com/fetch-ai/image/upload/v1776700090/dalle3-agent/0932ec14-...",
"metadata": {},
"target_agent": "agent1q0utywlfr3dfrfkwk4fjmtdrfew0zh692untdlr877d6ay8ykwpewydmxtl",
"relay_agent": "agent1q...",
"wait_time_seconds": 35,
"all_responses": [{"type": "text", "text": "Generating..."}, "..."]
}
When the image comes back as an agent-storage:// URI, the response also includes public_url — a direct HTTPS URL you can open in a browser or download:
{
"status": "success",
"prompt": "A sunset over Tokyo",
"image_url": "agent-storage://https://agentverse.ai/v1/storage/47cecfda-8d6f-4c21-80ab-10c4d8d052bb",
"public_url": "https://agentverse.ai/v1/storage/47cecfda-8d6f-4c21-80ab-10c4d8d052bb",
"metadata": {"mime_type": "image/png", "role": "generated-image"},
"target_agent": "agent1q0utywlfr3dfrfkwk4fjmtdrfew0zh692untdlr877d6ay8ykwpewydmxtl",
"relay_agent": "agent1q...",
"wait_time_seconds": 45,
"all_responses": [...]
}
Use
public_url(when present) to open or display the image. Fall back toimage_urlfor CDN-hosted images.
How It Works
- Discover agent: If no
--agentspecified, searches for image generation agents - Deploy relay: Creates/reuses a hosted agent as a message relay
- Send prompt: Sends
ChatMessagewith your prompt asTextContent - Wait for generation: Image agents typically take 20-45 seconds
- Extract URL: Parses
ResourceContentfrom response logs - Return: Outputs JSON with the image URL
Default Agent
If you don't specify --agent, the script uses the well-known Fetch.ai DALL-E 3 image agent:
agent1q0utywlfr3dfrfkwk4fjmtdrfew0zh692untdlr877d6ay8ykwpewydmxtl
This agent generates images using DALL-E 3 and returns them as Cloudinary URLs.
Timing
- ACK: ~1 second (confirms message received)
- Image generation: 20-45 seconds (model inference + upload)
- Recommended --wait: 60 seconds (safe margin)
Edge Cases
- Timeout: If no image after 60s, the agent may be overloaded — retry later
- Text response instead of image: Some agents respond with text first, then image. Increase
--wait - Agent offline: Use
agentverse-searchto find alternative image agents - Large prompts: Keep prompts under 500 characters for best results
Example Prompts That Work Well
- "A futuristic AI robot launching a rocket, cyberpunk style"
- "A cat astronaut floating in space with Earth in the background"
- "A dragon made of circuit boards standing on a Tokyo rooftop at sunset"
- "An underwater city with bioluminescent buildings and fish"
References
- Uses
agentverse-chatpattern internally - Agentverse agents directory
04 同仓库更多 Skills
asi1-chat
Query the ASI:One LLM — the AI model by the ASI Alliance (Fetch.ai + SingularityNET + Ocean Protocol). OpenAI-compatible API. Supports asi1 (default) and asi1-mini models. Requires ASI_ONE_API_KEY env var. Use when asked to "use ASI", "query ASI:One", or "use the Fetch.ai LLM".
agentverse-search
Search Fetch.ai's Agentverse for agents by keyword, capability, or protocol. Returns agent names, addresses, descriptions, and supported protocols. Use when asked to find, discover, or list available agents on Agentverse. Requires AGENTVERSE_API_KEY env var.
agentverse-memory
Give any AI agent persistent, graph-native memory via Agentverse Memory — a managed MCP service with 35 JSON-RPC tools covering 4 memory types (episodic, semantic/graph, procedural, working) plus shared multi-agent memory spaces. Zero LLM at write time (<5ms writes, $0 ingest). Graph memory on every tier — including free. Hybrid retrieval (TF-IDF + dense, RRF-fused). Requires AM_API_KEY env var. Use when asked to store memories, recall past events, build a knowledge graph, share memory between agents, or retrieve facts about users/tasks.
agentverse-manage
Manage hosted agents on Fetch.ai's Agentverse: list, start, stop, view logs, and delete agents. Provides operational control over your deployed agents. Requires AGENTVERSE_API_KEY env var. Use when asked to list agents, check agent status, view logs, start/stop agents, or clean up.
agentverse-inspect
Inspect any agent's capabilities, protocols, endpoints, and status on Fetch.ai's Agentverse Almanac. Use to understand what an agent can do before interacting with it. Requires AGENTVERSE_API_KEY env var. Use when asked to "inspect", "check", or "what can this agent do".
agentverse-deploy
Deploy Python code as a hosted agent on Fetch.ai's Agentverse. Creates a new agent, uploads code, and optionally starts it. Handles the tricky code upload format automatically. Requires AGENTVERSE_API_KEY env var. Use when asked to deploy, host, or publish an agent on Agentverse.