Call Agents using the Kolena API
POST /api/v1/client/agents/{agent_id}/runs
method.
Files are uploaded as multipart form data in this request.
The response body will be a JSON object containing the run_id
, which you can use to retrieve results later.
Authorization
header with your API key. See Managing API Keys for details.GET /api/v1/client/agents/{agent_id}/runs
method.
This will return a list of all runs for the agent.
Optionally, you can retrieve a single run using the run_id
query parameter.
The response body is a JSON object of the following format:
data
field, which contains the results of the agent run.
data
is a dictionary keyed by the prompt names you created in the Web UI for the agent.
Each entry in data
contains the results for that prompt, including:
value
: The actual result value returned by the agent for that prompt.metadata
: Additional information about the result, such as reasoning, citations, and confidence.GET /api/v1/client/agents
method, and get specific
agent information using the GET /api/v1/client/agents/{agent_id}
method.