Installation
1
Start the gateway
- Local (npx)
- Portkey Cloud
http://localhost:8787/v1.2
Install dependencies
Basic setup
CrewAI’sLLM class accepts base_url and extra_headers, making it straightforward to route through the gateway.
You can also use
langchain_openai.ChatOpenAI with CrewAI if you prefer the LangChain integration. See the LangChain integration page for setup details.Connecting via LangChain
If you are already using LangChain in your stack, pass aChatOpenAI instance directly as the llm on each agent.