PageSourceSearch

https://innovationlab.fetch.ai/resources/assets/js/3d782928.510b002a.js

js fetch.ai collected 2026-09-24 09:38:26 UTC 29,614 bytes, 1 lines download raw bytes

1"use strict";(self.webpackChunkinnovation_labs=self.webpackChunkinnovation_labs||[]).push([[570],{43887:(e,n,t)=>{t.r(n),t.d(n,{assets:()=>o,contentTitle:()=>l,default:()=>g,frontMatter:()=>s,metadata:()=>r,toc:()=>d});const r=JSON.parse('{"id":"examples/adapters/crewai-adapter-example","title":"CrewAI Adapter Example","description":"This example demonstrates how to integrate a CrewAI multi-agent system with the uAgents ecosystem using the uAgents Adapter package. CrewAI allows you to create collaborative teams of AI agents working together to accomplish complex tasks.","source":"@site/versioned_docs/version-1.0.3/examples/adapters/crewai-adapter.md","sourceDirName":"examples/adapters","slug":"/examples/adapters/crewai-adapter-example","permalink":"/resources/docs/1.0.3/examples/adapters/crewai-adapter-example","draft":false,"unlisted":false,"tags":[],"version":"1.0.3","frontMatter":{"id":"crewai-adapter-example","title":"CrewAI Adapter Example"},"sidebar":"tutorialSidebar","previous":{"title":"Solana Wallet Balance Agent","permalink":"/resources/docs/1.0.3/examples/chat-protocol/solana-wallet-agent"},"next":{"title":"LangGraph Adapter Example","permalink":"/resources/docs/1.0.3/examples/adapters/langgraph-adapter-example"}}');var a=t(74848),i=t(28453);const s={id:"crewai-adapter-example",title:"CrewAI Adapter Example"},l="CrewAI Adapter for uAgents",o={},d=[{value:"Overview",id:"overview",level:2},{value:"Trip Planner Example",id:"trip-planner-example",level:2},{value:"Standard CrewAI Implementation",id:"standard-crewai-implementation",level:3},{value:"uAgents Integration",id:"uagents-integration",level:3},{value:"Key Differences in uAgents Integration",id:"key-differences-in-uagents-integration",level:2},{value:"Specialized Agents in the Trip Planner",id:"specialized-agents-in-the-trip-planner",level:2},{value:"Interacting with the Trip Planner",id:"interacting-with-the-trip-planner",level:2},{value:"Benefits of the uAgents Integration",id:"benefits-of-the-uagents-integration",level:2},{value:"Getting Started",id:"getting-started",level:2},{value:"Expected Outputs",id:"expected-outputs",level:2},{value:"Standard CrewAI (<code>main.py</code>)",id:"standard-crewai-mainpy",level:3},{value:"uAgents Integration (<code>main_uagents.py</code>)",id:"uagents-integration-main_uagentspy",level:3},{value:"Client Agent (<code>client_agent.py</code>)",id:"client-agent-client_agentpy",level:3}];function c(e){const n={a:"a",code:"code",h1:"h1",h2:"h2",h3:"h3",header:"header",li:"li",ol:"ol",p:"p",pre:"pre",strong:"strong",ul:"ul",...(0,i.R)(),...e.components};return(0,a.jsxs)(a.Fragment,{children:[(0,a.jsx)(n.header,{children:(0,a.jsx)(n.h1,{id:"crewai-adapter-for-uagents",children:"CrewAI Adapter for uAgents"})}),"\n",(0,a.jsxs)(n.p,{children:["This example demonstrates how to integrate a ",(0,a.jsx)(n.strong,{children:"CrewAI multi-agent system"})," with the ",(0,a.jsx)(n.strong,{children:"uAgents ecosystem"})," using the uAgents Adapter package. CrewAI allows you to create collaborative teams of AI agents working together to accomplish complex tasks."]}),"\n",(0,a.jsx)(n.h2,{id:"overview",children:"Overview"}),"\n",(0,a.jsx)(n.p,{children:"The CrewAI adapter enables:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"Creating specialized agent teams with distinct roles and responsibilities"}),"\n",(0,a.jsx)(n.li,{children:"Orchestrating complex workflows between different AI agents"}),"\n",(0,a.jsx)(n.li,{children:"Exposing CrewAI teams as uAgents for seamless communication with the broader agent ecosystem"}),"\n",(0,a.jsx)(n.li,{children:"Deploying CrewAI applications to the Agentverse network"}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"trip-planner-example",children:"Trip Planner Example"}),"\n",(0,a.jsx)(n.p,{children:"Let's look at a real-world example of a trip planning system with multiple specialized agents working together to create a complete travel itinerary. We'll compare the standard CrewAI implementation with the uAgents-integrated version."}),"\n",(0,a.jsx)(n.h3,{id:"standard-crewai-implementation",children:"Standard CrewAI Implementation"}),"\n",(0,a.jsx)(n.p,{children:"First, let's look at how a standard CrewAI 
1system is implemented without uAgents integration:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'# Standard main.py\nfrom textwrap import dedent\n\nfrom crewai import Crew\nfrom dotenv import load_dotenv\n\nfrom trip_agents import TripAgents\nfrom trip_tasks import TripTasks\n\nload_dotenv()\n\n\nclass TripCrew:\n    def __init__(self, origin, cities, date_range, interests):\n        self.cities = cities\n        self.origin = origin\n        self.interests = interests\n        self.date_range = date_range\n\n    def run(self):\n        agents = TripAgents()\n        tasks = TripTasks()\n\n        city_selector_agent = agents.city_selection_agent()\n        local_expert_agent = agents.local_expert()\n        travel_concierge_agent = agents.travel_concierge()\n\n        identify_task = tasks.identify_task(\n            city_selector_agent,\n            self.origin,\n            self.cities,\n            self.interests,\n            self.date_range,\n        )\n        gather_task = tasks.gather_task(local_expert_agent, self.origin, self.interests, self.date_range)\n        plan_task = tasks.plan_task(travel_concierge_agent, self.origin, self.interests, self.date_range)\n\n        crew = Crew(\n            agents=[city_selector_agent, local_expert_agent, travel_concierge_agent],\n            tasks=[identify_task, gather_task, plan_task],\n            verbose=True,\n        )\n\n        result = crew.kickoff()\n        return result\n\n\nif __name__ == "__main__":\n    print("## Welcome to Trip Planner Crew")\n    print("-------------------------------")\n    location = input(\n        dedent("""\n      From where will you be traveling from?\n    """)\n    )\n    cities = input(\n        dedent("""\n      What are the cities options you are interested in visiting?\n    """)\n    )\n    date_range = input(\n        dedent("""\n      What is the date range you are interested in traveling?\n    """)\n    )\n    interests = input(\n        dedent("""\n      What are some of your high level interests and hobbies?\n    """)\n    )\n\n    trip_crew = TripCrew(location, cities, date_range, interests)\n    result = trip_crew.run()\n    print("\\n\\n########################")\n    print("## Here is you Trip Plan")\n    print("########################\\n")\n    print(result)\n'})}),"\n",(0,a.jsx)(n.h3,{id:"uagents-integration",children:"uAgents Integration"}),"\n",(0,a.jsx)(n.p,{children:"Now, let's see how we can integrate this same CrewAI system with uAgents to enable network communication:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'#!/usr/bin/env python3\n"""Trip Planner script using CrewAI adapter for uAgents."""\n\nimport os\n\nfrom crewai import Crew\nfrom dotenv import load_dotenv\nfrom uagents_adapter import CrewaiRegisterTool\n\nfrom trip_agents import TripAgents\nfrom trip_tasks import TripTasks\n\n\nclass TripCrew:\n    def __init__(self, origin, cities, date_range, interests):\n        self.cities = cities\n        self.origin = origin\n        self.interests = interests\n        self.date_range = date_range\n\n    def run(self):\n        agents = TripAgents()\n        tasks = TripTasks()\n\n        city_selector_agent = agents.city_selection_agent()\n        local_expert_agent = agents.local_expert()\n        travel_concierge_agent = agents.travel_concierge()\n\n        identify_task = tasks.identify_task(\n            city_selector_agent,\n            self.origin,\n            self.cities,\n            self.interests,\n            self.date_range,\n        )\n        gather_task = tasks.gather_task(local_expert_agent, self.origin, self.interests, self.date_range)\n        plan_task = tasks.plan_task(travel_concierge_agent, self.origin, self.interests, self.date_range)\n\n        crew = Crew(\n            agents=[city_selector_agent, local_expert_agent, travel_concierge_agent],\n            tasks=[identify_task, gather_task, plan_task],\n            verbose=True,\n        )\n\n        result = crew.kickoff()\n        return result\n\n    def kickoff(self, inputs=None):\n        """\n        Compatibility method for uAgents integration.\n        Accepts a dictionary of inputs and calls run() with them.\n        """\n        if inputs:\n            self.origin = input
1s.get("origin", self.origin)\n            self.cities = inputs.get("cities", self.cities)\n            self.date_range = inputs.get("date_range", self.date_range)\n            self.interests = inputs.get("interests", self.interests)\n\n        return self.run()\n\n\ndef main():\n    """Main function to demonstrate Trip Planner with CrewAI adapter."""\n\n    # Load API key from environment\n    load_dotenv()\n    api_key = os.getenv("AGENTVERSE_API_KEY")\n    openai_api_key = os.getenv("OPENAI_API_KEY")\n    if not api_key:\n        print("Error: AGENTVERSE_API_KEY not found in environment")\n        return\n\n    if not openai_api_key:\n        print("Error: OPENAI_API_KEY not found in environment")\n        return\n\n    # Set OpenAI API key in environment\n    os.environ["OPENAI_API_KEY"] = openai_api_key\n\n    # Create an instance of TripCrew with default empty values\n    trip_crew = TripCrew("", "", "", "")\n\n    # Create tool for registering the crew with Agentverse\n    register_tool = CrewaiRegisterTool()\n\n    # Define parameters schema for the trip planner\n    query_params = {\n        "origin": {"type": "str", "required": True},\n        "cities": {"type": "str", "required": True},\n        "date_range": {"type": "str", "required": True},\n        "interests": {"type": "str", "required": True},\n    }\n\n    # Register the crew with parameter schema\n    result = register_tool.run(\n        tool_input={\n            "crew_obj": trip_crew,\n            "name": "Trip Planner Crew AI Agent adapters",\n            "port": 8080,\n            "description": "A CrewAI agent that helps plan trips based on preferences",\n            "api_token": api_key,\n            "mailbox": True,\n            "query_params": query_params,\n            "example_query": "Plan a trip from New York to Paris in June, I\'m interested in art and history other than museums.",\n        }\n    )\n\n    # Get the agent address from the result\n    if isinstance(result, dict) and "address" in result:\n        result["address"]\n\n    print(f"\\nCrewAI agent registration result: {result}")\n\n    # Keep the program running\n    try:\n        while True:\n            import time\n\n            time.sleep(1)\n    except KeyboardInterrupt:\n        print("\\nExiting...")\n\n\nif __name__ == "__main__":\n    main()\n'})}),"\n",(0,a.jsx)(n.h2,{id:"key-differences-in-uagents-integration",children:"Key Differences in uAgents Integration"}
1),"\n",(0,a.jsx)(n.p,{children:"When integrating a CrewAI system with uAgents, there are several important differences:"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"CrewaiRegisterTool"}),":"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["Uses the specialized ",(0,a.jsx)(n.code,{children:"CrewaiRegisterTool"})," instead of the generic ",(0,a.jsx)(n.code,{children:"UAgentRegisterTool"}),"."]}),"\n",(0,a.jsx)(n.li,{children:"This tool is specifically designed to handle CrewAI's collaborative agent structure."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Kickoff Method"}),":"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["The ",(0,a.jsx)(n.code,{children:"TripCrew"})," class has an additional ",(0,a.jsx)(n.code,{children:"kickoff"})," method that serves as an adapter between uAgents messages and the CrewAI system."]}),"\n",(0,a.jsx)(n.li,{children:"It extracts parameters from the input dictionary and passes them to the actual execution method."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Parameter Schema"}),":"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:["A ",(0,a.jsx)(n.code,{children:"query_params"})," schema is defined to validate and structure inputs to the CrewAI system."]}),"\n",(0,a.jsx)(n.li,{children:"This allows for better error handling and client guidance when using the agent."}),"\n"]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:[(0,a.jsx)(n.strong,{children:"Example Query"}),":"]}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsx)(n.li,{children:"An example query is provided to help users understand the expected input format."}),"\n",(0,a.jsx)(n.li,{children:"This improves usability when interacting with the agent through chat protocols."}),"\n"]}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"specialized-agents-in-the-trip-planner",children:"Specialized Agents in the Trip Planner"}),"\n",(0,a.jsxs)(n.p,{children:["The trip planning system uses three specialized agents, defined in ",(0,a.jsx)(n.code,{children:"trip_agents.py"}),":"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"City Selection Agent"}),": Analyzes client preferences to select the optimal city to visit"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Local Expert"}),": Identifies authentic local experiences and hidden gems"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Travel Concierge"}),": Creates detailed itineraries and plans logistics"]}),"\n"]}),"\n",(0,a.jsxs)(n.p,{children:["Each agent is assigned specific tasks through the ",(0,a.jsx)(n.code,{children:"trip_tasks.py"})," file:"]}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Identify Task"}),": Determines the best city based on client preferences"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Gather Task"}),": Collects detailed information about activities and attractions"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Plan Task"}),": Creates a comprehensive itinerary with transportation details"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"interacting-with-the-trip-planner",children:"Interacting with the Trip Planner"}),"\n",(0,a.jsx)(n.p,{children:"Once registered as a uAgent, you can interact with the CrewAI trip planner using any uAgent client:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-python",children:'from datetime import datetime, timezone\nfrom uuid import uuid4\nfrom uagents import Agent, Protocol, Context\n\n#import the necessary components from the chat protocol\nfrom uagents_core.contrib.protocols.chat import (\n    ChatAcknowledgement,\n    ChatMessage,\n    TextContent,\n    chat_protocol_spec,\n)\n# Initialise agent2\nagent2 = Agent(name="client_agent",\n               port = 8082,\n               mailbox=True,\n               seed="client agent testing seed"\n               )\n\n# Initialize the chat protocol\nchat_proto = Protocol(spec=chat_protocol_spec)\n\nlanggraph_agent_address = "agent1q0zyxrneyaury3f5c7aj67hfa5w65cykzplxkst5f5mnyf4y3em3kplxn4t"\n\n# Startup Handler - Print agent details\[email protected]_event("startup")\nasync def startup_handler(ctx: Context):\n    # Print agent details\n    ctx.logger.info(f"My name is {ctx.agent.name} and my address is {ctx.agent.address}")\n\n    # Send initial message to agent2\n    initial_message = ChatMessage(\n        timestamp=datetime.now(timezone.utc),\n        msg_id=uuid4(),\n        content=[TextContent(type="text", text="Plan a trip for me from london to paris starting on 22nd of April 2025 and I am interested in a mountains beaches and history")]\n    )\n    await ctx.send(langgraph_agent_address, initial_message)\n\n# Message Handler - Process received messages and send acknowledgements\n@chat_proto.on_message(ChatMessage)\nasync def handle_message(ctx: Context, sender: str, msg: ChatMessage):\n    for item in msg.content:\n        if isinstance(item, TextContent):\n            # Log received message\n            ctx.logger.info(f"Received message from {sender}: {item.text}")\n            \n            # Send acknowledgment\n            ack = ChatAcknowledgement(\n                timestamp=datetime.now(timezone.utc),\n                acknowledged_msg_id=m
1sg.msg_id\n            )\n            await ctx.send(sender, ack)\n            \n\n# Acknowledgement Handler - Process received acknowledgements\n@chat_proto.on_message(ChatAcknowledgement)\nasync def handle_acknowledgement(ctx: Context, sender: str, msg: ChatAcknowledgement):\n    ctx.logger.info(f"Received acknowledgement from {sender} for message: {msg.acknowledged_msg_id}")\n\n# Include the protocol in the agent to enable the chat functionality\n# This allows the agent to send/receive messages and handle acknowledgements using the chat protocol\nagent2.include(chat_proto, publish_manifest=True)\n\nif __name__ == \'__main__\':\n    agent2.run()\n'})}),"\n",(0,a.jsx)(n.h2,{id:"benefits-of-the-uagents-integration",children:"Benefits of the uAgents Integration"}),"\n",(0,a.jsx)(n.p,{children:"Integrating CrewAI with uAgents provides several significant advantages:"}),"\n",(0,a.jsxs)(n.ul,{children:["\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Network Communication"}),": Enables remote access to your CrewAI system over networks"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Structured Inputs"}),": Validates inputs through a defined parameter schema"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Persistent Mailbox"}),": Allows asynchronous communication with message storage"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"Agentverse Integration"}),": Makes your CrewAI system discoverable in the agent ecosystem"]}),"\n",(0,a.jsxs)(n.li,{children:[(0,a.jsx)(n.strong,{children:"NL Processing"}),": Optional AI agent integration for processing natural language queries"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"getting-started",children:"Getting Started"}),"\n",(0,a.jsxs)(n.ol,{children:["\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsxs)(n.p,{children:["Clone the ",(0,a.jsx)(n.a,{href:"https://github.com/abhifetch/crewai-example/tree/main/trip_planner",children:"Trip Planner repository"})]}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Install dependencies:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:'pip install uagents==0.25.5 "crewai[tools]"==0.105.0 uagents-adapter==0.2.1 python-dotenv==1.0.0 langchain_openai==0.2.13\n'})}),"\n",(0,a.jsx)(n.p,{children:"Or use the provided requirements.txt:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"pip install -r requirements.txt\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Set up your environment variables:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"OPENAI_API_KEY=your_openai_key\nAGENTVERSE_API_KEY=your_agentverse_key\nAGENT_SEED=your_agent_seed_phrase\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"Run the CrewAI trip planner with uAgents adapter:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd crewai-example/trip_planner\npython main_uagents.py\n"})}),"\n"]}),"\n",(0,a.jsxs)(n.li,{children:["\n",(0,a.jsx)(n.p,{children:"In a separate terminal, run a client agent to interact with it:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{className:"language-bash",children:"cd crewai-example\npython client_agent.py\n"})}),"\n"]}),"\n"]}),"\n",(0,a.jsx)(n.h2,{id:"expected-outputs",children:"Expected Outputs"}),"\n",(0,a.jsx)(n.p,{children:"When running the examples, you should expect to see outputs similar to these:"}),"\n",(0,a.jsxs)(n.h3,{id:"standard-crewai-mainpy",children:["Standard CrewAI (",(0,a.jsx)(n.code,{children:"main.py"}),")"]}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"## Welcome to Trip Planner Crew\n-------------------------------\nFrom where will you be traveling from?\n> New York\n\nWhat are the cities options you are interested in visiting?\n> Paris, Rome, Barcelona\n\nWhat is the date range you are interested in traveling?\n> June 10-20, 2023\n\nWhat are some of your high level interests and hobbies?\n> Food, art, architecture, and history\n\n[City Selection Specialist] I'll analyze which city would be the best fit based on the traveler's preferences...\n\nWorking on: Analyze the traveler's preferences and determine which city from the options would be the best fit...\n\n[... search and reasoning details ...]\n\n########################\n## Here is you Trip Plan\n########################\n\n# PARIS: 3-DAY FOOD & ART JOURNEY\n*A curated itinerary for experiencing the best of Parisian cuisine and artistic treasures*\n\n## RECOMMENDED ACCOMMODATIONS\nLe Marais district or Saint-Germain-des-Pr\xe9s would be ideal locations, offering central positioning with charming atmosphere and proximity to key attractions.\n\n[... detailed itinerary continues ...]\n"})}),"\n",(0,a.jsxs)(n.h3,{id:"uagents-integration-main_uagentspy",children:["uAgents Integration (",(0,a.jsx)(n.code,{children:"main_uagents.py"}),")"]}),"\n",(0,a.jsx)(n.p,{children:"First terminal:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"(venv) abhi@Fetchs-MacBook-Pro test examples % python3 trip_planner/main_uagents.py\nINFO:     [Trip Planner Crew AI Agent adapters]: Starting agent with address: agent1q2sgs58jzw70e8vvsrlx8k3yukdqc9gwkhp8p7q6tslcxhy0eqtxyq4fv07\nINFO:     [Trip Planner Crew AI Agent adapters]: Agent 'Trip Planner Crew AI Agent adapters' started with address: agent1q2sgs58jzw70e8vvsrlx8k3yukdqc9gwkhp8p7q6tslcxhy0eqtxyq4fv07\nINFO:     [Trip Planner Crew AI Agent adapters]: Agent inspector available at https://agentverse.ai/inspect/?uri=http%3A//127.0.0.1%3A8080&address=agent1q2sgs58jzw70e8vvsrlx8k3yukdqc9gwkhp8p7q6tslcxhy0eqtxyq4fv07\nINFO:     [Trip Planner Crew AI Agent adapters]: Starting server on http://0.0.0.0:8080 (Press CTRL+C to quit)\nINFO:     [Trip Planner Crew AI Agent adapters]: Starting mailbox client for https://agentverse.ai\nINFO:     [Trip Planner Crew AI Agent adapters]: Mailbox access token acquired\nConnecting agent 'Trip Planner Crew AI Agent adapters' to Agentverse...\nINFO:     [mailbox]: Successfully registered as mailbox agent in Agentverse\nSuccessfully connected agent 'Trip Planner Crew AI Agent adapters' to Agentverse\nUpdating agent 'Trip Planner Crew AI Agent adapters' README on Agentverse...\nSuccessfully updated agent 'Trip Planner Crew AI Agent adapters' README on Agentverse\n\nCrewAI agent registration result: Agent 'Trip Planner Crew AI Agent adapters' registered with address: agent1q2sgs58jzw70e8vvsrlx8k3yukdqc9gwkhp8p7q6tslcxhy0eqtxyq4fv07 with mailbox (Parameters: origin, cities, date_range, interests)\nINFO:     [mailbox]: Successfully registered as mailbox agent in Agentverse\nINFO:     [Trip Planner Crew AI Agent adapters]: Got a message from agent1qwwng5d939vyaa6d2trnllyltgrndtfd6z44h8ey8a56hf4dcatsytgzm49\nINFO:     [Trip Planner Crew AI Agent adapters]: Received message model digest: timestamp=datetime.datetime(2025, 4, 21, 10, 13, 39, 989489, tz
1info=datetime.timezone.utc) msg_id=UUID('7930acf1-b16e-4b20-896b-7d801763eaa6') content=[TextContent(type='text', text='Plan a trip for me from london to paris starting on 22nd of April 2025 and I am interested in a mountains beaches and history')]\nINFO:     [Trip Planner Crew AI Agent adapters]: Got a text message from agent1qwwng5d939vyaa6d2trnllyltgrndtfd6z44h8ey8a56hf4dcatsytgzm49: Plan a trip for me from london to paris starting on 22nd of April 2025 and I am interested in a mountains beaches and history\nINFO:     [Trip Planner Crew AI Agent adapters]: Using crew object: <__main__.TripCrew object at 0x12c1f79d0>\nINFO:     [Trip Planner Crew AI Agent adapters]: Extracting parameters using keys: ['origin', 'cities', 'date_range', 'interests']\nINFO:httpx:HTTP Request: POST https://api.openai.com/v1/chat/completions \"HTTP/1.1 200 OK\"\nINFO:     [Trip Planner Crew AI Agent adapters]: Extracted parameters: {'origin': 'london', 'cities': 'paris', 'date_range': '22nd of April 2025', 'interests': 'mountains beaches and history'}\nINFO:     [Trip Planner Crew AI Agent adapters]: Running crew with extracted parameters\n\u256d\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500 Crew Execution Started \u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256e\n\u2502                                                                                                                                      \u2502\n\u2502  Crew Execution Started                                                                                                              \u2502\n\u2502  Name: crew                                                                                                                          \u2502\n\u2502  ID: 1462f3ae-5ce4-4ea3-b1af-5639aac04dd2                                                                                            \u2502\n\u2502                                                                                                                                      \u2502\n\u2502                                                                                                                                      \u2502\n\u2570\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u2500\u256f\n\n\ud83d\ude80 Crew: crew\n\u2514\u2500\u2500 \ud83d\udccb Task: c181e31b-6b7f-4471-ab8f-fa5f06078365\n       Status: Executing Task...\n[... crew execution continues ...]\n"})}),"\n",(0,a.jsx)("div",{style:{textAlign:"center"},children:(0,a.jsx)("img",{src:"/resources/img/adapters/crewai.png",alt:"crewai-adapter",style:{width:"100%",maxWidth:"1000px"}})}),"\n",(0,a.jsxs)(n.h3,{id:"client-agent-client_agentpy",children:["Client Agent (",(0,a.jsx)(n.code,{children:"client_agent.py"}),")"]}),"\n",(0,a.jsx)(n.p,{children:"Second terminal:"}),"\n",(0,a.jsx)(n.pre,{children:(0,a.jsx)(n.code,{children:"(venv) abhi@Fetchs-MacBook-Pro crewai-example % python3 trip_planner/client_agent.py \nINFO:     [client_agent]: Starting agent with address: agent1qwwng5d939vyaa6d2trnllyltgrndtfd6z44h8ey8a56hf4dcatsytgzm49\nINFO:     [client_agent]: My name is client_agent and my address is agent1qwwng5d939vyaa6d2trnllyltgrndtfd6z44h8ey8a56hf4dcatsytgzm49\nINFO:     [client_agent]: Agent inspector available at https://agentverse.ai/inspect/?uri=http%3A//127.0.0.1%3A8082&address=agent1qwwng5d939vyaa6d2trnllyltgrndtfd6z44h8ey8a56hf4dcatsytgzm49\nINFO:     [client_agent]: Starting server on http://0.0.0.0:8082 (Press CTRL+C to quit)\nINFO:     [client_agent]: Starting mailbox client for https://agentverse.ai\nINFO:     [client_agent]: Manifest published successfully: AgentChatProtocol\nINFO:     [client_agent]: Mailbox access token acquired\nINFO:     [client_agent]: Received acknowledgement from agent1q2sgs58jzw70e8vvsrlx8k3yukdqc9gwkhp8p7q6tslcxhy0eqtxyq4fv07 for message: 7930acf1-b16e-4b20-896b-7d801763eaa6\nINFO:     [uagents.registration]: Registration on Almanac API successful\nINFO:     [uagents.registration]: Almanac contract registration is up to date!\n\n[... detailed itinerary continues ...]\n"})}),"\n",(0,a.jsx)(n.p,{children:"This example demonstrates how uAgents adapters can bring collaborative AI agent systems into a networked environment, making complex workflows accessible through standardized messaging protocols."})]})}function g(e={}){const{wrapper:n}={...(0,i.R)(),...e.components};return n?(0,a.jsx)(n,{...e,children:(0,a.jsx)(c,{...e})}):c(e)}},28453:(e,n,t)=>{t.d(n,{R:()=>s,x:()=>l});var r=t(96540);const a={},i=r.createContext(a);function s(e){const n=r.useContext(i);return r.useMemo((function(){return"function"==typeof e?e(n):{...n,...e}}),[n,e])}function l(e){let n;return n=e.disableParentContext?"function"==typeof e.components?e.components(a):e.components||a:s(e.components),r.createElement(i.Provider,{value:n},e.children)}}}]);

Line numbers count LF bytes from the start of the resource, as the search results do. Vendor segments are library code the classifier recognised; they are stored but not indexed. Bytes are shown as Latin1 characters, one per byte.