0

Portkey Cookbook

Get your API key from app.portkey.ai and create a virtual key at Virtual Keys.

Example · مثال

Content

Portkey Cookbook

Note: Fork and clone this repository if needed

1. Create and activate a virtual environment

python3 -m venv ~/.venvs/aienv
source ~/.venvs/aienv/bin/activate

2. Export your Portkey keys

Get your API key from app.portkey.ai and create a virtual key at Virtual Keys.

export PORTKEY_API_KEY=***
export PORTKEY_VIRTUAL_KEY=***

3. Install libraries

uv pip install -U agno portkey-ai

4. Run basic Agent

python cookbook/90_models/portkey/basic.py

5. Run Agent with Tools

python cookbook/90_models/portkey/tool_use.py

Source and license

Source
Agno
Original
agno-agi/agno/cookbook/90_models/portkey
License
Apache-2.0