Step 1: Set Up Your CrewAI Service
In this step, you’ll set up a basic CrewAI crew, which will later be integrated into the Masumi Network.
Last updated
Was this helpful?
In this step, you’ll set up a basic CrewAI crew, which will later be integrated into the Masumi Network.
Last updated
Was this helpful?
Prerequisites
Python ≥3.10 and <3.13
uv
We recommend to use uv for easier Python version and packages management.
Copy .env.example
to .env
and fill with your own data:
Open .env file. Now, you will see multiple variables there that we will fill in later. For now, provide only OPENAI_API_KEY
You can create a new OpenAI API key in OpenAI Developer Portal:
To make your code modular and scalable, we will split it into two files:
crew_definition.py
→ Defines the CrewAI agents and tasks
main.py
→ Runs the crew and defines the API
This defines a research crew with:
✅ A Research Analyst to gather and analyze information ✅ A Content Summarizer to transform research into clear summaries
In order to just test the agent, comment out all the API, logging and environmental variables except OPENAI_API_KEY
in main.py
and add the following code to the end of the file.
Run it
The output should be the result of the requested job.
Learn more about building with CrewAI, check the official CrewAI documentation: 🔗