Referencia: definición de agente de interfaz de programación de aplicaciones (API) de ASOR de muestra
La primera sección de esta interfaz de programación de aplicaciones (API) define información básica sobre su agente:
{ "name": "Change Business Title Agent", "description": "A Workday agent for changing a business title with Agent Gateway", "provider": { "id": "Provider=SELF-BUILT" }, "url": "https://changetitleagent.com", "platform": { "id" : "Platform=GOOGLE_AGENTSPACE" }, "skills": [ { "description": "This skill gets worker information and changes a business title.", "id": "changeTitle_1", "inputModes": [ { "type": "application/json" } ], "name": "Change Title", "outputModes": [ { "type": "application/json" } ] } ], "workdayConfig": [ { "workdayResources": [ { "description": "Change Business Title", "tool_name": "changeBusinessTitle", "agent_resource": { "id": "c2ffb30053964fbfa7a46dcfa577adb1" } }, { "description": "Get Workers", "tool_name": "getWorkers", "agent_resource": { "id": "94a39e71541b468fa895955508287acd" } }, { "description": "Internal Auth Check", "tool_name": "internalAuthCheck", "agent_resource": { "id": "6bbfa713d3851000081920672a0f0009" } } ], "executionMode": { "id": "Mode=Delegate" }, "skillId": "changeTitle_1" } ], "capabilities": { "stateTransitionHistory": false, "streaming": false, "pushNotifications": false }, "supportsAuthenticatedExtendedCard": false, "version": "v1" }
La segunda sección de esta interfaz de programación de aplicaciones (API) es opcional. Incluye información específica de Workday, incluidas las API que se invocarán como parte de este agente:
{ "workdayResources": [ { "description": "Change Business Title", "tool_name": "changeBusinessTitle", "agent_resource": { "id": "c2ffb30053964fbfa7a46dcfa577adb1" } }, { "description": "Get Workers", "tool_name": "getWorkers", "agent_resource": { "id": "94a39e71541b468fa895955508287acd" } }, { "description": "Internal Auth Check", "tool_name": "internalAuthCheck", "agent_resource": { "id": "6bbfa713d3851000081920672a0f0009" } } ], "executionMode": { "id": "Mode=Delegate" }, "skillId": "changeTitle_1" }
Cada habilidad puede tener varias herramientas. Cada herramienta apunta a un recurso de Workday individual, que puede especificar mediante el ID de Workday (ID de Workday de Workday ) del recurso.
Respuesta de muestra
Después de registrar correctamente un agente a través de la interfaz de programación de aplicaciones (API), debería recibir una respuesta JSON :
{ "version": "v1", "provider": { "descriptor": "Self-Built", "id": "9030a823ae1a10002d624e2d637e0000" }, "skills": [ { "inputModes": [ { "type": "application/json" } ], "id": "changeTitle_1", "description": "This skill gets worker information and changes a business title.", "name": "Change Title", "outputModes": [ { "type": "application/json" } ] } ], "url": "https://changetitleagent.com", "description": "A Workday agent for changing a business title with Agent Gateway", "capabilities": { "pushNotifications": false, "stateTransitionHistory": false, "streaming": false }, "workdayConfig": [ { "executionMode": { "descriptor": "Delegate", "id": "d785eba56e9c100035d336a043ff0000" }, "skillId": "changeTitle_1", "workdayResources": [ { "description": "Internal Auth Check", "tool_name": "internalAuthCheck", "agent_resource": { "id": "6bbfa713d3851000081920672a0f0009", "descriptor": "trident/userAuth/checkAuth (GET) (v1 - )" } }, { "agent_resource": { "id": "c2ffb30053964fbfa7a46dcfa577adb1", "descriptor": "api/workers/businessTitleChanges/create (POST) (v1 - )" }, "tool_name": "changeBusinessTitle", "description": "Change Business Title" }, { "tool_name": "getWorkers", "agent_resource": { "id": "94a39e71541b468fa895955508287acd", "descriptor": "api/workers/view (GET) (v1 - )" }, "description": "Get Workers" } ] } ], "platform": { "id": "b49b32cfdbef10002184b61535490000", "descriptor": "Google Agentspace", "reference_id": "GOOGLE_AGENTSPACE" }, "name": "Change Business Title Agent", "supportsAuthenticatedExtendedCard": false }
La respuesta contendrá un ID en la parte superior, que es su ID de Workday de referencia si necesita GET la definición de agente mediante la interfaz de programación de aplicaciones (API) de agentDefinition.