---
# System prepended metadata

title: Agentverse Agent Sample Prompts

---

# Agentverse Agent Sample Prompts

Collection of sample prompts for creating simple Agentverse agents with Chat Protocol v0.3.0 and automatic deployment.

---

## 1. Dice Rolling Agent

Create a dice rolling agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Accepts user requests like "roll 2d6" or "roll a 20-sided die"
- Parses dice notation (e.g., "2d6", "1d20", "3d10")
- Returns random dice roll results
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Include the complete dice rolling logic inline

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="DiceRoller")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="DiceRoller")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 2. Coin Toss Agent

Create a coin toss agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Accepts user requests like "flip a coin", "toss a coin", "heads or tails"
- Returns random results of "Heads" or "Tails"
- Can handle multiple flips (e.g., "flip 5 coins" returns list of results)
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Include the complete coin toss logic inline with random.choice(['Heads', 'Tails'])

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="CoinToss")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="CoinToss")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 3. Random Number Generator Agent

Create a random number generator agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Accepts requests like "random number between 1 and 100" or "generate 5 random numbers"
- Parses range from user input (e.g., "1 to 100", "between 50 and 200")
- Returns random numbers within the specified range
- Supports generating multiple random numbers at once
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Include regex parsing for range extraction (e.g., r'between (\d+) and (\d+)' or r'(\d+) to (\d+)')
- Use random.randint() for generating numbers

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="RandomNumberGen")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="RandomNumberGen")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 4. Unit Converter Agent

Create a unit converter agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Converts common units: temperature (C/F/K), distance (km/miles/meters), weight (kg/lbs/grams)
- Accepts requests like "convert 100 celsius to fahrenheit" or "10 miles to km"
- Parses unit types and values from user input
- Returns converted values with proper formatting
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Include conversion formulas inline: (C to F: F = C * 9/5 + 32), (km to miles: miles = km * 0.621371), (kg to lbs: lbs = kg * 2.20462)
- Parse input with regex to extract value and units

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="UnitConverter")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="UnitConverter")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 5. Magic 8-Ball Agent

Create a Magic 8-Ball fortune telling agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Responds to yes/no questions with random Magic 8-Ball style answers
- Accepts any question and returns one of 20 classic Magic 8-Ball responses
- Responses include positive ("It is certain"), negative ("Don't count on it"), and neutral ("Ask again later")
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Include list of 20 classic Magic 8-Ball responses inline (positive: "It is certain", "Without a doubt", "Yes definitely"; negative: "Don't count on it", "My reply is no"; neutral: "Ask again later", "Cannot predict now")
- Use random.choice() to select response

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="Magic8Ball")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="Magic8Ball")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 6. Password Generator Agent

Create a password generator agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Generates secure random passwords based on user requirements
- Accepts requests like "generate password 16 characters" or "password with symbols"
- Supports customization: length (8-64 chars), include/exclude symbols, numbers, uppercase
- Returns strong random passwords
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Use Python's secrets module for cryptographically secure randomness (secrets.choice())
- Parse length from query with regex (e.g., r'(\d+) character')
- Default to 16 characters with all character types if not specified

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="PasswordGen")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="PasswordGen")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 7. Time Zone Converter Agent

Create a time zone converter agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Converts times between major time zones (UTC, EST, PST, GMT, JST, CST, etc.)
- Accepts requests like "what time is 3pm EST in PST" or "convert 14:00 UTC to Tokyo time"
- Returns converted time with clear timezone labels
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Use Python's datetime and timedelta for timezone calculations
- Include timezone offset dictionary inline (e.g., {'UTC': 0, 'EST': -5, 'PST': -8, 'JST': +9})
- Parse time and timezones from query with regex

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="TimeZoneConverter")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="TimeZoneConverter")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 8. Simple Calculator Agent

Create a calculator agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Performs basic arithmetic operations: addition, subtraction, multiplication, division, power
- Accepts requests like "calculate 25 * 4" or "what is 100 divided by 5"
- Supports parentheses and order of operations
- Returns calculated results with the full expression
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Use Python's ast.literal_eval or safe eval with regex validation for calculations
- Validate input to prevent code injection (only allow digits, operators, parentheses, decimal points)
- Extract mathematical expression from query with regex

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="Calculator")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="Calculator")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 9. Quote of the Day Agent

