Skip to content
14 changes: 14 additions & 0 deletions python/a2ui_core/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -162,6 +162,20 @@
it is standalone.
[#3232](https://github.com/a2ui-project/a2ui/issues/3232),
[#3575](https://github.com/a2ui-project/a2ui/pull/3575)
- (v1_0) Add `AgentFunction`, `AgentFunctionContext` and `AgentFunctionHandler`
(exported from `a2ui.core`) for catalog functions that run on the agent:
`AgentFunction(...)` for a `rendererOnly` function defined in code,
`AgentFunction.from_api(...)` to bind a catalog declaration, and
`with_handler`. `Catalog.copy_with(agent_functions=...)` adds them, and
`Catalog.agent_functions` and `Catalog.renderer_functions` list them
([#3536](https://github.com/a2ui-project/a2ui/issues/3536),
[#3792](https://github.com/a2ui-project/a2ui/pull/3792)).
- (v1_0) The settled agent function call cache evicts the oldest answer first
(reading an answer no longer keeps it), and its bound (256 by default) is
configurable with `MessageProcessorOptions.max_agent_call_cache_entries` or
`SurfaceModel(max_agent_call_cache_entries=...)`. `RpcHandler.dispose()`
also removes the outbound listener
([#3792](https://github.com/a2ui-project/a2ui/pull/3792)).
- Add `Catalog.derive`, which builds a catalog with a new `catalog_id` from
the named `components` and `functions` of an existing one and new entries,
with the `instructions` it is given, and does not keep the source's `$id`,
Expand Down
6 changes: 6 additions & 0 deletions python/a2ui_core/src/a2ui/core/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,9 @@
# limitations under the License.

from a2ui.core.catalog import (
AgentFunction as AgentFunction,
AgentFunctionContext as AgentFunctionContext,
AgentFunctionHandler as AgentFunctionHandler,
Catalog as Catalog,
CatalogApi as CatalogApi,
get_agent_to_renderer_schema_json as get_agent_to_renderer_schema_json,
Expand Down Expand Up @@ -101,8 +104,11 @@
"A2uiRpcError",
"A2uiStateError",
"A2uiValidationError",
"AgentFunction",
"AgentFunctionCall",
"AgentFunctionCaller",
"AgentFunctionContext",
"AgentFunctionHandler",
"CallOptions",
"CapabilitiesOptions",
"Catalog",
Expand Down
6 changes: 6 additions & 0 deletions python/a2ui_core/src/a2ui/core/catalog/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,9 @@
ModelComponentApi,
)
from .functions import (
AgentFunction,
AgentFunctionContext,
AgentFunctionHandler,
AllowedCallers,
FunctionApi,
FunctionImplementation,
Expand All @@ -58,6 +61,9 @@
)

__all__ = [
"AgentFunction",
Comment thread
nan-yu marked this conversation as resolved.
Resolved
"AgentFunctionContext",
"AgentFunctionHandler",
"AllowedCallers",
"Catalog",
"CatalogApi",
Expand Down
Loading
Loading