Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions python/.cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@
"datamodel",
"desync",
"dotenv",
"edenai",
"endregion",
"entra",
"faiss",
Expand Down
38 changes: 38 additions & 0 deletions python/packages/core/agent_framework/edenai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# Copyright (c) Microsoft. All rights reserved.

"""Eden AI integration namespace for optional Agent Framework connectors.

This module lazily re-exports objects from:
- ``agent-framework-edenai``

Supported classes:
- EdenAIChatClient
- EdenAIChatOptions
- EdenAISettings
"""

import importlib
from typing import Any

IMPORT_PATH = "agent_framework_edenai"
PACKAGE_NAME = "agent-framework-edenai"
_IMPORTS = [
"EdenAIChatClient",
"EdenAIChatOptions",
"EdenAISettings",
]


def __getattr__(name: str) -> Any:
if name in _IMPORTS:
try:
return getattr(importlib.import_module(IMPORT_PATH), name)
except ModuleNotFoundError as exc:
raise ModuleNotFoundError(
f"The '{PACKAGE_NAME}' package is not installed, please do `pip install {PACKAGE_NAME}`"
) from exc
raise AttributeError(f"Module {IMPORT_PATH} has no attribute {name}.")


def __dir__() -> list[str]:
return _IMPORTS
13 changes: 13 additions & 0 deletions python/packages/core/agent_framework/edenai/__init__.pyi
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) Microsoft. All rights reserved.

from agent_framework_edenai import (
EdenAIChatClient,
EdenAIChatOptions,
EdenAISettings,
)

__all__ = [
"EdenAIChatClient",
"EdenAIChatOptions",
"EdenAISettings",
]
31 changes: 31 additions & 0 deletions python/packages/edenai/AGENTS.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Eden AI Package (agent-framework-edenai)

Integration with Eden AI, a gateway to many model providers behind one OpenAI compatible API.

## Main Classes

- **`EdenAIChatClient`** - Chat client for Eden AI models (OpenAI compatible)
- **`EdenAIChatOptions`** - Options TypedDict for Eden AI chat parameters
- **`EdenAISettings`** - Settings for configuration

## Usage

```python
from agent_framework import Message
from agent_framework.edenai import EdenAIChatClient

client = EdenAIChatClient(model="openai/gpt-4o-mini")
response = await client.get_response([Message(role="user", contents=["Hello"])])
```

## Import Path

```python
from agent_framework.edenai import EdenAIChatClient
```

## Configuration

- `EDENAI_API_KEY`: the Eden AI API key.
- `EDENAI_MODEL`: the `provider/model` to use, for example `openai/gpt-4o-mini`.
- `EDENAI_BASE_URL`: optional, defaults to `https://api.edenai.run/v3`.
21 changes: 21 additions & 0 deletions python/packages/edenai/LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) Microsoft Corporation.

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE
20 changes: 20 additions & 0 deletions python/packages/edenai/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
# Get Started with Microsoft Agent Framework Eden AI

Please install this package:

```bash
pip install agent-framework-edenai --pre
```

Eden AI is a gateway to many model providers behind one OpenAI compatible API and a single key. Models use the `provider/model` format, for example `openai/gpt-4o-mini` or `anthropic/claude-sonnet-4-5`.

```python
from agent_framework import Message
from agent_framework.edenai import EdenAIChatClient

# Reads EDENAI_API_KEY from the environment, or pass api_key=...
client = EdenAIChatClient(model="openai/gpt-4o-mini")
response = await client.get_response([Message(role="user", contents=["Hello"])])
```

See the [README](https://github.com/microsoft/agent-framework/tree/main/python/README.md) for more information.
23 changes: 23 additions & 0 deletions python/packages/edenai/agent_framework_edenai/__init__.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
# Copyright (c) Microsoft. All rights reserved.

"""Eden AI integration for Microsoft Agent Framework.

Eden AI is a gateway that exposes many model providers behind a single
OpenAI compatible API and one key.
"""

import importlib.metadata

from ._chat_client import EdenAIChatClient, EdenAIChatOptions, EdenAISettings

try:
__version__ = importlib.metadata.version("agent-framework-edenai")
except importlib.metadata.PackageNotFoundError:
__version__ = "0.0.0" # Fallback for development mode

__all__ = [
"EdenAIChatClient",
"EdenAIChatOptions",
"EdenAISettings",
"__version__",
]
Loading
Loading