Create a quote of the day agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Returns random inspirational quotes from a curated list
- Accepts requests like "give me a quote" or "inspire me" or "quote of the day"
- Includes author attribution with each quote
- Returns a different random quote each time
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Include list of 20-30 inspirational quotes with authors inline as dictionary or tuples
- Example quotes: ("The only way to do great work is to love what you do.", "Steve Jobs"), ("Innovation distinguishes between a leader and a follower.", "Steve Jobs")
- Use random.choice() to select quotes
- Format response as: "Quote" - Author

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="QuoteOfTheDay")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="QuoteOfTheDay")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## 10. Rock Paper Scissors Agent

Create a rock-paper-scissors game agent for Agentverse that:
- Uses Chat Protocol v0.3.0 (from uagents_core.contrib.protocols.chat)
- Plays rock-paper-scissors against the user
- Accepts user choices: "rock", "paper", or "scissors"
- Makes random choice for computer player
- Determines winner and returns result with explanation
- Must use agent = Agent() with NO parameters (Agentverse hosting)
- Should be stateless (no persistent storage needed)
- Save the complete working code to agent.py on disk

Important requirements:
- Import ChatMessage, ChatAcknowledgement, TextContent, EndSessionContent from uagents_core.contrib.protocols.chat
- Send ChatAcknowledgement FIRST before processing
- Include EndSessionContent in response
- Use ctx.logger (NOT print statements)
- No ASI1-Mini AI needed for this simple logic
- Include game logic inline (rock beats scissors, scissors beats paper, paper beats rock)
- Parse user choice from query text with regex or string matching
- Use random.choice(['rock', 'paper', 'scissors']) for computer choice
- Return formatted result like "You chose rock, I chose scissors. You win! 🎉" or "You chose paper, I chose scissors. I win!" or "We both chose rock. It's a tie!"

After saving to agent.py, deploy to Agentverse using MCP tools:

CRITICAL MCP TOOL USAGE:
- All agentverse MCP tools automatically use the configured API token from environment
- DO NOT pass api_token parameter explicitly - it's injected automatically by the system
- Tool names: mcp__agentverse__create_user_agent, mcp__agentverse__update_user_agent_code, etc.
- When calling tools, ONLY provide the required parameters (address, name, code) - NOT api_token

Deployment steps:
1. Create agent: Call mcp__agentverse__create_user_agent with ONLY name parameter (e.g., name="RockPaperScissors")
   - Extract the agent address from response
2. Read agent.py: Use Read tool to get file contents as string
3. Update code: Call mcp__agentverse__update_user_agent_code with:
   - address: the agent address from step 1
   - code: array with single object [{"name": "agent.py", "value": "<file_contents>", "language": "python"}]
   - DO NOT include api_token parameter
4. Start agent: Call mcp__agentverse__start_specific_user_agent with ONLY address parameter
5. Check logs: Call mcp__agentverse__get_latest_logs_for_user_agent with ONLY address parameter
6. If logs show errors:
   - Stop agent: Call mcp__agentverse__stop_specific_user_agent with ONLY address parameter
   - Fix code in agent.py
   - Read updated file
   - Update code again (step 3)
   - Start again (step 4)
   - Check logs again (step 5)
7. Repeat until logs show "Agent started" or "Agent ready" without errors

Example correct tool call format:
- ✅ mcp__agentverse__create_user_agent(name="RockPaperScissors")
- ✅ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[{"name": "agent.py", "value": "...", "language": "python"}])
- ❌ mcp__agentverse__update_user_agent_code(address="agent1q...", code=[...], api_token="...") ← WRONG, will cause 401 error

Note: API token is already configured in environment and injected automatically by MCP tool middleware.

Save to: agent.py

---

## Common Requirements for All Agents

### Code Requirements
- ✅ `agent = Agent()` with NO parameters
- ✅ Import from `uagents_core.contrib.protocols.chat`
- ✅ `Protocol(spec=chat_protocol_spec)`
- ✅ `ChatAcknowledgement` sent FIRST
- ✅ `EndSessionContent` in response
- ✅ `ctx.logger` (no print statements)
- ✅ `agent.include(chat_proto, publish_manifest=True)`

### Deployment Steps (Standard)
1. Create agent with `mcp__agentverse__create_user_agent(name="AgentName")`
2. Read agent.py file
3. Update code with `mcp__agentverse__update_user_agent_code(address="...", code=[...])`
4. Start with `mcp__agentverse__start_specific_user_agent(address="...")`
5. Check logs with `mcp__agentverse__get_latest_logs_for_user_agent(address="...")`
6. Debug loop: stop → fix → update → start → check logs

### Critical Reminders
- ⚠️ DO NOT pass `api_token` parameter to MCP tools
- ⚠️ Always stop agent before updating code
- ⚠️ Check logs after every start to verify no errors
- ⚠️ All agents are stateless for these simple use cases
