🚫
Internal use only!
An agent event handler is a plugin instance that listens for agent events. These event handlers may also receive tokens that allow them to send messages on behalf of the agents to which they are attached.
Create Agent Event Handler
POST /api/agents/:agentId/event-handlers
This endpoint adds a plugin instance as an event handler for an agent. The response of the API is the plugin instance.
curl https://management-api.useproteus.ai/api/agents/6819a0e484df0fc342cea506/event-handlers \
-X POST \
-H "Authorization: Bearer user-3a4d80a9c3cca7ffd1bc341f.ede04d00e4b168bed35d9fcde8c2f92f.00d7fecf89201691f94b01e5b294da65.e7ea4c191b2c9a059ce5658deb7349c26a931ed8b7a04bf0" \
-d '{
"name": "GPT-4o Message Processor",
"pluginId": "681f23cc38780a323859233f",
"events": ["AGENT_MESSAGE_RECEIVED"],
"scopes": ["AGENT_MESSAGE_WRITE"],
"eventDispatchMode": "SYNC",
"inputs": {
"apiKey": "sk-proj-your-api-key"
}
}'
This API call dispatches the PLUGIN_INSTALLED
event to the webhook of the plugin as a HTTP POST
request.