Installation¶
Requirements¶
Prerequisites
- Python 3.11 or higher
- An API key from OpenAI, Anthropic, or Google
Install from PyPI¶
Install with Extras¶
Install from Source¶
Editable Install
The -e flag installs the package in "editable" mode, so changes to the source code are immediately reflected without reinstalling.
Verify Installation¶
from nagents import Agent, Provider, ProviderType, SessionManager
print("nagents installed successfully!")
Environment Setup¶
API Keys Required
You'll need an API key from at least one provider to use nagents.
Create a .env file in your project root:
.env
# Choose one or more providers
OPENAI_API_KEY=sk-...
ANTHROPIC_API_KEY=sk-ant-...
GOOGLE_API_KEY=...
Then load it in your code:
- Requires
pip install python-dotenv