During implementation, if the agent name and description are not provided, the agent’s function name and docstring will be used as defaults (as they are required).
Example SDK Implementation
The@server.agent
decorator is used to configure an agent’s metadata when registering it with an ACP server:
agent.py
Parameters
Content Types
Theinput_content_types
and output_content_types
fields specify the MIME types that an agent can handle. Wildcards are supported.
Common Content Types
*/*
: Any contentimage/*
: Any imagetext/plain
: Plain text contentapplication/json
: JSON structured dataimage/png
: PNG image filesimage/jpeg
: JPEG image filesapplication/pdf
: PDF documents
Example Usage
Default Values
Ifinput_content_types
and output_content_types
are not specified in the decorator, they default to ["*/*"]
:
The schema is of type object
.