Multi-agents
Collective Intelligence, Amplified Performance
Agents with CrewAI
As cortecs is OpenAI-compatible, it works out-of-the-box with CrewAI. Follow the basic example from their docs and put you cortecs credentials into the .env
file. As outlined in the complementary liteLLM docs prepend 'openai/' to your model's URL. This indicates that you are using an OpenAI-compatible endpoint.
Dynamic crews
In some cases you might want to start extensive processes with many agent. With dedicated inference you avoid running into request limits.
Adjust the basic example
You can use cortecs-py to start a model and build your agents on top of it. To ensure you are dynamically provisioning your resources and shutting them down as soon as they are not needed, add the following code to the ExampleCrew
class.
Executing crewai run
in your project root will:
Start the model as specified in the .env
Kickoff your crew
Shut down the model as soon as crew is finished
The full code example is provided on GitHub.
Last updated