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
10 changes: 6 additions & 4 deletions python/PACKAGE_STATUS.md
Original file line number Diff line number Diff line change
Expand Up @@ -82,12 +82,14 @@ listed below.

#### `AGENT_HOOKS`

- `agent-framework-core`: `create_agent_hooks_middleware` and
`create_agent_hooks_middleware_from_emitter` from `agent_framework/_agent_hooks.py`,
- `agent-framework-core`: `create_agent_hooks_middleware`,
`create_agent_hooks_middleware_from_emitter` and the host-declaration factory
`create_agent_hooks_middleware_from_declaration` from `agent_framework/_agent_hooks.py`,
the AGENT-HOOKS-0.1 enforcement middleware bundle, and the `MiddlewareBundle`
container from `agent_framework/_middleware.py` that both factories produce
container from `agent_framework/_middleware.py` that the factories produce
(`MiddlewareBundle` itself needs no optional dependency). Requires installing the
`agent-hooks-sdk` package separately. Known limitation: service-side (hosted) tool
`agent-hooks-sdk` package separately (0.1.0b2 or later for the host-declaration
factory). Known limitation: service-side (hosted) tool
execution never passes through the framework's function-invocation seam, so the
`pre_tool_call`/`post_tool_call` points cannot intercept it; hosted tool calls and
outputs are surfaced in the `post_model_call` content projection instead.
Expand Down
7 changes: 6 additions & 1 deletion python/packages/core/agent_framework/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,11 @@
)

_LAZY_MODULE_EXPORTS: Final[Mapping[str, tuple[str, ...]]] = {
"._agent_hooks": ("create_agent_hooks_middleware", "create_agent_hooks_middleware_from_emitter"),
"._agent_hooks": (
"create_agent_hooks_middleware",
"create_agent_hooks_middleware_from_declaration",
"create_agent_hooks_middleware_from_emitter",
),
"._agents": ("Agent", "BaseAgent", "RawAgent", "SupportsAgentRun"),
"._clients": (
"BaseChatClient",
Expand Down Expand Up @@ -682,6 +686,7 @@
"background_tasks_running_message",
"chat_middleware",
"create_agent_hooks_middleware",
"create_agent_hooks_middleware_from_declaration",
"create_agent_hooks_middleware_from_emitter",
"create_always_approve_tool_response",
"create_always_approve_tool_with_arguments_response",
Expand Down
7 changes: 6 additions & 1 deletion python/packages/core/agent_framework/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,11 @@ from typing import Final

__version__: Final[str]

from ._agent_hooks import create_agent_hooks_middleware, create_agent_hooks_middleware_from_emitter
from ._agent_hooks import (
create_agent_hooks_middleware,
create_agent_hooks_middleware_from_declaration,
create_agent_hooks_middleware_from_emitter,
)
from ._agents import Agent, BaseAgent, RawAgent, SupportsAgentRun
from ._clients import (
BaseChatClient,
Expand Down Expand Up @@ -637,6 +641,7 @@ __all__ = [
"background_tasks_running_message",
"chat_middleware",
"create_agent_hooks_middleware",
"create_agent_hooks_middleware_from_declaration",
"create_agent_hooks_middleware_from_emitter",
"create_always_approve_tool_response",
"create_always_approve_tool_with_arguments_response",
Expand Down
292 changes: 273 additions & 19 deletions python/packages/core/agent_framework/_agent_hooks.py

Large diffs are not rendered by default.

Loading
Loading