No description
Find a file
2025-07-07 18:40:08 -04:00
.docker
ci
docs feat: enhance agent configuration with template references and validation 2025-07-02 23:33:06 -04:00
src refactor: update logging and error handling in LLMAgent and TemplateRenderer 2025-07-07 18:40:08 -04:00
tests refactor: update logging and error handling in LLMAgent and TemplateRenderer 2025-07-07 18:40:08 -04:00
.bumpversion.cfg
.cookiecutterrc
.coveragerc chore: update .coveragerc to exclude tests from coverage source 2025-07-05 23:12:53 -04:00
.cz-config.js
.cz.json
.editorconfig
.gitattributes
.gitignore
.python-version
ATTRIBUTIONS.rst
CHANGELOG.rst
CODE_OF_CONDUCT.rst
CONTRIBUTING.rst
CONTRIBUTORS.rst
docker-compose.yml
Dockerfile
Dockerfile.dev
LICENSE
MANIFEST.in
NOTICE
README.rst feat: add API key configuration and handling for agents and tools 2025-07-01 22:20:04 -04:00
setup.cfg
setup.py
tox.ini test: add feature tests for Agent base class coverage 2025-07-06 22:08:06 +00:00

============
CleverAgents
============

A powerful, flexible Agent Based LLM tool for creating and managing networks of AI agents.

.. image:: https://img.shields.io/pypi/v/cleveragents.svg
    :target: https://pypi.org/project/cleveragents/
    :alt: PyPI Package

.. image:: https://img.shields.io/travis/cleverthis/cleveragents.svg
    :target: https://travis-ci.org/cleverthis/cleveragents
    :alt: Travis-CI Build Status

API Key Configuration
---------------------

CleverAgents requires API keys for certain agents and tools (e.g., LLM providers, web search). Keys can be configured in two ways, with the agent-specific configuration taking precedence.

1.  **In Agent Configuration**:
    Set the ``api_key`` field directly in the agent or tool definition within your YAML configuration file. If this key is present and not empty, it will always be used.

    .. code-block:: yaml

        agents:
          - name: my_openai_agent
            type: llm
            config:
              provider: openai
              model: gpt-4
              api_key: "sk-your-key-from-config"

2.  **Via Environment Variables**:
    If ``api_key`` is not set or is an empty string in the configuration, the application will look for a corresponding environment variable.

    -   **OpenAI**: ``OPENAI_API_KEY``
    -   **Anthropic**: ``ANTHROPIC_API_KEY``
    -   **Google Gemini**: ``GOOGLE_GEMINI_API_KEY``
    -   **Google Search Tool**: ``GOOGLE_SEARCH_API_KEY``

If a required API key is not found in either location, the application will raise a ``ConfigurationError``.

Overview