Invoke Agent

Send a message to an agent with the public Fetch Hive API using an agent ID and message

POST /v1/agent/invoke

Send a message to an agent from your own app or service.

Authentication

Send your workspace API key in the Authorization header.

Authorization: Bearer YOUR_API_KEY

Request body

Open an agent in the editor and click Code Snippet to see the current public request shape in Fetch Hive.

Field
Type
Required
Description

agent

string

Yes

The agent ID

message

string

Yes

The message you want to send

streaming

boolean

No

Stream response events instead of waiting for one final JSON response

The code snippet dialog uses this body shape:

{
  "agent": "AGENT_UUID",
  "message": "Your message here",
  "streaming": true
}

Response

If streaming is true, Fetch Hive returns a stream of events.

Example reasoning event:

Example response event:

Example tool event:

Example final usage event:

If streaming is false, Fetch Hive returns one JSON response.

Example

Last updated