Install any skill in seconds. Free to start, no credit card required.
Get Started Free →Send messages to any agent on Fetch.ai's Agentverse and receive responses. Handles text, images, and structured data. Uses the Agentverse Hosting API to deploy a relay agent that communicates via the Agent Chat Protocol. Requires AGENTVERSE_API_KEY env var. Use when asked to interact with, message, or communicate with an Agentverse agent.
| Test case | Without → With | Effect | Δ tokens | Δ turns |
|---|---|---|---|---|
| case-01 | ✗→✓ | ▲ Improved | 8% | 0% |
| case-05 | ✗→✓ | ▲ Improved | 52% | 0% |
| case-06 | ✗→✓ | ▲ Improved | 31% | 0% |
| case-08 | ✗→✓ | ▲ Improved | 48% | 0% |
| case-09 | ✗→✓ | ▲ Improved | 21% | 0% |
Talk to any agent on Fetch.ai's Agentverse. Send a message, get a response — text, images, files, or structured data. Works with any agent that supports the Agent Chat Protocol.
agent1q...)agentverse-image-gen instead (higher-level)agentverse-search firstagentverse-deployAGENTVERSE_API_KEY environment variable setrequests:bash pip install requests
bashpython3 -c "import os; k=os.environ.get('AGENTVERSE_API_KEY',''); print('✓ Key set' if k else '✗ Set AGENTVERSE_API_KEY')"
bashpython3 scripts/agentverse_chat.py \ --target "agent1qdynamic8lgnax37n20296xr4kcfllahlnse7gy5mrkdt4q9v9h06qkmclkl" \ --message "Hello! What can you do?" \ --wait 30
The script outputs JSON to stdout:
json{ "status": "success", "responses": [ {"type": "text", "text": "I can generate images from text prompts!"} ], "relay_agent": "agent1q...", "target": "agent1q...", "wait_time_seconds": 12 }
ChatMessage to the target agentRESULT: entriescode field must be json.dumps([{"language":"python","name":"agent.py","value":"..."}]) — a JSON string containing a listagent object is pre-created by the platform. Never call Agent() or agent.run()ctx.logger.info() in hosted code — no stdout/stderr--start-session)Some agents — particularly stateful or multi-turn agents — require an explicit session start before they respond to ChatMessage. Use --start-session to send a StartSessionContent message first:
bashpython3 scripts/agentverse_chat.py \ --target "agent1q..." \ --message "Hello!" \ --start-session \ --wait 60
Which agents need --start-session?
| Agent type | Needs --start-session? | |------------|--------------------------| | Simple stateless agents (most) | ❌ No | | Multi-turn conversational agents | ✅ Yes | | Agents that track session context | ✅ Yes | | Image generation agents | ❌ No (use agentverse-image-gen instead) |
If an agent silently times out even though it's known to be active, try adding --start-session to trigger the session handshake.
--wait (some agents take 60s+)--start-sessionIf you need to implement the chat pattern without the script:
pythonimport requests, json, time, os API_KEY = os.environ["AGENTVERSE_API_KEY"] BASE = "https://agentverse.ai/v1/hosting/agents" HEADERS = {"Authorization": f"Bearer {API_KEY}", "Content-Type": "application/json"} # 1. Get a relay agent agents = requests.get(BASE, headers=HEADERS).json() relay = agents["items"][0]["address"] # Use first available # 2. Upload client code code = ''' 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 ) TARGET = "agent1q..." protocol = Protocol(spec=chat_protocol_spec) @agent.on_event("startup") async def send(ctx: Context): await ctx.send(TARGET, ChatMessage( timestamp=datetime.now(), msg_id=uuid4(), content=[TextContent(type="text", text="Your message here")] )) @protocol.on_message(ChatMessage) async def recv(ctx: Context, sender: str, msg: ChatMessage): for item in msg.content: ctx.logger.info("RESULT:" + str(item.dict())) agent.include(protocol, publish_manifest=True) ''' files = [{"language": "python", "name": "agent.py", "value": code}] requests.put(f"{BASE}/{relay}/code", headers=HEADERS, json={"code": json.dumps(files)}) # 3. Start, wait, read logs requests.post(f"{BASE}/{relay}/start", headers=HEADERS) time.sleep(35) logs = requests.get(f"{BASE}/{relay}/logs/latest", headers=HEADERS).json() # 4. Extract results results = [e["log_entry"][7:] for e in logs if e.get("log_entry","").startswith("RESULT:")] # 5. Stop requests.post(f"{BASE}/{relay}/stop", headers=HEADERS)
Other measured skills in the registry, with their headline benchmark lift.