Agentverse deploy
Agent skills for interacting with Fetch.ai's Agentverse — portable SKILL.md format for Claude Code, Codex, Copilot, Cursor, Gemini CLI
npx -y skills add fetchai/agentverse-skills --skill agentverse-deployAssembled from the repository path, not quoted from the project. Check it against their README if it does not work.
One thing to look at
- 2 stars2 stars. Stars are a popularity signal and not a quality one, but at this level it is likely that nobody has read this closely except its author, and you would be relying on your own review.
What its author says it does
Copied from the file, not written here
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.
The file declares its own license as Apache-2.0. That is the author’s claim about this one file, and it is not the same thing as the license GitHub reports for the repository, which is listed with the other numbers below.
SKILL.md
3.7 KB, as published. Nobody here has run it
Agentverse Deploy
Overview
Deploy Python code as a hosted agent on Agentverse. The agent runs on Fetch.ai's infrastructure — no server needed. Creates the agent, uploads code in the correct format, and optionally starts it.
When to Use
- User asks to "deploy this as an agent on Agentverse"
- User asks to "host this code on Agentverse"
- User asks to "create a new hosted agent"
- User has Python agent code they want to run on Agentverse
Prerequisites
AGENTVERSE_API_KEYenvironment variable set- Python 3.8+ with
requests
Quick Steps
1. Deploy from a file
python3 scripts/deploy_agent.py --name "my-agent" --file ./my_agent_code.py --start
2. Deploy inline code
python3 scripts/deploy_agent.py --name "hello-agent" --code '
@agent.on_event("startup")
async def hello(ctx):
ctx.logger.info("Hello from my agent!")
'
3. Parse the result
{
"status": "success",
"name": "my-agent",
"address": "agent1q...",
"running": true
}
Critical: Hosted Agent Code Rules
Your code MUST follow these rules for the hosted environment:
- DO NOT create an
Agent()instance —agentis pre-created by the platform - DO NOT call
agent.run()— the platform manages the lifecycle - DO use
@agent.on_event("startup")for initialization - DO use
ctx.logger.info()for output (no print/stdout) - DO use
Protocolobjects andagent.include()for message handling
Valid hosted agent template:
from uagents import Context, Protocol
@agent.on_event("startup")
async def startup(ctx: Context):
ctx.logger.info(f"Agent started: {ctx.agent.address}")
@agent.on_interval(period=60.0)
async def periodic(ctx: Context):
ctx.logger.info("Running periodic task...")
With Chat Protocol:
from datetime import datetime
from uuid import uuid4
from uagents import Context, Protocol
from uagents_core.contrib.protocols.chat import (
ChatMessage, ChatAcknowledgement, TextContent, chat_protocol_spec
)
protocol = Protocol(spec=chat_protocol_spec)
@protocol.on_message(ChatMessage)
async def handle(ctx: Context, sender: str, msg: ChatMessage):
response = ChatMessage(
timestamp=datetime.now(), msg_id=uuid4(),
content=[TextContent(type="text", text="Hello! I received your message.")]
)
await ctx.send(sender, response)
agent.include(protocol, publish_manifest=True)
Code Upload Format
The API expects a specific format:
import json
files = [{"language": "python", "name": "agent.py", "value": your_code_string}]
payload = {"code": json.dumps(files)} # code is a JSON STRING of a list
The deploy script handles this automatically.
Edge Cases
- Name conflicts: Agent names don't need to be unique — addresses are unique
- Code errors: Check logs after starting (
agentverse-manage logs) - Import errors: Only standard library +
uagents+uagents_coreavailable in hosted env - File size: Keep code under 100KB