mirror of
https://github.com/microsoft/agent-framework.git
synced 2026-06-16 21:04:09 +08:00
Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
cb5cbbc17b | ||
|
|
f38c17a406 |
@@ -27,7 +27,7 @@ Status is grouped into these buckets:
|
|||||||
| `agent-framework-claude` | `python/packages/claude` | `beta` |
|
| `agent-framework-claude` | `python/packages/claude` | `beta` |
|
||||||
| `agent-framework-copilotstudio` | `python/packages/copilotstudio` | `beta` |
|
| `agent-framework-copilotstudio` | `python/packages/copilotstudio` | `beta` |
|
||||||
| `agent-framework-core` | `python/packages/core` | `released` |
|
| `agent-framework-core` | `python/packages/core` | `released` |
|
||||||
| `agent-framework-declarative` | `python/packages/declarative` | `beta` |
|
| `agent-framework-declarative` | `python/packages/declarative` | `rc` |
|
||||||
| `agent-framework-devui` | `python/packages/devui` | `beta` |
|
| `agent-framework-devui` | `python/packages/devui` | `beta` |
|
||||||
| `agent-framework-durabletask` | `python/packages/durabletask` | `beta` |
|
| `agent-framework-durabletask` | `python/packages/durabletask` | `beta` |
|
||||||
| `agent-framework-foundry` | `python/packages/foundry` | `released` |
|
| `agent-framework-foundry` | `python/packages/foundry` | `released` |
|
||||||
@@ -58,6 +58,13 @@ listed below.
|
|||||||
|
|
||||||
### Experimental features
|
### Experimental features
|
||||||
|
|
||||||
|
#### `DECLARATIVE_AGENTS`
|
||||||
|
|
||||||
|
- `agent-framework-declarative`: declarative agent loading APIs from
|
||||||
|
`agent_framework_declarative`, including `AgentFactory`,
|
||||||
|
`DeclarativeLoaderError`, `ProviderLookupError`, and `ProviderTypeMapping`
|
||||||
|
from `agent_framework_declarative/_loader.py`
|
||||||
|
|
||||||
#### `EVALS`
|
#### `EVALS`
|
||||||
|
|
||||||
- `agent-framework-core`: exported evaluation APIs from `agent_framework`, including
|
- `agent-framework-core`: exported evaluation APIs from `agent_framework`, including
|
||||||
|
|||||||
@@ -50,6 +50,7 @@ class ExperimentalFeature(str, Enum):
|
|||||||
on enum membership or attribute presence over time.
|
on enum membership or attribute presence over time.
|
||||||
"""
|
"""
|
||||||
|
|
||||||
|
DECLARATIVE_AGENTS = "DECLARATIVE_AGENTS"
|
||||||
EVALS = "EVALS"
|
EVALS = "EVALS"
|
||||||
FILE_HISTORY = "FILE_HISTORY"
|
FILE_HISTORY = "FILE_HISTORY"
|
||||||
FIDES = "FIDES"
|
FIDES = "FIDES"
|
||||||
|
|||||||
@@ -6,6 +6,18 @@ Please install this package via pip:
|
|||||||
pip install agent-framework-declarative --pre
|
pip install agent-framework-declarative --pre
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## Release stage
|
||||||
|
|
||||||
|
This package ships at two different stability levels:
|
||||||
|
|
||||||
|
- **Declarative workflows** (`WorkflowFactory`, executors, handlers, and the
|
||||||
|
`_workflows` surface) are at **release-candidate** stability and may receive only
|
||||||
|
minor refinements before GA.
|
||||||
|
- **Declarative agents** (`AgentFactory` and the YAML agent loading/parsing path:
|
||||||
|
`DeclarativeLoaderError`, `ProviderLookupError`, `ProviderTypeMapping`) are
|
||||||
|
**experimental** and may change or be removed in future versions without notice.
|
||||||
|
Using any of these symbols emits an `ExperimentalWarning` on first use.
|
||||||
|
|
||||||
## Declarative features
|
## Declarative features
|
||||||
|
|
||||||
The declarative packages provides support for building agents based on a declarative yaml specification.
|
The declarative packages provides support for building agents based on a declarative yaml specification.
|
||||||
|
|||||||
@@ -1,5 +1,18 @@
|
|||||||
# Copyright (c) Microsoft. All rights reserved.
|
# Copyright (c) Microsoft. All rights reserved.
|
||||||
|
|
||||||
|
"""Declarative specification support for Microsoft Agent Framework.
|
||||||
|
|
||||||
|
Release stage:
|
||||||
|
|
||||||
|
* The declarative-workflows surface (``WorkflowFactory``, executors, handlers,
|
||||||
|
etc.) is at release-candidate stability.
|
||||||
|
* The declarative-agents surface (``AgentFactory`` and the YAML agent
|
||||||
|
loading/parsing path: ``DeclarativeLoaderError``, ``ProviderLookupError``,
|
||||||
|
``ProviderTypeMapping``) is *experimental* and may change or be removed in
|
||||||
|
future versions without notice. Using these symbols emits an
|
||||||
|
``ExperimentalWarning`` on first use.
|
||||||
|
"""
|
||||||
|
|
||||||
from importlib import metadata
|
from importlib import metadata
|
||||||
|
|
||||||
from ._loader import AgentFactory, DeclarativeLoaderError, ProviderLookupError, ProviderTypeMapping
|
from ._loader import AgentFactory, DeclarativeLoaderError, ProviderLookupError, ProviderTypeMapping
|
||||||
|
|||||||
@@ -15,6 +15,10 @@ from agent_framework import (
|
|||||||
from agent_framework import (
|
from agent_framework import (
|
||||||
FunctionTool as AFFunctionTool,
|
FunctionTool as AFFunctionTool,
|
||||||
)
|
)
|
||||||
|
from agent_framework._feature_stage import ( # type: ignore[reportPrivateUsage]
|
||||||
|
ExperimentalFeature,
|
||||||
|
experimental,
|
||||||
|
)
|
||||||
from agent_framework.exceptions import AgentException
|
from agent_framework.exceptions import AgentException
|
||||||
from dotenv import load_dotenv
|
from dotenv import load_dotenv
|
||||||
|
|
||||||
@@ -43,6 +47,7 @@ else:
|
|||||||
from typing_extensions import TypedDict # type: ignore # pragma: no cover
|
from typing_extensions import TypedDict # type: ignore # pragma: no cover
|
||||||
|
|
||||||
|
|
||||||
|
@experimental(feature_id=ExperimentalFeature.DECLARATIVE_AGENTS)
|
||||||
class ProviderTypeMapping(TypedDict, total=True):
|
class ProviderTypeMapping(TypedDict, total=True):
|
||||||
package: str
|
package: str
|
||||||
name: str
|
name: str
|
||||||
@@ -118,18 +123,21 @@ PROVIDER_TYPE_OBJECT_MAPPING: dict[str, ProviderTypeMapping] = {
|
|||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@experimental(feature_id=ExperimentalFeature.DECLARATIVE_AGENTS)
|
||||||
class DeclarativeLoaderError(AgentException):
|
class DeclarativeLoaderError(AgentException):
|
||||||
"""Exception raised for errors in the declarative loader."""
|
"""Exception raised for errors in the declarative loader."""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@experimental(feature_id=ExperimentalFeature.DECLARATIVE_AGENTS)
|
||||||
class ProviderLookupError(DeclarativeLoaderError):
|
class ProviderLookupError(DeclarativeLoaderError):
|
||||||
"""Exception raised for errors in provider type lookup."""
|
"""Exception raised for errors in provider type lookup."""
|
||||||
|
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
|
||||||
|
@experimental(feature_id=ExperimentalFeature.DECLARATIVE_AGENTS)
|
||||||
class AgentFactory:
|
class AgentFactory:
|
||||||
"""Factory for creating Agent instances from declarative YAML definitions.
|
"""Factory for creating Agent instances from declarative YAML definitions.
|
||||||
|
|
||||||
|
|||||||
@@ -4,7 +4,7 @@ description = "Declarative specification support for Microsoft Agent Framework."
|
|||||||
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
|
authors = [{ name = "Microsoft", email = "af-support@microsoft.com"}]
|
||||||
readme = "README.md"
|
readme = "README.md"
|
||||||
requires-python = ">=3.10"
|
requires-python = ">=3.10"
|
||||||
version = "1.0.0b260528"
|
version = "1.0.0rc1"
|
||||||
license-files = ["LICENSE"]
|
license-files = ["LICENSE"]
|
||||||
urls.homepage = "https://aka.ms/agent-framework"
|
urls.homepage = "https://aka.ms/agent-framework"
|
||||||
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
|
urls.source = "https://github.com/microsoft/agent-framework/tree/main/python"
|
||||||
@@ -49,7 +49,8 @@ addopts = "-ra -q -r fEX"
|
|||||||
asyncio_mode = "auto"
|
asyncio_mode = "auto"
|
||||||
asyncio_default_fixture_loop_scope = "function"
|
asyncio_default_fixture_loop_scope = "function"
|
||||||
filterwarnings = [
|
filterwarnings = [
|
||||||
"ignore:Support for class-based `config` is deprecated:DeprecationWarning:pydantic.*"
|
"ignore:Support for class-based `config` is deprecated:DeprecationWarning:pydantic.*",
|
||||||
|
"ignore::agent_framework._feature_stage.ExperimentalWarning",
|
||||||
]
|
]
|
||||||
timeout = 120
|
timeout = 120
|
||||||
markers = [
|
markers = [
|
||||||
|
|||||||
@@ -64,7 +64,6 @@ actions:
|
|||||||
|
|
||||||
### Agent Invocation
|
### Agent Invocation
|
||||||
- `InvokeAzureAgent` - Call an Azure AI agent
|
- `InvokeAzureAgent` - Call an Azure AI agent
|
||||||
- `InvokePromptAgent` - Call a local prompt agent
|
|
||||||
|
|
||||||
### Tool Invocation
|
### Tool Invocation
|
||||||
- `InvokeFunctionTool` - Call a registered Python function
|
- `InvokeFunctionTool` - Call a registered Python function
|
||||||
|
|||||||
Generated
+2
-2
@@ -437,7 +437,7 @@ provides-extras = ["all"]
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "agent-framework-declarative"
|
name = "agent-framework-declarative"
|
||||||
version = "1.0.0b260528"
|
version = "1.0.0rc1"
|
||||||
source = { editable = "packages/declarative" }
|
source = { editable = "packages/declarative" }
|
||||||
dependencies = [
|
dependencies = [
|
||||||
{ name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
|
{ name = "agent-framework-core", marker = "sys_platform == 'darwin' or sys_platform == 'linux' or sys_platform == 'win32'" },
|
||||||
@@ -609,7 +609,7 @@ dependencies = [
|
|||||||
[package.metadata]
|
[package.metadata]
|
||||||
requires-dist = [
|
requires-dist = [
|
||||||
{ name = "agent-framework-core", editable = "packages/core" },
|
{ name = "agent-framework-core", editable = "packages/core" },
|
||||||
{ name = "github-copilot-sdk", marker = "python_full_version >= '3.11'", specifier = ">=1.0.0b2,<=1.0.0b2" },
|
{ name = "github-copilot-sdk", marker = "python_full_version >= '3.11'", specifier = "<=1.0.0b2,>=1.0.0b2" },
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
|
|||||||
Reference in New Issue
Block a user