diff --git a/1-uagents/07-mailbox-agents/alice.py b/1-uagents/07-mailbox-agents/alice.py index d0f15f5..aee94d0 100644 --- a/1-uagents/07-mailbox-agents/alice.py +++ b/1-uagents/07-mailbox-agents/alice.py @@ -9,12 +9,10 @@ class Message(Model): print(f"Your agent's address is: {Agent(seed=ALICE_SEED).address}") -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" - agent = Agent( name="alice", seed=ALICE_SEED, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) diff --git a/1-uagents/07-mailbox-agents/bob.py b/1-uagents/07-mailbox-agents/bob.py index b63cba6..1996b93 100644 --- a/1-uagents/07-mailbox-agents/bob.py +++ b/1-uagents/07-mailbox-agents/bob.py @@ -10,12 +10,10 @@ class Message(Model): print(f"Your agent's address is: {Agent(seed=BOB_SEED).address}") -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" - bob = Agent( name="bob", seed=BOB_SEED, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) diff --git a/5-documentation/examples/intermediate/agent-and-function-api/agent.py b/5-documentation/examples/intermediate/agent-and-function-api/agent.py index 14fdf0a..e33dc49 100644 --- a/5-documentation/examples/intermediate/agent-and-function-api/agent.py +++ b/5-documentation/examples/intermediate/agent-and-function-api/agent.py @@ -10,15 +10,11 @@ class Coordinates(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" - # Now your agent is ready to join the agentverse! location_agent = Agent( name="location_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) diff --git a/5-documentation/examples/intermediate/coin-toss/local/agent.py b/5-documentation/examples/intermediate/coin-toss/local/agent.py index 0faf805..f432d86 100644 --- a/5-documentation/examples/intermediate/coin-toss/local/agent.py +++ b/5-documentation/examples/intermediate/coin-toss/local/agent.py @@ -11,15 +11,12 @@ class CoinToss(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! coin_toss_agent = Agent( name="coin_toss_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) diff --git a/5-documentation/examples/intermediate/dice-roll/local/agent.py b/5-documentation/examples/intermediate/dice-roll/local/agent.py index 227838e..d43e610 100644 --- a/5-documentation/examples/intermediate/dice-roll/local/agent.py +++ b/5-documentation/examples/intermediate/dice-roll/local/agent.py @@ -11,15 +11,12 @@ class DiceRoll(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! dice_roll_agent = Agent( name="dice_roll_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_agent.py b/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_agent.py index b4bd94d..898911e 100644 --- a/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_agent.py +++ b/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_agent.py @@ -21,13 +21,13 @@ LANGCHAIN_RAG_SEED = "YOUR_LANGCHAIN_RAG_SEED" -AGENT_MAILBOX_KEY = "YOUR_MAILBOX_KEY" agent = Agent( name="langchain_rag_agent", seed=LANGCHAIN_RAG_SEED, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) + fund_agent_if_low(agent.wallet.address()) docs_bot_protocol = Protocol("DocsBot") diff --git a/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_user.py b/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_user.py index b73e500..f5b91c2 100644 --- a/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_user.py +++ b/5-documentation/examples/intermediate/langchain-rag/src/agents/langchain_rag_user.py @@ -35,4 +35,4 @@ async def handle_data(ctx: Context, sender: str, data: UAgentResponse): user.include(rag_user) if __name__ == "__main__": - user.run() + user.run() \ No newline at end of file diff --git a/5-documentation/examples/intermediate/local-agent-langchain/agent.py b/5-documentation/examples/intermediate/local-agent-langchain/agent.py index a95b581..e9de63e 100644 --- a/5-documentation/examples/intermediate/local-agent-langchain/agent.py +++ b/5-documentation/examples/intermediate/local-agent-langchain/agent.py @@ -16,13 +16,11 @@ class WikiReq(Model): # Copy the address shown below print(f"Your agent's address is: {Agent(seed=SEED_PHRASE).address}") -AGENT_MAILBOX_KEY = "Your_mailbox_address" - # Now your agent is ready to join the agentverse! WikiAgent = Agent( name="Wiki Agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) wiki_protocol = Protocol("Wiki Protocol") diff --git a/5-documentation/examples/intermediate/mailbox-agents/local/agent_1.py b/5-documentation/examples/intermediate/mailbox-agents/local/agent_1.py index c184b42..5df3a6e 100644 --- a/5-documentation/examples/intermediate/mailbox-agents/local/agent_1.py +++ b/5-documentation/examples/intermediate/mailbox-agents/local/agent_1.py @@ -8,15 +8,12 @@ class Message(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! agent = Agent( name="alice", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) diff --git a/5-documentation/examples/intermediate/news-reading-system/generate-categorical-news/local/agent.py b/5-documentation/examples/intermediate/news-reading-system/generate-categorical-news/local/agent.py index 2824b9a..d3c5dec 100644 --- a/5-documentation/examples/intermediate/news-reading-system/generate-categorical-news/local/agent.py +++ b/5-documentation/examples/intermediate/news-reading-system/generate-categorical-news/local/agent.py @@ -14,15 +14,12 @@ class GenerateNews(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! generate_cat_news_agent = Agent( name="generate_cat_news_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/examples/intermediate/news-reading-system/generate-keyword-news/local/agent.py b/5-documentation/examples/intermediate/news-reading-system/generate-keyword-news/local/agent.py index 5d720ee..6cf58ef 100644 --- a/5-documentation/examples/intermediate/news-reading-system/generate-keyword-news/local/agent.py +++ b/5-documentation/examples/intermediate/news-reading-system/generate-keyword-news/local/agent.py @@ -12,15 +12,12 @@ class GenerateNews(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! generate_news_keyw_agent = Agent( name="generate_news_keyw_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/examples/intermediate/news-reading-system/generate-regional-news/local/agent.py b/5-documentation/examples/intermediate/news-reading-system/generate-regional-news/local/agent.py index b4f7f9a..9ae539b 100644 --- a/5-documentation/examples/intermediate/news-reading-system/generate-regional-news/local/agent.py +++ b/5-documentation/examples/intermediate/news-reading-system/generate-regional-news/local/agent.py @@ -68,15 +68,12 @@ class GenerateNews(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! generate_news_reg_agent = Agent( name="generate_news_reg_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/examples/intermediate/news-reading-system/news-generating-agent/local/agent.py b/5-documentation/examples/intermediate/news-reading-system/news-generating-agent/local/agent.py index 298fcb8..ad6a8dd 100644 --- a/5-documentation/examples/intermediate/news-reading-system/news-generating-agent/local/agent.py +++ b/5-documentation/examples/intermediate/news-reading-system/news-generating-agent/local/agent.py @@ -14,15 +14,12 @@ class GenerateNews(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! generate_news_agent = Agent( name="generate_news_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/examples/intermediate/news-reading-system/news-reading-agent/local/agent.py b/5-documentation/examples/intermediate/news-reading-system/news-reading-agent/local/agent.py index aa5d834..871cffd 100644 --- a/5-documentation/examples/intermediate/news-reading-system/news-reading-agent/local/agent.py +++ b/5-documentation/examples/intermediate/news-reading-system/news-reading-agent/local/agent.py @@ -13,15 +13,12 @@ class News(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! news_agent = Agent( name="news_agent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/examples/intermediate/running-an-agent-on-agentverse/mailbox-agent.py b/5-documentation/examples/intermediate/running-an-agent-on-agentverse/mailbox-agent.py index a067fad..a5dc15b 100644 --- a/5-documentation/examples/intermediate/running-an-agent-on-agentverse/mailbox-agent.py +++ b/5-documentation/examples/intermediate/running-an-agent-on-agentverse/mailbox-agent.py @@ -7,12 +7,11 @@ class Message(Model): SEED_PHRASE = "put_your_seed_phrase_here" -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" agent = Agent( name="MailboxTestAgent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) print(f"Your agent's address is: {agent.address}") diff --git a/5-documentation/guides/agent-courses/agents-for-ai/sentiment_agent.py b/5-documentation/guides/agent-courses/agents-for-ai/sentiment_agent.py index 3ebf6e4..c6a69c4 100644 --- a/5-documentation/guides/agent-courses/agents-for-ai/sentiment_agent.py +++ b/5-documentation/guides/agent-courses/agents-for-ai/sentiment_agent.py @@ -8,12 +8,11 @@ class SentimentResponse(Model): SEED_PHRASE = "" -AGENT_MAILBOX_KEY = "" sentimentagent = Agent( name="SentimentAgent", # or any name seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) print(sentimentAgent.address) diff --git a/5-documentation/guides/agent-courses/agents-for-ai/web_sentiment_agent.py b/5-documentation/guides/agent-courses/agents-for-ai/web_sentiment_agent.py index 454ed88..98c5425 100644 --- a/5-documentation/guides/agent-courses/agents-for-ai/web_sentiment_agent.py +++ b/5-documentation/guides/agent-courses/agents-for-ai/web_sentiment_agent.py @@ -12,13 +12,12 @@ class SummaryRequest(Model): SEED_PHRASE = "" -AGENT_MAILBOX_KEY = "" OPENAI_API_KEY = "" summaryAgent = Agent( name="SummaryAgent", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) summary_protocol = Protocol("Text Summariser") diff --git a/5-documentation/guides/agents/intermediate/agent-types/mailbox_agent.py b/5-documentation/guides/agents/intermediate/agent-types/mailbox_agent.py index 4db5938..63d9930 100644 --- a/5-documentation/guides/agents/intermediate/agent-types/mailbox_agent.py +++ b/5-documentation/guides/agents/intermediate/agent-types/mailbox_agent.py @@ -5,14 +5,13 @@ class Message(Model): message: str -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" SEED_PHRASE = "put_your_seed_phrase_here" # Now your agent is ready to join the agentverse! agent = Agent( name="alice", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai" + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent.py b/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent.py index ab82298..0aac4a7 100644 --- a/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent.py +++ b/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent.py @@ -3,14 +3,13 @@ class Message(Model): message: str -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" SEED_PHRASE = "put_your_seed_phrase_here" # Now your agent is ready to join the agentverse! agent = Agent( name="alice", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent_updated.py b/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent_updated.py index 831401f..806ba00 100644 --- a/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent_updated.py +++ b/5-documentation/guides/agents/intermediate/mailbox/mailbox_agent_updated.py @@ -3,14 +3,13 @@ class Message(Model): message: str -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" SEED_PHRASE = "put_your_seed_phrase_here" # Now your agent is ready to join the agentverse! agent = Agent( name="alice", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) print(f"Your agent's address is: {agent.address}") diff --git a/5-documentation/guides/agents/intermediate/options-for-running-local-agents/agent_mailbox.py b/5-documentation/guides/agents/intermediate/options-for-running-local-agents/agent_mailbox.py index aed007e..6f1c421 100644 --- a/5-documentation/guides/agents/intermediate/options-for-running-local-agents/agent_mailbox.py +++ b/5-documentation/guides/agents/intermediate/options-for-running-local-agents/agent_mailbox.py @@ -8,15 +8,12 @@ class Message(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's utilising-the-mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" # Now your agent is ready to join the agentverse! agent = Agent( name="alice", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) # Copy the address shown below diff --git a/5-documentation/guides/agentverse/agentverse-mailbox/utilising-the-mailbox/local_agent_setup.py b/5-documentation/guides/agentverse/agentverse-mailbox/utilising-the-mailbox/local_agent_setup.py index 2f0f6e6..f17c192 100644 --- a/5-documentation/guides/agentverse/agentverse-mailbox/utilising-the-mailbox/local_agent_setup.py +++ b/5-documentation/guides/agentverse/agentverse-mailbox/utilising-the-mailbox/local_agent_setup.py @@ -8,20 +8,15 @@ class Message(Model): # First generate a secure seed phrase (e.g. https://pypi.org/project/mnemonic/) SEED_PHRASE = "put_your_seed_phrase_here" -# Copy the address shown below -print(f"Your agent's address is: {agent.address}") - -# Now go to https://agentverse.ai, register your agent in the Mailroom by providing the address you just copied. -# Then, copy the agent's mailbox key and insert it here below inline -AGENT_MAILBOX_KEY = "put_your_AGENT_MAILBOX_KEY_here" - # Now your agent is ready to join the agentverse! agent = Agent( name="alice", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) +# Copy the address shown below +print(f"Your agent's address is: {agent.address}") @agent.on_message(model=Message, replies={Message}) async def handle_message(ctx: Context, sender: str, msg: Message): diff --git a/5-documentation/guides/quickstart-with/CrewAI/startup-idea-analyser/agent.py b/5-documentation/guides/quickstart-with/CrewAI/startup-idea-analyser/agent.py index 1dd3094..dfaf938 100644 --- a/5-documentation/guides/quickstart-with/CrewAI/startup-idea-analyser/agent.py +++ b/5-documentation/guides/quickstart-with/CrewAI/startup-idea-analyser/agent.py @@ -6,13 +6,12 @@ from crew_ai import MarketResearchProcess -AGENT_MAILBOX_KEY = os.environ.get("AGENT_MAILBOX_KEY") SEED_PHRASE = "YOUR_SEED_PHRASE" agent = Agent( name="startup idea analyzer", seed=SEED_PHRASE, - mailbox=f"{AGENT_MAILBOX_KEY}@https://agentverse.ai", + mailbox=True ) protocol = Protocol("Startup idea Analyzer version", version="0.1.2")