llama-stack-mirror/docs/resources/llama-stack-spec.html
Ashwin Bharambe ec4fc800cc
[API Updates] Model / shield / memory-bank routing + agent persistence + support for private headers (#92)
This is yet another of those large PRs (hopefully we will have less and less of them as things mature fast). This one introduces substantial improvements and some simplifications to the stack.

Most important bits:

* Agents reference implementation now has support for session / turn persistence. The default implementation uses sqlite but there's also support for using Redis.

* We have re-architected the structure of the Stack APIs to allow for more flexible routing. The motivating use cases are:
  - routing model A to ollama and model B to a remote provider like Together
  - routing shield A to local impl while shield B to a remote provider like Bedrock
  - routing a vector memory bank to Weaviate while routing a keyvalue memory bank to Redis

* Support for provider specific parameters to be passed from the clients. A client can pass data using `x_llamastack_provider_data` parameter which can be type-checked and provided to the Adapter implementations.
2024-09-23 14:22:22 -07:00

6761 lines
246 KiB
HTML

<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<title>OpenAPI specification</title>
<link href="https://fonts.googleapis.com/css?family=Montserrat:300,400,700|Roboto:300,400,700" rel="stylesheet">
<style>
body {
margin: 0;
padding: 0;
}
</style>
<script defer="defer" src="https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js"></script>
<script defer="defer">
document.addEventListener("DOMContentLoaded", function () {
spec = {
"openapi": "3.1.0",
"info": {
"title": "[DRAFT] Llama Stack Specification",
"version": "0.0.1",
"description": "This is the specification of the llama stack that provides\n a set of endpoints and their corresponding interfaces that are tailored to\n best leverage Llama Models. The specification is still in draft and subject to change.\n Generated at 2024-09-23 10:56:42.866760"
},
"servers": [
{
"url": "http://any-hosted-llama-stack.com"
}
],
"paths": {
"/batch_inference/chat_completion": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BatchChatCompletionResponse"
}
}
}
}
},
"tags": [
"BatchInference"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BatchChatCompletionRequest"
}
}
},
"required": true
}
}
},
"/batch_inference/completion": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BatchCompletionResponse"
}
}
}
}
},
"tags": [
"BatchInference"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/BatchCompletionRequest"
}
}
},
"required": true
}
}
},
"/evaluate/job/cancel": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CancelEvaluationJobRequest"
}
}
},
"required": true
}
}
},
"/post_training/job/cancel": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"PostTraining"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CancelTrainingJobRequest"
}
}
},
"required": true
}
}
},
"/inference/chat_completion": {
"post": {
"responses": {
"200": {
"description": "Chat completion response. **OR** SSE-stream of these events.",
"content": {
"text/event-stream": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ChatCompletionResponse"
},
{
"$ref": "#/components/schemas/ChatCompletionResponseStreamChunk"
}
]
}
}
}
}
},
"tags": [
"Inference"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/ChatCompletionRequest"
}
}
},
"required": true
}
}
},
"/inference/completion": {
"post": {
"responses": {
"200": {
"description": "Completion response. **OR** streamed completion response.",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/CompletionResponse"
},
{
"$ref": "#/components/schemas/CompletionResponseStreamChunk"
}
]
}
}
}
}
},
"tags": [
"Inference"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CompletionRequest"
}
}
},
"required": true
}
}
},
"/agents/create": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentCreateResponse"
}
}
}
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAgentRequest"
}
}
},
"required": true
}
}
},
"/agents/session/create": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentSessionCreateResponse"
}
}
}
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAgentSessionRequest"
}
}
},
"required": true
}
}
},
"/agents/turn/create": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentTurnResponseStreamChunk"
}
}
}
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateAgentTurnRequest"
}
}
},
"required": true
}
}
},
"/datasets/create": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Datasets"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateDatasetRequest"
}
}
},
"required": true
}
}
},
"/memory/create": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MemoryBank"
}
}
}
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/CreateMemoryBankRequest"
}
}
},
"required": true
}
}
},
"/agents/delete": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteAgentsRequest"
}
}
},
"required": true
}
}
},
"/agents/session/delete": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteAgentsSessionRequest"
}
}
},
"required": true
}
}
},
"/datasets/delete": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Datasets"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteDatasetRequest"
}
}
},
"required": true
}
}
},
"/memory/documents/delete": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DeleteDocumentsRequest"
}
}
},
"required": true
}
}
},
"/memory/drop": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "string"
}
}
}
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DropMemoryBankRequest"
}
}
},
"required": true
}
}
},
"/inference/embeddings": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingsResponse"
}
}
}
}
},
"tags": [
"Inference"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EmbeddingsRequest"
}
}
},
"required": true
}
}
},
"/evaluate/question_answering/": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluationJob"
}
}
}
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluateQuestionAnsweringRequest"
}
}
},
"required": true
}
}
},
"/evaluate/summarization/": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluationJob"
}
}
}
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluateSummarizationRequest"
}
}
},
"required": true
}
}
},
"/evaluate/text_generation/": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluationJob"
}
}
}
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluateTextGenerationRequest"
}
}
},
"required": true
}
}
},
"/agents/session/get": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "agent_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "session_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetAgentsSessionRequest"
}
}
},
"required": true
}
}
},
"/agents/step/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/AgentStepResponse"
}
}
}
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "agent_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "turn_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "step_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/agents/turn/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Turn"
}
}
}
}
},
"tags": [
"Agents"
],
"parameters": [
{
"name": "agent_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "turn_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/datasets/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/TrainEvalDataset"
}
}
}
}
},
"tags": [
"Datasets"
],
"parameters": [
{
"name": "dataset_uuid",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/memory/documents/get": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/MemoryBankDocument"
}
}
}
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "bank_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/GetDocumentsRequest"
}
}
},
"required": true
}
}
},
"/evaluate/job/artifacts": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluationJobArtifactsResponse"
}
}
}
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "job_uuid",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/evaluate/job/logs": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluationJobLogStream"
}
}
}
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "job_uuid",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/evaluate/job/status": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/EvaluationJobStatusResponse"
}
}
}
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "job_uuid",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/evaluate/jobs": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/EvaluationJob"
}
}
}
}
},
"tags": [
"Evaluations"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/memory/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/MemoryBank"
},
{
"type": "null"
}
]
}
}
}
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "bank_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/models/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ModelServingSpec"
},
{
"type": "null"
}
]
}
}
}
}
},
"tags": [
"Models"
],
"parameters": [
{
"name": "core_model_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/memory_banks/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/MemoryBankSpec"
},
{
"type": "null"
}
]
}
}
}
}
},
"tags": [
"MemoryBanks"
],
"parameters": [
{
"name": "bank_type",
"in": "query",
"required": true,
"schema": {
"$ref": "#/components/schemas/MemoryBankType"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/shields/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ShieldSpec"
},
{
"type": "null"
}
]
}
}
}
}
},
"tags": [
"Shields"
],
"parameters": [
{
"name": "shield_type",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/telemetry/get_trace": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Trace"
}
}
}
}
},
"tags": [
"Telemetry"
],
"parameters": [
{
"name": "trace_id",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/post_training/job/artifacts": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostTrainingJobArtifactsResponse"
}
}
}
}
},
"tags": [
"PostTraining"
],
"parameters": [
{
"name": "job_uuid",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/post_training/job/logs": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostTrainingJobLogStream"
}
}
}
}
},
"tags": [
"PostTraining"
],
"parameters": [
{
"name": "job_uuid",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/post_training/job/status": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostTrainingJobStatusResponse"
}
}
}
}
},
"tags": [
"PostTraining"
],
"parameters": [
{
"name": "job_uuid",
"in": "query",
"required": true,
"schema": {
"type": "string"
}
},
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/post_training/jobs": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/PostTrainingJob"
}
}
}
}
},
"tags": [
"PostTraining"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/memory/insert": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/InsertDocumentsRequest"
}
}
},
"required": true
}
}
},
"/memory_banks/list": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/MemoryBankSpec"
}
}
}
}
},
"tags": [
"MemoryBanks"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/memory/list": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/MemoryBank"
}
}
}
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/models/list": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/ModelServingSpec"
}
}
}
}
},
"tags": [
"Models"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/shields/list": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/ShieldSpec"
}
}
}
}
},
"tags": [
"Shields"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
]
}
},
"/telemetry/log_event": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Telemetry"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/LogEventRequest"
}
}
},
"required": true
}
}
},
"/post_training/preference_optimize": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostTrainingJob"
}
}
}
}
},
"tags": [
"PostTraining"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PreferenceOptimizeRequest"
}
}
},
"required": true
}
}
},
"/memory/query": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QueryDocumentsResponse"
}
}
}
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/QueryDocumentsRequest"
}
}
},
"required": true
}
}
},
"/reward_scoring/score": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RewardScoringResponse"
}
}
}
}
},
"tags": [
"RewardScoring"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RewardScoreRequest"
}
}
},
"required": true
}
}
},
"/safety/run_shield": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunShieldResponse"
}
}
}
}
},
"tags": [
"Safety"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RunShieldRequest"
}
}
},
"required": true
}
}
},
"/post_training/supervised_fine_tune": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PostTrainingJob"
}
}
}
}
},
"tags": [
"PostTraining"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SupervisedFineTuneRequest"
}
}
},
"required": true
}
}
},
"/synthetic_data_generation/generate": {
"post": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SyntheticDataGenerationResponse"
}
}
}
}
},
"tags": [
"SyntheticDataGeneration"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SyntheticDataGenerateRequest"
}
}
},
"required": true
}
}
},
"/memory/update": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"tags": [
"Memory"
],
"parameters": [
{
"name": "X-LlamaStack-ProviderData",
"in": "header",
"description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
"required": false,
"schema": {
"type": "string"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/UpdateDocumentsRequest"
}
}
},
"required": true
}
}
}
},
"jsonSchemaDialect": "https://json-schema.org/draft/2020-12/schema",
"components": {
"schemas": {
"BuiltinTool": {
"type": "string",
"enum": [
"brave_search",
"wolfram_alpha",
"photogen",
"code_interpreter"
]
},
"CompletionMessage": {
"type": "object",
"properties": {
"role": {
"type": "string",
"const": "assistant",
"default": "assistant"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"stop_reason": {
"$ref": "#/components/schemas/StopReason"
},
"tool_calls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolCall"
}
}
},
"additionalProperties": false,
"required": [
"role",
"content",
"stop_reason",
"tool_calls"
]
},
"SamplingParams": {
"type": "object",
"properties": {
"strategy": {
"$ref": "#/components/schemas/SamplingStrategy",
"default": "greedy"
},
"temperature": {
"type": "number",
"default": 0.0
},
"top_p": {
"type": "number",
"default": 0.95
},
"top_k": {
"type": "integer",
"default": 0
},
"max_tokens": {
"type": "integer",
"default": 0
},
"repetition_penalty": {
"type": "number",
"default": 1.0
}
},
"additionalProperties": false,
"required": [
"strategy"
]
},
"SamplingStrategy": {
"type": "string",
"enum": [
"greedy",
"top_p",
"top_k"
]
},
"StopReason": {
"type": "string",
"enum": [
"end_of_turn",
"end_of_message",
"out_of_tokens"
]
},
"SystemMessage": {
"type": "object",
"properties": {
"role": {
"type": "string",
"const": "system",
"default": "system"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"required": [
"role",
"content"
]
},
"ToolCall": {
"type": "object",
"properties": {
"call_id": {
"type": "string"
},
"tool_name": {
"oneOf": [
{
"$ref": "#/components/schemas/BuiltinTool"
},
{
"type": "string"
}
]
},
"arguments": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
},
{
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "string"
},
{
"type": "integer"
},
{
"type": "number"
},
{
"type": "boolean"
},
{
"type": "null"
}
]
}
}
]
}
}
},
"additionalProperties": false,
"required": [
"call_id",
"tool_name",
"arguments"
]
},
"ToolChoice": {
"type": "string",
"enum": [
"auto",
"required"
]
},
"ToolDefinition": {
"type": "object",
"properties": {
"tool_name": {
"oneOf": [
{
"$ref": "#/components/schemas/BuiltinTool"
},
{
"type": "string"
}
]
},
"description": {
"type": "string"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ToolParamDefinition"
}
}
},
"additionalProperties": false,
"required": [
"tool_name"
]
},
"ToolParamDefinition": {
"type": "object",
"properties": {
"param_type": {
"type": "string"
},
"description": {
"type": "string"
},
"required": {
"type": "boolean",
"default": true
}
},
"additionalProperties": false,
"required": [
"param_type"
]
},
"ToolPromptFormat": {
"type": "string",
"enum": [
"json",
"function_tag"
],
"title": "This Enum refers to the prompt format for calling custom / zero shot tools",
"description": "`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n <function=function_name>(parameters)</function>\n\nThe detailed prompts for each of these formats are added to llama cli"
},
"ToolResponseMessage": {
"type": "object",
"properties": {
"role": {
"type": "string",
"const": "ipython",
"default": "ipython"
},
"call_id": {
"type": "string"
},
"tool_name": {
"oneOf": [
{
"$ref": "#/components/schemas/BuiltinTool"
},
{
"type": "string"
}
]
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"required": [
"role",
"call_id",
"tool_name",
"content"
]
},
"UserMessage": {
"type": "object",
"properties": {
"role": {
"type": "string",
"const": "user",
"default": "user"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"context": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"required": [
"role",
"content"
]
},
"BatchChatCompletionRequest": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"messages_batch": {
"type": "array",
"items": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
}
}
},
"sampling_params": {
"$ref": "#/components/schemas/SamplingParams"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolDefinition"
}
},
"tool_choice": {
"$ref": "#/components/schemas/ToolChoice"
},
"tool_prompt_format": {
"$ref": "#/components/schemas/ToolPromptFormat"
},
"logprobs": {
"type": "object",
"properties": {
"top_k": {
"type": "integer",
"default": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"model",
"messages_batch"
]
},
"BatchChatCompletionResponse": {
"type": "object",
"properties": {
"completion_message_batch": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CompletionMessage"
}
}
},
"additionalProperties": false,
"required": [
"completion_message_batch"
]
},
"BatchCompletionRequest": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"content_batch": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"sampling_params": {
"$ref": "#/components/schemas/SamplingParams"
},
"logprobs": {
"type": "object",
"properties": {
"top_k": {
"type": "integer",
"default": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"model",
"content_batch"
]
},
"BatchCompletionResponse": {
"type": "object",
"properties": {
"completion_message_batch": {
"type": "array",
"items": {
"$ref": "#/components/schemas/CompletionMessage"
}
}
},
"additionalProperties": false,
"required": [
"completion_message_batch"
]
},
"CancelEvaluationJobRequest": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"job_uuid"
]
},
"CancelTrainingJobRequest": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"job_uuid"
]
},
"ChatCompletionRequest": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
}
},
"sampling_params": {
"$ref": "#/components/schemas/SamplingParams"
},
"tools": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolDefinition"
}
},
"tool_choice": {
"$ref": "#/components/schemas/ToolChoice"
},
"tool_prompt_format": {
"$ref": "#/components/schemas/ToolPromptFormat"
},
"stream": {
"type": "boolean"
},
"logprobs": {
"type": "object",
"properties": {
"top_k": {
"type": "integer",
"default": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"model",
"messages"
]
},
"ChatCompletionResponse": {
"type": "object",
"properties": {
"completion_message": {
"$ref": "#/components/schemas/CompletionMessage"
},
"logprobs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TokenLogProbs"
}
}
},
"additionalProperties": false,
"required": [
"completion_message"
],
"title": "Chat completion response."
},
"ChatCompletionResponseEvent": {
"type": "object",
"properties": {
"event_type": {
"$ref": "#/components/schemas/ChatCompletionResponseEventType"
},
"delta": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ToolCallDelta"
}
]
},
"logprobs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TokenLogProbs"
}
},
"stop_reason": {
"$ref": "#/components/schemas/StopReason"
}
},
"additionalProperties": false,
"required": [
"event_type",
"delta"
],
"title": "Chat completion response event."
},
"ChatCompletionResponseEventType": {
"type": "string",
"enum": [
"start",
"complete",
"progress"
]
},
"ChatCompletionResponseStreamChunk": {
"type": "object",
"properties": {
"event": {
"$ref": "#/components/schemas/ChatCompletionResponseEvent"
}
},
"additionalProperties": false,
"required": [
"event"
],
"title": "SSE-stream of these events."
},
"TokenLogProbs": {
"type": "object",
"properties": {
"logprobs_by_token": {
"type": "object",
"additionalProperties": {
"type": "number"
}
}
},
"additionalProperties": false,
"required": [
"logprobs_by_token"
]
},
"ToolCallDelta": {
"type": "object",
"properties": {
"content": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ToolCall"
}
]
},
"parse_status": {
"$ref": "#/components/schemas/ToolCallParseStatus"
}
},
"additionalProperties": false,
"required": [
"content",
"parse_status"
]
},
"ToolCallParseStatus": {
"type": "string",
"enum": [
"started",
"in_progress",
"failure",
"success"
]
},
"CompletionRequest": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"sampling_params": {
"$ref": "#/components/schemas/SamplingParams"
},
"stream": {
"type": "boolean"
},
"logprobs": {
"type": "object",
"properties": {
"top_k": {
"type": "integer",
"default": 0
}
},
"additionalProperties": false
}
},
"additionalProperties": false,
"required": [
"model",
"content"
]
},
"CompletionResponse": {
"type": "object",
"properties": {
"completion_message": {
"$ref": "#/components/schemas/CompletionMessage"
},
"logprobs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TokenLogProbs"
}
}
},
"additionalProperties": false,
"required": [
"completion_message"
],
"title": "Completion response."
},
"CompletionResponseStreamChunk": {
"type": "object",
"properties": {
"delta": {
"type": "string"
},
"stop_reason": {
"$ref": "#/components/schemas/StopReason"
},
"logprobs": {
"type": "array",
"items": {
"$ref": "#/components/schemas/TokenLogProbs"
}
}
},
"additionalProperties": false,
"required": [
"delta"
],
"title": "streamed completion response."
},
"AgentConfig": {
"type": "object",
"properties": {
"sampling_params": {
"$ref": "#/components/schemas/SamplingParams"
},
"input_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"output_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"tools": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/SearchToolDefinition"
},
{
"$ref": "#/components/schemas/WolframAlphaToolDefinition"
},
{
"$ref": "#/components/schemas/PhotogenToolDefinition"
},
{
"$ref": "#/components/schemas/CodeInterpreterToolDefinition"
},
{
"$ref": "#/components/schemas/FunctionCallToolDefinition"
},
{
"$ref": "#/components/schemas/MemoryToolDefinition"
}
]
}
},
"tool_choice": {
"$ref": "#/components/schemas/ToolChoice",
"default": "auto"
},
"tool_prompt_format": {
"$ref": "#/components/schemas/ToolPromptFormat",
"default": "json"
},
"max_infer_iters": {
"type": "integer",
"default": 10
},
"model": {
"type": "string"
},
"instructions": {
"type": "string"
},
"enable_session_persistence": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"max_infer_iters",
"model",
"instructions",
"enable_session_persistence"
]
},
"CodeInterpreterToolDefinition": {
"type": "object",
"properties": {
"input_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"output_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "code_interpreter",
"default": "code_interpreter"
},
"enable_inline_code_execution": {
"type": "boolean",
"default": true
},
"remote_execution": {
"$ref": "#/components/schemas/RestAPIExecutionConfig"
}
},
"additionalProperties": false,
"required": [
"type",
"enable_inline_code_execution"
]
},
"FunctionCallToolDefinition": {
"type": "object",
"properties": {
"input_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"output_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "function_call",
"default": "function_call"
},
"function_name": {
"type": "string"
},
"description": {
"type": "string"
},
"parameters": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ToolParamDefinition"
}
},
"remote_execution": {
"$ref": "#/components/schemas/RestAPIExecutionConfig"
}
},
"additionalProperties": false,
"required": [
"type",
"function_name",
"description",
"parameters"
]
},
"MemoryToolDefinition": {
"type": "object",
"properties": {
"input_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"output_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "memory",
"default": "memory"
},
"memory_bank_configs": {
"type": "array",
"items": {
"oneOf": [
{
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"type": {
"type": "string",
"const": "vector",
"default": "vector"
}
},
"additionalProperties": false,
"required": [
"bank_id",
"type"
]
},
{
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"type": {
"type": "string",
"const": "keyvalue",
"default": "keyvalue"
},
"keys": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"bank_id",
"type",
"keys"
]
},
{
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"type": {
"type": "string",
"const": "keyword",
"default": "keyword"
}
},
"additionalProperties": false,
"required": [
"bank_id",
"type"
]
},
{
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"type": {
"type": "string",
"const": "graph",
"default": "graph"
},
"entities": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"bank_id",
"type",
"entities"
]
}
]
}
},
"query_generator_config": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "default",
"default": "default"
},
"sep": {
"type": "string",
"default": " "
}
},
"additionalProperties": false,
"required": [
"type",
"sep"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "llm",
"default": "llm"
},
"model": {
"type": "string"
},
"template": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"model",
"template"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "custom",
"default": "custom"
}
},
"additionalProperties": false,
"required": [
"type"
]
}
]
},
"max_tokens_in_context": {
"type": "integer",
"default": 4096
},
"max_chunks": {
"type": "integer",
"default": 10
}
},
"additionalProperties": false,
"required": [
"type",
"memory_bank_configs",
"query_generator_config",
"max_tokens_in_context",
"max_chunks"
]
},
"PhotogenToolDefinition": {
"type": "object",
"properties": {
"input_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"output_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "photogen",
"default": "photogen"
},
"remote_execution": {
"$ref": "#/components/schemas/RestAPIExecutionConfig"
}
},
"additionalProperties": false,
"required": [
"type"
]
},
"RestAPIExecutionConfig": {
"type": "object",
"properties": {
"url": {
"$ref": "#/components/schemas/URL"
},
"method": {
"$ref": "#/components/schemas/RestAPIMethod"
},
"params": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"headers": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"body": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"url",
"method"
]
},
"RestAPIMethod": {
"type": "string",
"enum": [
"GET",
"POST",
"PUT",
"DELETE"
]
},
"SearchToolDefinition": {
"type": "object",
"properties": {
"input_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"output_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "brave_search",
"default": "brave_search"
},
"api_key": {
"type": "string"
},
"engine": {
"type": "string",
"enum": [
"bing",
"brave"
],
"default": "brave"
},
"remote_execution": {
"$ref": "#/components/schemas/RestAPIExecutionConfig"
}
},
"additionalProperties": false,
"required": [
"type",
"api_key",
"engine"
]
},
"URL": {
"type": "string",
"format": "uri",
"pattern": "^(https?://|file://|data:)"
},
"WolframAlphaToolDefinition": {
"type": "object",
"properties": {
"input_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"output_shields": {
"type": "array",
"items": {
"type": "string"
}
},
"type": {
"type": "string",
"const": "wolfram_alpha",
"default": "wolfram_alpha"
},
"api_key": {
"type": "string"
},
"remote_execution": {
"$ref": "#/components/schemas/RestAPIExecutionConfig"
}
},
"additionalProperties": false,
"required": [
"type",
"api_key"
]
},
"CreateAgentRequest": {
"type": "object",
"properties": {
"agent_config": {
"$ref": "#/components/schemas/AgentConfig"
}
},
"additionalProperties": false,
"required": [
"agent_config"
]
},
"AgentCreateResponse": {
"type": "object",
"properties": {
"agent_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"agent_id"
]
},
"CreateAgentSessionRequest": {
"type": "object",
"properties": {
"agent_id": {
"type": "string"
},
"session_name": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"agent_id",
"session_name"
]
},
"AgentSessionCreateResponse": {
"type": "object",
"properties": {
"session_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"session_id"
]
},
"Attachment": {
"type": "object",
"properties": {
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "#/components/schemas/URL"
}
]
},
"mime_type": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"content",
"mime_type"
]
},
"CreateAgentTurnRequest": {
"type": "object",
"properties": {
"agent_id": {
"type": "string"
},
"session_id": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
}
]
}
},
"attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attachment"
}
},
"stream": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"agent_id",
"session_id",
"messages"
]
},
"AgentTurnResponseEvent": {
"type": "object",
"properties": {
"payload": {
"oneOf": [
{
"$ref": "#/components/schemas/AgentTurnResponseStepStartPayload"
},
{
"$ref": "#/components/schemas/AgentTurnResponseStepProgressPayload"
},
{
"$ref": "#/components/schemas/AgentTurnResponseStepCompletePayload"
},
{
"$ref": "#/components/schemas/AgentTurnResponseTurnStartPayload"
},
{
"$ref": "#/components/schemas/AgentTurnResponseTurnCompletePayload"
}
]
}
},
"additionalProperties": false,
"required": [
"payload"
],
"title": "Streamed agent execution response."
},
"AgentTurnResponseStepCompletePayload": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"const": "step_complete",
"default": "step_complete"
},
"step_type": {
"type": "string",
"enum": [
"inference",
"tool_execution",
"shield_call",
"memory_retrieval"
]
},
"step_details": {
"oneOf": [
{
"$ref": "#/components/schemas/InferenceStep"
},
{
"$ref": "#/components/schemas/ToolExecutionStep"
},
{
"$ref": "#/components/schemas/ShieldCallStep"
},
{
"$ref": "#/components/schemas/MemoryRetrievalStep"
}
]
}
},
"additionalProperties": false,
"required": [
"event_type",
"step_type",
"step_details"
]
},
"AgentTurnResponseStepProgressPayload": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"const": "step_progress",
"default": "step_progress"
},
"step_type": {
"type": "string",
"enum": [
"inference",
"tool_execution",
"shield_call",
"memory_retrieval"
]
},
"step_id": {
"type": "string"
},
"model_response_text_delta": {
"type": "string"
},
"tool_call_delta": {
"$ref": "#/components/schemas/ToolCallDelta"
},
"tool_response_text_delta": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"event_type",
"step_type",
"step_id"
]
},
"AgentTurnResponseStepStartPayload": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"const": "step_start",
"default": "step_start"
},
"step_type": {
"type": "string",
"enum": [
"inference",
"tool_execution",
"shield_call",
"memory_retrieval"
]
},
"step_id": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"event_type",
"step_type",
"step_id"
]
},
"AgentTurnResponseStreamChunk": {
"type": "object",
"properties": {
"event": {
"$ref": "#/components/schemas/AgentTurnResponseEvent"
}
},
"additionalProperties": false,
"required": [
"event"
]
},
"AgentTurnResponseTurnCompletePayload": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"const": "turn_complete",
"default": "turn_complete"
},
"turn": {
"$ref": "#/components/schemas/Turn"
}
},
"additionalProperties": false,
"required": [
"event_type",
"turn"
]
},
"AgentTurnResponseTurnStartPayload": {
"type": "object",
"properties": {
"event_type": {
"type": "string",
"const": "turn_start",
"default": "turn_start"
},
"turn_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"event_type",
"turn_id"
]
},
"InferenceStep": {
"type": "object",
"properties": {
"turn_id": {
"type": "string"
},
"step_id": {
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
},
"step_type": {
"type": "string",
"const": "inference",
"default": "inference"
},
"model_response": {
"$ref": "#/components/schemas/CompletionMessage"
}
},
"additionalProperties": false,
"required": [
"turn_id",
"step_id",
"step_type",
"model_response"
]
},
"MemoryRetrievalStep": {
"type": "object",
"properties": {
"turn_id": {
"type": "string"
},
"step_id": {
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
},
"step_type": {
"type": "string",
"const": "memory_retrieval",
"default": "memory_retrieval"
},
"memory_bank_ids": {
"type": "array",
"items": {
"type": "string"
}
},
"inserted_context": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"required": [
"turn_id",
"step_id",
"step_type",
"memory_bank_ids",
"inserted_context"
]
},
"SafetyViolation": {
"type": "object",
"properties": {
"violation_level": {
"$ref": "#/components/schemas/ViolationLevel"
},
"user_message": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"violation_level",
"metadata"
]
},
"ShieldCallStep": {
"type": "object",
"properties": {
"turn_id": {
"type": "string"
},
"step_id": {
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
},
"step_type": {
"type": "string",
"const": "shield_call",
"default": "shield_call"
},
"violation": {
"$ref": "#/components/schemas/SafetyViolation"
}
},
"additionalProperties": false,
"required": [
"turn_id",
"step_id",
"step_type"
]
},
"ToolExecutionStep": {
"type": "object",
"properties": {
"turn_id": {
"type": "string"
},
"step_id": {
"type": "string"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
},
"step_type": {
"type": "string",
"const": "tool_execution",
"default": "tool_execution"
},
"tool_calls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolCall"
}
},
"tool_responses": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolResponse"
}
}
},
"additionalProperties": false,
"required": [
"turn_id",
"step_id",
"step_type",
"tool_calls",
"tool_responses"
]
},
"ToolResponse": {
"type": "object",
"properties": {
"call_id": {
"type": "string"
},
"tool_name": {
"oneOf": [
{
"$ref": "#/components/schemas/BuiltinTool"
},
{
"type": "string"
}
]
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
},
"additionalProperties": false,
"required": [
"call_id",
"tool_name",
"content"
]
},
"Turn": {
"type": "object",
"properties": {
"turn_id": {
"type": "string"
},
"session_id": {
"type": "string"
},
"input_messages": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
}
]
}
},
"steps": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/InferenceStep"
},
{
"$ref": "#/components/schemas/ToolExecutionStep"
},
{
"$ref": "#/components/schemas/ShieldCallStep"
},
{
"$ref": "#/components/schemas/MemoryRetrievalStep"
}
]
}
},
"output_message": {
"$ref": "#/components/schemas/CompletionMessage"
},
"output_attachments": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Attachment"
}
},
"started_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"turn_id",
"session_id",
"input_messages",
"steps",
"output_message",
"output_attachments",
"started_at"
],
"title": "A single turn in an interaction with an Agentic System."
},
"ViolationLevel": {
"type": "string",
"enum": [
"info",
"warn",
"error"
]
},
"TrainEvalDataset": {
"type": "object",
"properties": {
"columns": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/TrainEvalDatasetColumnType"
}
},
"content_url": {
"$ref": "#/components/schemas/URL"
},
"metadata": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"columns",
"content_url"
],
"title": "Dataset to be used for training or evaluating language models."
},
"TrainEvalDatasetColumnType": {
"type": "string",
"enum": [
"dialog",
"text",
"media",
"number",
"json"
]
},
"CreateDatasetRequest": {
"type": "object",
"properties": {
"uuid": {
"type": "string"
},
"dataset": {
"$ref": "#/components/schemas/TrainEvalDataset"
}
},
"additionalProperties": false,
"required": [
"uuid",
"dataset"
]
},
"CreateMemoryBankRequest": {
"type": "object",
"properties": {
"name": {
"type": "string"
},
"config": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "vector",
"default": "vector"
},
"embedding_model": {
"type": "string"
},
"chunk_size_in_tokens": {
"type": "integer"
},
"overlap_size_in_tokens": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"type",
"embedding_model",
"chunk_size_in_tokens"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "keyvalue",
"default": "keyvalue"
}
},
"additionalProperties": false,
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "keyword",
"default": "keyword"
}
},
"additionalProperties": false,
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "graph",
"default": "graph"
}
},
"additionalProperties": false,
"required": [
"type"
]
}
]
},
"url": {
"$ref": "#/components/schemas/URL"
}
},
"additionalProperties": false,
"required": [
"name",
"config"
]
},
"MemoryBank": {
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"name": {
"type": "string"
},
"config": {
"oneOf": [
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "vector",
"default": "vector"
},
"embedding_model": {
"type": "string"
},
"chunk_size_in_tokens": {
"type": "integer"
},
"overlap_size_in_tokens": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"type",
"embedding_model",
"chunk_size_in_tokens"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "keyvalue",
"default": "keyvalue"
}
},
"additionalProperties": false,
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "keyword",
"default": "keyword"
}
},
"additionalProperties": false,
"required": [
"type"
]
},
{
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "graph",
"default": "graph"
}
},
"additionalProperties": false,
"required": [
"type"
]
}
]
},
"url": {
"$ref": "#/components/schemas/URL"
}
},
"additionalProperties": false,
"required": [
"bank_id",
"name",
"config"
]
},
"DeleteAgentsRequest": {
"type": "object",
"properties": {
"agent_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"agent_id"
]
},
"DeleteAgentsSessionRequest": {
"type": "object",
"properties": {
"agent_id": {
"type": "string"
},
"session_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"agent_id",
"session_id"
]
},
"DeleteDatasetRequest": {
"type": "object",
"properties": {
"dataset_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"dataset_uuid"
]
},
"DeleteDocumentsRequest": {
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"document_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"bank_id",
"document_ids"
]
},
"DropMemoryBankRequest": {
"type": "object",
"properties": {
"bank_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"bank_id"
]
},
"EmbeddingsRequest": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"contents": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
}
}
},
"additionalProperties": false,
"required": [
"model",
"contents"
]
},
"EmbeddingsResponse": {
"type": "object",
"properties": {
"embeddings": {
"type": "array",
"items": {
"type": "array",
"items": {
"type": "number"
}
}
}
},
"additionalProperties": false,
"required": [
"embeddings"
]
},
"EvaluateQuestionAnsweringRequest": {
"type": "object",
"properties": {
"metrics": {
"type": "array",
"items": {
"type": "string",
"enum": [
"em",
"f1"
]
}
}
},
"additionalProperties": false,
"required": [
"metrics"
]
},
"EvaluationJob": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"job_uuid"
]
},
"EvaluateSummarizationRequest": {
"type": "object",
"properties": {
"metrics": {
"type": "array",
"items": {
"type": "string",
"enum": [
"rouge",
"bleu"
]
}
}
},
"additionalProperties": false,
"required": [
"metrics"
]
},
"EvaluateTextGenerationRequest": {
"type": "object",
"properties": {
"metrics": {
"type": "array",
"items": {
"type": "string",
"enum": [
"perplexity",
"rouge",
"bleu"
]
}
}
},
"additionalProperties": false,
"required": [
"metrics"
]
},
"GetAgentsSessionRequest": {
"type": "object",
"properties": {
"turn_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false
},
"Session": {
"type": "object",
"properties": {
"session_id": {
"type": "string"
},
"session_name": {
"type": "string"
},
"turns": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Turn"
}
},
"started_at": {
"type": "string",
"format": "date-time"
},
"memory_bank": {
"$ref": "#/components/schemas/MemoryBank"
}
},
"additionalProperties": false,
"required": [
"session_id",
"session_name",
"turns",
"started_at"
],
"title": "A single session of an interaction with an Agentic System."
},
"AgentStepResponse": {
"type": "object",
"properties": {
"step": {
"oneOf": [
{
"$ref": "#/components/schemas/InferenceStep"
},
{
"$ref": "#/components/schemas/ToolExecutionStep"
},
{
"$ref": "#/components/schemas/ShieldCallStep"
},
{
"$ref": "#/components/schemas/MemoryRetrievalStep"
}
]
}
},
"additionalProperties": false,
"required": [
"step"
]
},
"GetDocumentsRequest": {
"type": "object",
"properties": {
"document_ids": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"document_ids"
]
},
"MemoryBankDocument": {
"type": "object",
"properties": {
"document_id": {
"type": "string"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
},
{
"$ref": "#/components/schemas/URL"
}
]
},
"mime_type": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"document_id",
"content",
"metadata"
]
},
"EvaluationJobArtifactsResponse": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"job_uuid"
],
"title": "Artifacts of a evaluation job."
},
"EvaluationJobLogStream": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"job_uuid"
]
},
"EvaluationJobStatusResponse": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"job_uuid"
]
},
"Model": {
"description": "The model family and SKU of the model along with other parameters corresponding to the model."
},
"ModelServingSpec": {
"type": "object",
"properties": {
"llama_model": {
"$ref": "#/components/schemas/Model"
},
"provider_config": {
"type": "object",
"properties": {
"provider_id": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"provider_id",
"config"
]
}
},
"additionalProperties": false,
"required": [
"llama_model",
"provider_config"
]
},
"MemoryBankType": {
"type": "string",
"enum": [
"vector",
"keyvalue",
"keyword",
"graph"
]
},
"MemoryBankSpec": {
"type": "object",
"properties": {
"bank_type": {
"$ref": "#/components/schemas/MemoryBankType"
},
"provider_config": {
"type": "object",
"properties": {
"provider_id": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"provider_id",
"config"
]
}
},
"additionalProperties": false,
"required": [
"bank_type",
"provider_config"
]
},
"ShieldSpec": {
"type": "object",
"properties": {
"shield_type": {
"type": "string"
},
"provider_config": {
"type": "object",
"properties": {
"provider_id": {
"type": "string"
},
"config": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"provider_id",
"config"
]
}
},
"additionalProperties": false,
"required": [
"shield_type",
"provider_config"
]
},
"Trace": {
"type": "object",
"properties": {
"trace_id": {
"type": "string"
},
"root_span_id": {
"type": "string"
},
"start_time": {
"type": "string",
"format": "date-time"
},
"end_time": {
"type": "string",
"format": "date-time"
}
},
"additionalProperties": false,
"required": [
"trace_id",
"root_span_id",
"start_time"
]
},
"Checkpoint": {
"description": "Checkpoint created during training runs"
},
"PostTrainingJobArtifactsResponse": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
},
"checkpoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Checkpoint"
}
}
},
"additionalProperties": false,
"required": [
"job_uuid",
"checkpoints"
],
"title": "Artifacts of a finetuning job."
},
"PostTrainingJobLogStream": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
},
"log_lines": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"job_uuid",
"log_lines"
],
"title": "Stream of logs from a finetuning job."
},
"PostTrainingJobStatus": {
"type": "string",
"enum": [
"running",
"completed",
"failed",
"scheduled"
]
},
"PostTrainingJobStatusResponse": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
},
"status": {
"$ref": "#/components/schemas/PostTrainingJobStatus"
},
"scheduled_at": {
"type": "string",
"format": "date-time"
},
"started_at": {
"type": "string",
"format": "date-time"
},
"completed_at": {
"type": "string",
"format": "date-time"
},
"resources_allocated": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"checkpoints": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Checkpoint"
}
}
},
"additionalProperties": false,
"required": [
"job_uuid",
"status",
"checkpoints"
],
"title": "Status of a finetuning job."
},
"PostTrainingJob": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"job_uuid"
]
},
"InsertDocumentsRequest": {
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"documents": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemoryBankDocument"
}
},
"ttl_seconds": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"bank_id",
"documents"
]
},
"LogSeverity": {
"type": "string",
"enum": [
"verbose",
"debug",
"info",
"warn",
"error",
"critical"
]
},
"MetricEvent": {
"type": "object",
"properties": {
"trace_id": {
"type": "string"
},
"span_id": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"attributes": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"type": {
"type": "string",
"const": "metric",
"default": "metric"
},
"metric": {
"type": "string"
},
"value": {
"oneOf": [
{
"type": "integer"
},
{
"type": "number"
}
]
},
"unit": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"trace_id",
"span_id",
"timestamp",
"type",
"metric",
"value",
"unit"
]
},
"SpanEndPayload": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "span_end",
"default": "span_end"
},
"status": {
"$ref": "#/components/schemas/SpanStatus"
}
},
"additionalProperties": false,
"required": [
"type",
"status"
]
},
"SpanStartPayload": {
"type": "object",
"properties": {
"type": {
"type": "string",
"const": "span_start",
"default": "span_start"
},
"name": {
"type": "string"
},
"parent_span_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"type",
"name"
]
},
"SpanStatus": {
"type": "string",
"enum": [
"ok",
"error"
]
},
"StructuredLogEvent": {
"type": "object",
"properties": {
"trace_id": {
"type": "string"
},
"span_id": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"attributes": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"type": {
"type": "string",
"const": "structured_log",
"default": "structured_log"
},
"payload": {
"oneOf": [
{
"$ref": "#/components/schemas/SpanStartPayload"
},
{
"$ref": "#/components/schemas/SpanEndPayload"
}
]
}
},
"additionalProperties": false,
"required": [
"trace_id",
"span_id",
"timestamp",
"type",
"payload"
]
},
"UnstructuredLogEvent": {
"type": "object",
"properties": {
"trace_id": {
"type": "string"
},
"span_id": {
"type": "string"
},
"timestamp": {
"type": "string",
"format": "date-time"
},
"attributes": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"type": {
"type": "string",
"const": "unstructured_log",
"default": "unstructured_log"
},
"message": {
"type": "string"
},
"severity": {
"$ref": "#/components/schemas/LogSeverity"
}
},
"additionalProperties": false,
"required": [
"trace_id",
"span_id",
"timestamp",
"type",
"message",
"severity"
]
},
"LogEventRequest": {
"type": "object",
"properties": {
"event": {
"oneOf": [
{
"$ref": "#/components/schemas/UnstructuredLogEvent"
},
{
"$ref": "#/components/schemas/MetricEvent"
},
{
"$ref": "#/components/schemas/StructuredLogEvent"
}
]
}
},
"additionalProperties": false,
"required": [
"event"
]
},
"DPOAlignmentConfig": {
"type": "object",
"properties": {
"reward_scale": {
"type": "number"
},
"reward_clip": {
"type": "number"
},
"epsilon": {
"type": "number"
},
"gamma": {
"type": "number"
}
},
"additionalProperties": false,
"required": [
"reward_scale",
"reward_clip",
"epsilon",
"gamma"
]
},
"OptimizerConfig": {
"type": "object",
"properties": {
"optimizer_type": {
"type": "string",
"enum": [
"adam",
"adamw",
"sgd"
]
},
"lr": {
"type": "number"
},
"lr_min": {
"type": "number"
},
"weight_decay": {
"type": "number"
}
},
"additionalProperties": false,
"required": [
"optimizer_type",
"lr",
"lr_min",
"weight_decay"
]
},
"RLHFAlgorithm": {
"type": "string",
"enum": [
"dpo"
]
},
"TrainingConfig": {
"type": "object",
"properties": {
"n_epochs": {
"type": "integer"
},
"batch_size": {
"type": "integer"
},
"shuffle": {
"type": "boolean"
},
"n_iters": {
"type": "integer"
},
"enable_activation_checkpointing": {
"type": "boolean"
},
"memory_efficient_fsdp_wrap": {
"type": "boolean"
},
"fsdp_cpu_offload": {
"type": "boolean"
}
},
"additionalProperties": false,
"required": [
"n_epochs",
"batch_size",
"shuffle",
"n_iters",
"enable_activation_checkpointing",
"memory_efficient_fsdp_wrap",
"fsdp_cpu_offload"
]
},
"PreferenceOptimizeRequest": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
},
"finetuned_model": {
"$ref": "#/components/schemas/URL"
},
"dataset": {
"$ref": "#/components/schemas/TrainEvalDataset"
},
"validation_dataset": {
"$ref": "#/components/schemas/TrainEvalDataset"
},
"algorithm": {
"$ref": "#/components/schemas/RLHFAlgorithm"
},
"algorithm_config": {
"$ref": "#/components/schemas/DPOAlignmentConfig"
},
"optimizer_config": {
"$ref": "#/components/schemas/OptimizerConfig"
},
"training_config": {
"$ref": "#/components/schemas/TrainingConfig"
},
"hyperparam_search_config": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"logger_config": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"job_uuid",
"finetuned_model",
"dataset",
"validation_dataset",
"algorithm",
"algorithm_config",
"optimizer_config",
"training_config",
"hyperparam_search_config",
"logger_config"
]
},
"QueryDocumentsRequest": {
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"query": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"params": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"bank_id",
"query"
]
},
"QueryDocumentsResponse": {
"type": "object",
"properties": {
"chunks": {
"type": "array",
"items": {
"type": "object",
"properties": {
"content": {
"oneOf": [
{
"type": "string"
},
{
"type": "array",
"items": {
"type": "string"
}
}
]
},
"token_count": {
"type": "integer"
},
"document_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"content",
"token_count",
"document_id"
]
}
},
"scores": {
"type": "array",
"items": {
"type": "number"
}
}
},
"additionalProperties": false,
"required": [
"chunks",
"scores"
]
},
"DialogGenerations": {
"type": "object",
"properties": {
"dialog": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
}
},
"sampled_generations": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
}
}
},
"additionalProperties": false,
"required": [
"dialog",
"sampled_generations"
]
},
"RewardScoreRequest": {
"type": "object",
"properties": {
"dialog_generations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/DialogGenerations"
}
},
"model": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"dialog_generations",
"model"
]
},
"RewardScoringResponse": {
"type": "object",
"properties": {
"scored_generations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ScoredDialogGenerations"
}
}
},
"additionalProperties": false,
"required": [
"scored_generations"
],
"title": "Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold."
},
"ScoredDialogGenerations": {
"type": "object",
"properties": {
"dialog": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
}
},
"scored_generations": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ScoredMessage"
}
}
},
"additionalProperties": false,
"required": [
"dialog",
"scored_generations"
]
},
"ScoredMessage": {
"type": "object",
"properties": {
"message": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
},
"score": {
"type": "number"
}
},
"additionalProperties": false,
"required": [
"message",
"score"
]
},
"RunShieldRequest": {
"type": "object",
"properties": {
"shield_type": {
"type": "string"
},
"messages": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
}
},
"params": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"shield_type",
"messages",
"params"
]
},
"RunShieldResponse": {
"type": "object",
"properties": {
"violation": {
"$ref": "#/components/schemas/SafetyViolation"
}
},
"additionalProperties": false
},
"DoraFinetuningConfig": {
"type": "object",
"properties": {
"lora_attn_modules": {
"type": "array",
"items": {
"type": "string"
}
},
"apply_lora_to_mlp": {
"type": "boolean"
},
"apply_lora_to_output": {
"type": "boolean"
},
"rank": {
"type": "integer"
},
"alpha": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"lora_attn_modules",
"apply_lora_to_mlp",
"apply_lora_to_output",
"rank",
"alpha"
]
},
"FinetuningAlgorithm": {
"type": "string",
"enum": [
"full",
"lora",
"qlora",
"dora"
]
},
"LoraFinetuningConfig": {
"type": "object",
"properties": {
"lora_attn_modules": {
"type": "array",
"items": {
"type": "string"
}
},
"apply_lora_to_mlp": {
"type": "boolean"
},
"apply_lora_to_output": {
"type": "boolean"
},
"rank": {
"type": "integer"
},
"alpha": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"lora_attn_modules",
"apply_lora_to_mlp",
"apply_lora_to_output",
"rank",
"alpha"
]
},
"QLoraFinetuningConfig": {
"type": "object",
"properties": {
"lora_attn_modules": {
"type": "array",
"items": {
"type": "string"
}
},
"apply_lora_to_mlp": {
"type": "boolean"
},
"apply_lora_to_output": {
"type": "boolean"
},
"rank": {
"type": "integer"
},
"alpha": {
"type": "integer"
}
},
"additionalProperties": false,
"required": [
"lora_attn_modules",
"apply_lora_to_mlp",
"apply_lora_to_output",
"rank",
"alpha"
]
},
"SupervisedFineTuneRequest": {
"type": "object",
"properties": {
"job_uuid": {
"type": "string"
},
"model": {
"type": "string"
},
"dataset": {
"$ref": "#/components/schemas/TrainEvalDataset"
},
"validation_dataset": {
"$ref": "#/components/schemas/TrainEvalDataset"
},
"algorithm": {
"$ref": "#/components/schemas/FinetuningAlgorithm"
},
"algorithm_config": {
"oneOf": [
{
"$ref": "#/components/schemas/LoraFinetuningConfig"
},
{
"$ref": "#/components/schemas/QLoraFinetuningConfig"
},
{
"$ref": "#/components/schemas/DoraFinetuningConfig"
}
]
},
"optimizer_config": {
"$ref": "#/components/schemas/OptimizerConfig"
},
"training_config": {
"$ref": "#/components/schemas/TrainingConfig"
},
"hyperparam_search_config": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"logger_config": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"job_uuid",
"model",
"dataset",
"validation_dataset",
"algorithm",
"algorithm_config",
"optimizer_config",
"training_config",
"hyperparam_search_config",
"logger_config"
]
},
"SyntheticDataGenerateRequest": {
"type": "object",
"properties": {
"dialogs": {
"type": "array",
"items": {
"oneOf": [
{
"$ref": "#/components/schemas/UserMessage"
},
{
"$ref": "#/components/schemas/SystemMessage"
},
{
"$ref": "#/components/schemas/ToolResponseMessage"
},
{
"$ref": "#/components/schemas/CompletionMessage"
}
]
}
},
"filtering_function": {
"type": "string",
"enum": [
"none",
"random",
"top_k",
"top_p",
"top_k_top_p",
"sigmoid"
],
"title": "The type of filtering function."
},
"model": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"dialogs",
"filtering_function"
]
},
"SyntheticDataGenerationResponse": {
"type": "object",
"properties": {
"synthetic_data": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ScoredDialogGenerations"
}
},
"statistics": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
}
},
"additionalProperties": false,
"required": [
"synthetic_data"
],
"title": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold."
},
"UpdateDocumentsRequest": {
"type": "object",
"properties": {
"bank_id": {
"type": "string"
},
"documents": {
"type": "array",
"items": {
"$ref": "#/components/schemas/MemoryBankDocument"
}
}
},
"additionalProperties": false,
"required": [
"bank_id",
"documents"
]
}
},
"responses": {}
},
"security": [
{
"Default": []
}
],
"tags": [
{
"name": "Inference"
},
{
"name": "Shields"
},
{
"name": "Models"
},
{
"name": "MemoryBanks"
},
{
"name": "SyntheticDataGeneration"
},
{
"name": "RewardScoring"
},
{
"name": "PostTraining"
},
{
"name": "Safety"
},
{
"name": "Evaluations"
},
{
"name": "Memory"
},
{
"name": "Telemetry"
},
{
"name": "Agents"
},
{
"name": "BatchInference"
},
{
"name": "Datasets"
},
{
"name": "BuiltinTool",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BuiltinTool\" />"
},
{
"name": "CompletionMessage",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CompletionMessage\" />"
},
{
"name": "SamplingParams",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SamplingParams\" />"
},
{
"name": "SamplingStrategy",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SamplingStrategy\" />"
},
{
"name": "StopReason",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/StopReason\" />"
},
{
"name": "SystemMessage",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SystemMessage\" />"
},
{
"name": "ToolCall",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolCall\" />"
},
{
"name": "ToolChoice",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolChoice\" />"
},
{
"name": "ToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolDefinition\" />"
},
{
"name": "ToolParamDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolParamDefinition\" />"
},
{
"name": "ToolPromptFormat",
"description": "This Enum refers to the prompt format for calling custom / zero shot tools\n\n`json` --\n Refers to the json format for calling tools.\n The json format takes the form like\n {\n \"type\": \"function\",\n \"function\" : {\n \"name\": \"function_name\",\n \"description\": \"function_description\",\n \"parameters\": {...}\n }\n }\n\n`function_tag` --\n This is an example of how you could define\n your own user defined format for making tool calls.\n The function_tag format looks like this,\n <function=function_name>(parameters)</function>\n\nThe detailed prompts for each of these formats are added to llama cli\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ToolPromptFormat\" />"
},
{
"name": "ToolResponseMessage",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolResponseMessage\" />"
},
{
"name": "UserMessage",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UserMessage\" />"
},
{
"name": "BatchChatCompletionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchChatCompletionRequest\" />"
},
{
"name": "BatchChatCompletionResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchChatCompletionResponse\" />"
},
{
"name": "BatchCompletionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchCompletionRequest\" />"
},
{
"name": "BatchCompletionResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BatchCompletionResponse\" />"
},
{
"name": "CancelEvaluationJobRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CancelEvaluationJobRequest\" />"
},
{
"name": "CancelTrainingJobRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CancelTrainingJobRequest\" />"
},
{
"name": "ChatCompletionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionRequest\" />"
},
{
"name": "ChatCompletionResponse",
"description": "Chat completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponse\" />"
},
{
"name": "ChatCompletionResponseEvent",
"description": "Chat completion response event.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponseEvent\" />"
},
{
"name": "ChatCompletionResponseEventType",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponseEventType\" />"
},
{
"name": "ChatCompletionResponseStreamChunk",
"description": "SSE-stream of these events.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/ChatCompletionResponseStreamChunk\" />"
},
{
"name": "TokenLogProbs",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/TokenLogProbs\" />"
},
{
"name": "ToolCallDelta",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolCallDelta\" />"
},
{
"name": "ToolCallParseStatus",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolCallParseStatus\" />"
},
{
"name": "CompletionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CompletionRequest\" />"
},
{
"name": "CompletionResponse",
"description": "Completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/CompletionResponse\" />"
},
{
"name": "CompletionResponseStreamChunk",
"description": "streamed completion response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/CompletionResponseStreamChunk\" />"
},
{
"name": "AgentConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentConfig\" />"
},
{
"name": "CodeInterpreterToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CodeInterpreterToolDefinition\" />"
},
{
"name": "FunctionCallToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/FunctionCallToolDefinition\" />"
},
{
"name": "MemoryToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryToolDefinition\" />"
},
{
"name": "PhotogenToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/PhotogenToolDefinition\" />"
},
{
"name": "RestAPIExecutionConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RestAPIExecutionConfig\" />"
},
{
"name": "RestAPIMethod",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RestAPIMethod\" />"
},
{
"name": "SearchToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SearchToolDefinition\" />"
},
{
"name": "URL",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/URL\" />"
},
{
"name": "WolframAlphaToolDefinition",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/WolframAlphaToolDefinition\" />"
},
{
"name": "CreateAgentRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateAgentRequest\" />"
},
{
"name": "AgentCreateResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentCreateResponse\" />"
},
{
"name": "CreateAgentSessionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateAgentSessionRequest\" />"
},
{
"name": "AgentSessionCreateResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentSessionCreateResponse\" />"
},
{
"name": "Attachment",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Attachment\" />"
},
{
"name": "CreateAgentTurnRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateAgentTurnRequest\" />"
},
{
"name": "AgentTurnResponseEvent",
"description": "Streamed agent execution response.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseEvent\" />"
},
{
"name": "AgentTurnResponseStepCompletePayload",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStepCompletePayload\" />"
},
{
"name": "AgentTurnResponseStepProgressPayload",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStepProgressPayload\" />"
},
{
"name": "AgentTurnResponseStepStartPayload",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStepStartPayload\" />"
},
{
"name": "AgentTurnResponseStreamChunk",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseStreamChunk\" />"
},
{
"name": "AgentTurnResponseTurnCompletePayload",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseTurnCompletePayload\" />"
},
{
"name": "AgentTurnResponseTurnStartPayload",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentTurnResponseTurnStartPayload\" />"
},
{
"name": "InferenceStep",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/InferenceStep\" />"
},
{
"name": "MemoryRetrievalStep",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryRetrievalStep\" />"
},
{
"name": "SafetyViolation",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SafetyViolation\" />"
},
{
"name": "ShieldCallStep",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ShieldCallStep\" />"
},
{
"name": "ToolExecutionStep",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolExecutionStep\" />"
},
{
"name": "ToolResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ToolResponse\" />"
},
{
"name": "Turn",
"description": "A single turn in an interaction with an Agentic System.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Turn\" />"
},
{
"name": "ViolationLevel",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ViolationLevel\" />"
},
{
"name": "TrainEvalDataset",
"description": "Dataset to be used for training or evaluating language models.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/TrainEvalDataset\" />"
},
{
"name": "TrainEvalDatasetColumnType",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/TrainEvalDatasetColumnType\" />"
},
{
"name": "CreateDatasetRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateDatasetRequest\" />"
},
{
"name": "CreateMemoryBankRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CreateMemoryBankRequest\" />"
},
{
"name": "MemoryBank",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryBank\" />"
},
{
"name": "DeleteAgentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteAgentsRequest\" />"
},
{
"name": "DeleteAgentsSessionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteAgentsSessionRequest\" />"
},
{
"name": "DeleteDatasetRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteDatasetRequest\" />"
},
{
"name": "DeleteDocumentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteDocumentsRequest\" />"
},
{
"name": "DropMemoryBankRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DropMemoryBankRequest\" />"
},
{
"name": "EmbeddingsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EmbeddingsRequest\" />"
},
{
"name": "EmbeddingsResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EmbeddingsResponse\" />"
},
{
"name": "EvaluateQuestionAnsweringRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateQuestionAnsweringRequest\" />"
},
{
"name": "EvaluationJob",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluationJob\" />"
},
{
"name": "EvaluateSummarizationRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateSummarizationRequest\" />"
},
{
"name": "EvaluateTextGenerationRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluateTextGenerationRequest\" />"
},
{
"name": "GetAgentsSessionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GetAgentsSessionRequest\" />"
},
{
"name": "Session",
"description": "A single session of an interaction with an Agentic System.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Session\" />"
},
{
"name": "AgentStepResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentStepResponse\" />"
},
{
"name": "GetDocumentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GetDocumentsRequest\" />"
},
{
"name": "MemoryBankDocument",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryBankDocument\" />"
},
{
"name": "EvaluationJobArtifactsResponse",
"description": "Artifacts of a evaluation job.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/EvaluationJobArtifactsResponse\" />"
},
{
"name": "EvaluationJobLogStream",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluationJobLogStream\" />"
},
{
"name": "EvaluationJobStatusResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/EvaluationJobStatusResponse\" />"
},
{
"name": "Model",
"description": "The model family and SKU of the model along with other parameters corresponding to the model.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Model\" />"
},
{
"name": "ModelServingSpec",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ModelServingSpec\" />"
},
{
"name": "MemoryBankType",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryBankType\" />"
},
{
"name": "MemoryBankSpec",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryBankSpec\" />"
},
{
"name": "ShieldSpec",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ShieldSpec\" />"
},
{
"name": "Trace",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/Trace\" />"
},
{
"name": "Checkpoint",
"description": "Checkpoint created during training runs\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Checkpoint\" />"
},
{
"name": "PostTrainingJobArtifactsResponse",
"description": "Artifacts of a finetuning job.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobArtifactsResponse\" />"
},
{
"name": "PostTrainingJobLogStream",
"description": "Stream of logs from a finetuning job.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobLogStream\" />"
},
{
"name": "PostTrainingJobStatus",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobStatus\" />"
},
{
"name": "PostTrainingJobStatusResponse",
"description": "Status of a finetuning job.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJobStatusResponse\" />"
},
{
"name": "PostTrainingJob",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/PostTrainingJob\" />"
},
{
"name": "InsertDocumentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/InsertDocumentsRequest\" />"
},
{
"name": "LogSeverity",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/LogSeverity\" />"
},
{
"name": "MetricEvent",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MetricEvent\" />"
},
{
"name": "SpanEndPayload",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanEndPayload\" />"
},
{
"name": "SpanStartPayload",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanStartPayload\" />"
},
{
"name": "SpanStatus",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SpanStatus\" />"
},
{
"name": "StructuredLogEvent",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/StructuredLogEvent\" />"
},
{
"name": "UnstructuredLogEvent",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UnstructuredLogEvent\" />"
},
{
"name": "LogEventRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/LogEventRequest\" />"
},
{
"name": "DPOAlignmentConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DPOAlignmentConfig\" />"
},
{
"name": "OptimizerConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/OptimizerConfig\" />"
},
{
"name": "RLHFAlgorithm",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RLHFAlgorithm\" />"
},
{
"name": "TrainingConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/TrainingConfig\" />"
},
{
"name": "PreferenceOptimizeRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/PreferenceOptimizeRequest\" />"
},
{
"name": "QueryDocumentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsRequest\" />"
},
{
"name": "QueryDocumentsResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QueryDocumentsResponse\" />"
},
{
"name": "DialogGenerations",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DialogGenerations\" />"
},
{
"name": "RewardScoreRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RewardScoreRequest\" />"
},
{
"name": "RewardScoringResponse",
"description": "Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/RewardScoringResponse\" />"
},
{
"name": "ScoredDialogGenerations",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoredDialogGenerations\" />"
},
{
"name": "ScoredMessage",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ScoredMessage\" />"
},
{
"name": "RunShieldRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RunShieldRequest\" />"
},
{
"name": "RunShieldResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RunShieldResponse\" />"
},
{
"name": "DoraFinetuningConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DoraFinetuningConfig\" />"
},
{
"name": "FinetuningAlgorithm",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/FinetuningAlgorithm\" />"
},
{
"name": "LoraFinetuningConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/LoraFinetuningConfig\" />"
},
{
"name": "QLoraFinetuningConfig",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/QLoraFinetuningConfig\" />"
},
{
"name": "SupervisedFineTuneRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SupervisedFineTuneRequest\" />"
},
{
"name": "SyntheticDataGenerateRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerateRequest\" />"
},
{
"name": "SyntheticDataGenerationResponse",
"description": "Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/SyntheticDataGenerationResponse\" />"
},
{
"name": "UpdateDocumentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/UpdateDocumentsRequest\" />"
}
],
"x-tagGroups": [
{
"name": "Operations",
"tags": [
"Agents",
"BatchInference",
"Datasets",
"Evaluations",
"Inference",
"Memory",
"MemoryBanks",
"Models",
"PostTraining",
"RewardScoring",
"Safety",
"Shields",
"SyntheticDataGeneration",
"Telemetry"
]
},
{
"name": "Types",
"tags": [
"AgentConfig",
"AgentCreateResponse",
"AgentSessionCreateResponse",
"AgentStepResponse",
"AgentTurnResponseEvent",
"AgentTurnResponseStepCompletePayload",
"AgentTurnResponseStepProgressPayload",
"AgentTurnResponseStepStartPayload",
"AgentTurnResponseStreamChunk",
"AgentTurnResponseTurnCompletePayload",
"AgentTurnResponseTurnStartPayload",
"Attachment",
"BatchChatCompletionRequest",
"BatchChatCompletionResponse",
"BatchCompletionRequest",
"BatchCompletionResponse",
"BuiltinTool",
"CancelEvaluationJobRequest",
"CancelTrainingJobRequest",
"ChatCompletionRequest",
"ChatCompletionResponse",
"ChatCompletionResponseEvent",
"ChatCompletionResponseEventType",
"ChatCompletionResponseStreamChunk",
"Checkpoint",
"CodeInterpreterToolDefinition",
"CompletionMessage",
"CompletionRequest",
"CompletionResponse",
"CompletionResponseStreamChunk",
"CreateAgentRequest",
"CreateAgentSessionRequest",
"CreateAgentTurnRequest",
"CreateDatasetRequest",
"CreateMemoryBankRequest",
"DPOAlignmentConfig",
"DeleteAgentsRequest",
"DeleteAgentsSessionRequest",
"DeleteDatasetRequest",
"DeleteDocumentsRequest",
"DialogGenerations",
"DoraFinetuningConfig",
"DropMemoryBankRequest",
"EmbeddingsRequest",
"EmbeddingsResponse",
"EvaluateQuestionAnsweringRequest",
"EvaluateSummarizationRequest",
"EvaluateTextGenerationRequest",
"EvaluationJob",
"EvaluationJobArtifactsResponse",
"EvaluationJobLogStream",
"EvaluationJobStatusResponse",
"FinetuningAlgorithm",
"FunctionCallToolDefinition",
"GetAgentsSessionRequest",
"GetDocumentsRequest",
"InferenceStep",
"InsertDocumentsRequest",
"LogEventRequest",
"LogSeverity",
"LoraFinetuningConfig",
"MemoryBank",
"MemoryBankDocument",
"MemoryBankSpec",
"MemoryBankType",
"MemoryRetrievalStep",
"MemoryToolDefinition",
"MetricEvent",
"Model",
"ModelServingSpec",
"OptimizerConfig",
"PhotogenToolDefinition",
"PostTrainingJob",
"PostTrainingJobArtifactsResponse",
"PostTrainingJobLogStream",
"PostTrainingJobStatus",
"PostTrainingJobStatusResponse",
"PreferenceOptimizeRequest",
"QLoraFinetuningConfig",
"QueryDocumentsRequest",
"QueryDocumentsResponse",
"RLHFAlgorithm",
"RestAPIExecutionConfig",
"RestAPIMethod",
"RewardScoreRequest",
"RewardScoringResponse",
"RunShieldRequest",
"RunShieldResponse",
"SafetyViolation",
"SamplingParams",
"SamplingStrategy",
"ScoredDialogGenerations",
"ScoredMessage",
"SearchToolDefinition",
"Session",
"ShieldCallStep",
"ShieldSpec",
"SpanEndPayload",
"SpanStartPayload",
"SpanStatus",
"StopReason",
"StructuredLogEvent",
"SupervisedFineTuneRequest",
"SyntheticDataGenerateRequest",
"SyntheticDataGenerationResponse",
"SystemMessage",
"TokenLogProbs",
"ToolCall",
"ToolCallDelta",
"ToolCallParseStatus",
"ToolChoice",
"ToolDefinition",
"ToolExecutionStep",
"ToolParamDefinition",
"ToolPromptFormat",
"ToolResponse",
"ToolResponseMessage",
"Trace",
"TrainEvalDataset",
"TrainEvalDatasetColumnType",
"TrainingConfig",
"Turn",
"URL",
"UnstructuredLogEvent",
"UpdateDocumentsRequest",
"UserMessage",
"ViolationLevel",
"WolframAlphaToolDefinition"
]
}
]
};
options = {
downloadFileName: "openapi.json",
expandResponses: "200",
expandSingleSchemaField: true,
jsonSampleExpandLevel: "all",
schemaExpansionLevel: "all",
};
element = document.getElementById("openapi-container");
Redoc.init(spec, options, element);
if (spec.info && spec.info.title) {
document.title = spec.info.title;
}
});
</script>
</head>
<body>
<div id="openapi-container"></div>
</body>
</html>