Contributing to agno
Agno is an open-source project and we welcome contributions.
Loading actions...
Skill content
Main instructions and any bundled files for this skill.
Contributing to agno
Agno is an open-source project and we welcome contributions.
👩💻 How to contribute
Please follow the fork and pull request workflow:
- Fork the repository.
- Create a new branch for your feature.
- Add your feature or improvement.
- Ensure your Pull Request follows our guidelines (see below).
- Send a pull request.
- We appreciate your support & input!
Pull Request Guidelines
To maintain a clear and organized project history, please adhere to the following guidelines when submitting Pull Requests:
- Title Format: Your PR title must start with a type tag enclosed in square brackets, followed by a space and a concise subject.
- Example:
[feat] Add user authentication - Valid types:
[feat],[fix],[cookbook],[test],[refactor],[chore],[style],[revert],[release].
- Example:
- Link to Issue: The PR description should ideally reference the issue it addresses using keywords like
fixes #<issue_number>,closes #<issue_number>, orresolves #<issue_number>.- Example:
This PR fixes #42 by implementing the new login flow.
- Example:
- No Duplicate PRs: Before submitting, search the open pull requests to confirm no one else is already working on the same issue. If a similar PR exists, explain in your description why your approach is better.
- Respect Assigned Issues: If a GitHub issue is already assigned to someone, do not open a PR for it without first asking the maintainers in the issue comments and getting confirmation. This helps reduce noise and avoids duplicate effort.
- AI-Generated PRs: If your PR was entirely generated by an AI tool (Copilot, Claude Code, Cursor, etc.), you must disclose this in the PR template. AI-generated PRs are held to the same quality bar as any other contribution — they must include tests, pass CI, and demonstrate that the author has reviewed and understands the changes. Low-effort AI-generated PRs that don't meet these standards will be closed without review.
These guidelines are enforced automatically by our PR Lint workflow.
Development setup
- Clone the repository.
- Check if you have
uvinstalled by runninguv --version.- If you have
uvinstalled, you can skip this step. - If you don't have
uvinstalled, you can install it by runningpip install uv.
- If you have
- Create a virtual environment:
- For Unix, use
./scripts/dev_setup.sh. - For Windows, use
.\scripts\dev_setup.bat. - This setup will:
- Create a
.venvvirtual environment in the current directory. - Install the required packages.
- Install the
agnopackage in editable mode.
- Create a
- For Unix, use
- Activate the virtual environment:
- On Unix:
source .venv/bin/activate - On Windows:
.venv\Scripts\activate
- On Unix:
From here on you have to use
uv pip installto install missing packages
Formatting and validation
Ensure your code meets our quality standards by running the appropriate formatting and validation script before submitting a pull request:
- For Unix:
./scripts/format.sh./scripts/validate.sh
- For Windows:
.\scripts\format.bat.\scripts\validate.bat
These scripts will perform code formatting with ruff and static type checks with mypy.
Local testing
Before submitting a pull request, ensure all tests pass locally:
-
Do the development setup above.
-
Run the test suite
./scripts/test.sh -
Run specific test files or test cases:
pytest ./libs/agno/tests/unit/utils/test_string.pyor whatever file you want to test.
Make sure all tests pass before submitting your pull request. If you add new features, include appropriate test coverage.
Adding a new Vector Database
- Setup your local environment by following the Development setup.
- Create a new directory under
libs/agno/agno/vectordbfor the new vector database. - Create a Class for your VectorDb that implements the
VectorDbinterface- Your Class will be in the
libs/agno/agno/vectordb/<your_db>/<your_db>.pyfile. - The
VectorDbinterface is defined inlibs/agno/agno/vectordb/base.py - Import your
VectorDbClass inlibs/agno/agno/vectordb/<your_db>/__init__.py. - Checkout the
libs/agno/agno/vectordb/pgvector/pgvectorfile for an example.
- Your Class will be in the
- Add a recipe for using your
VectorDbundercookbook/07_knowledge/vector_db/<your_db>.- Checkout
cookbook/07_knowledge/vector_db/pgvector/pgvector_dbfor an example.
- Checkout
- Important: Format and validate your code by running
./scripts/format.shand./scripts/validate.sh. - Submit a pull request.
Adding a new Model Provider
- Setup your local environment by following the Development setup.
- Create a new directory under
libs/agno/agno/modelsfor the new Model provider. - If the Model provider supports the OpenAI API spec:
- Create a Class for your LLM provider that inherits the
OpenAILikeClass fromlibs/agno/agno/models/openai/like.py. - Your Class will be in the
libs/agno/agno/models/<your_model>/<your_model>.pyfile. - Import your Class in the
libs/agno/agno/models/<your_model>/__init__.pyfile. - Checkout the
agno/models/together/together.pyfile for an example.
- Create a Class for your LLM provider that inherits the
- If the Model provider does not support the OpenAI API spec:
- Reach out to us on Discord or open an issue to discuss the best way to integrate your LLM provider.
- Checkout
agno/models/anthropic/claude.pyoragno/models/cohere/chat.pyfor inspiration.
- Register your model provider in
libs/agno/agno/models/utils.py:- Add exactly one row to the
_PROVIDERStable, keyed by a stable provider key, with the value(module, class_name, default_name, default_provider).default_nameanddefault_providerare your class's defaultnameand (lowercased)providerattributes. This single table is the source of truth: the construction registry (MODEL_PROVIDER_CLASSES) and the(provider, name)resolution indices are all derived from it, so you do not edit any other map. Use a lowercase, hyphenated key, typically matching your module directory (e.g."meta"formodels/meta/,"openai-chat"for the chat variant)."yourprovider": ("agno.models.yourprovider", "YourModel", "YourModel", "yourprovider"), - This covers both the string format (
model="yourprovider:model-name") and rebuilding a model saved to the database. If your class shares a displayproviderstring with another class (e.g. an OpenAI-compatible provider reporting"openai"), the serializednameyou list is what tells them apart; if its display string differs from the key (e.g."inceptionlabs"vs key"inception"), the alias is derived automatically. Only the default key for an ambiguous display string (e.g."azure"-> AzureOpenAI) lives in_AMBIGUOUS_PROVIDER_DEFAULTS. - CI enforces registration:
test_every_model_subclass_is_registeredstatically discovers every concreteModelsubclass and fails if one is missing. If your class is an abstract base rather than a user-selectable provider, add it to that test's allowlist instead.
- Add exactly one row to the
- Add a recipe for using your Model provider under
cookbook/models/<your_model>.- Checkout
agno/cookbook/90_models/aws/claudefor an example. - Show both the model class and string syntax in your examples
- Checkout
- Important: Format and validate your code by running
./scripts/format.shand./scripts/validate.sh. - Submit a pull request.
Adding a new Tool.
- Setup your local environment by following the Development setup.
- Create a new directory under
libs/agno/agno/toolsfor the new Tool. - Create a Class for your Tool that inherits the
ToolkitClass fromlibs/agno/agno/tools/toolkit/toolkit.py.- Your Class will be in
libs/agno/agno/tools/<your_tool>.py. - Make sure to register all functions in your class via a flag.
- Checkout the
agno/tools/youtube.pyfile for an example. - If your tool requires an API key, checkout the
agno/tools/serpapi_tools.pyas well.
- Your Class will be in
- Add a recipe for using your Tool under
cookbook/tools/<your_tool>.- Checkout
agno/cookbook/91_tools/youtube_toolsfor an example.
- Checkout
- Important: Format and validate your code by running
./scripts/format.shand./scripts/validate.sh. - Submit a pull request.
Message us on Discord if you have any questions or need help with credits.
📚 Resources
📝 License
This project is licensed under the terms of the Apache-2.0 license
Related Skills
Frontend Typescript Linting.mdc
TypeScript and ESLint rules that MUST be followed when creating, modifying, or reviewing any file under apps/frontend/, including .ts, .tsx, .js, and .jsx files. Also apply when discussing frontend li...
2. Apply Deepthink Protocol (reason about dependencies
risks