llama-stack-mirror/docs/resources/llama-stack-spec.html
Ashwin Bharambe 6bb57e72a7
Remove "routing_table" and "routing_key" concepts for the user (#201)
This PR makes several core changes to the developer experience surrounding Llama Stack.

Background: PR #92 introduced the notion of "routing" to the Llama Stack. It introduces three object types: (1) models, (2) shields and (3) memory banks. Each of these objects can be associated with a distinct provider. So you can get model A to be inferenced locally while model B, C can be inference remotely (e.g.)

However, this had a few drawbacks:

you could not address the provider instances -- i.e., if you configured "meta-reference" with a given model, you could not assign an identifier to this instance which you could re-use later.
the above meant that you could not register a "routing_key" (e.g. model) dynamically and say "please use this existing provider I have already configured" for a new model.
the terms "routing_table" and "routing_key" were exposed directly to the user. in my view, this is way too much overhead for a new user (which almost everyone is.) people come to the stack wanting to do ML and encounter a completely unexpected term.
What this PR does: This PR structures the run config with only a single prominent key:

- providers
Providers are instances of configured provider types. Here's an example which shows two instances of the remote::tgi provider which are serving two different models.

providers:
  inference:
  - provider_id: foo
    provider_type: remote::tgi
    config: { ... }
  - provider_id: bar
    provider_type: remote::tgi
    config: { ... }
Secondly, the PR adds dynamic registration of { models | shields | memory_banks } to the API surface. The distribution still acts like a "routing table" (as previously) except that it asks the backing providers for a listing of these objects. For example it asks a TGI or Ollama inference adapter what models it is serving. Only the models that are being actually served can be requested by the user for inference. Otherwise, the Stack server will throw an error.

When dynamically registering these objects, you can use the provider IDs shown above. Info about providers can be obtained using the Api.inspect set of endpoints (/providers, /routes, etc.)

The above examples shows the correspondence between inference providers and models registry items. Things work similarly for the safety <=> shields and memory <=> memory_banks pairs.

Registry: This PR also makes it so that Providers need to implement additional methods for registering and listing objects. For example, each Inference provider is now expected to implement the ModelsProtocolPrivate protocol (naming is not great!) which consists of two methods

register_model
list_models
The goal is to inform the provider that a certain model needs to be supported so the provider can make any relevant backend changes if needed (or throw an error if the model cannot be supported.)

There are many other cleanups included some of which are detailed in a follow-up comment.
2024-10-10 10:24:13 -07:00

6822 lines
248 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-10-09 21:10:09.073430"
},
"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
}
}
},
"/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
}
}
},
"/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"
}
}
]
}
},
"/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_banks/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"oneOf": [
{
"$ref": "#/components/schemas/VectorMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeyValueMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeywordMemoryBankDef"
},
{
"$ref": "#/components/schemas/GraphMemoryBankDef"
}
]
},
{
"type": "null"
}
]
}
}
}
}
},
"tags": [
"MemoryBanks"
],
"parameters": [
{
"name": "identifier",
"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/ModelDefWithProvider"
},
{
"type": "null"
}
]
}
}
}
}
},
"tags": [
"Models"
],
"parameters": [
{
"name": "identifier",
"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"
}
}
]
}
},
"/shields/get": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"oneOf": [
{
"$ref": "#/components/schemas/ShieldDefWithProvider"
},
{
"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"
}
}
]
}
},
"/health": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HealthInfo"
}
}
}
}
},
"tags": [
"Inspect"
],
"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": {
"oneOf": [
{
"$ref": "#/components/schemas/VectorMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeyValueMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeywordMemoryBankDef"
},
{
"$ref": "#/components/schemas/GraphMemoryBankDef"
}
]
}
}
}
}
},
"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"
}
}
]
}
},
"/models/list": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/jsonl": {
"schema": {
"$ref": "#/components/schemas/ModelDefWithProvider"
}
}
}
}
},
"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"
}
}
]
}
},
"/providers/list": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/ProviderInfo"
}
}
}
}
}
},
"tags": [
"Inspect"
],
"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"
}
}
]
}
},
"/routes/list": {
"get": {
"responses": {
"200": {
"description": "OK",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"type": "array",
"items": {
"$ref": "#/components/schemas/RouteInfo"
}
}
}
}
}
}
},
"tags": [
"Inspect"
],
"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/ShieldDefWithProvider"
}
}
}
}
},
"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
}
}
},
"/memory_banks/register": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"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"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterMemoryBankRequest"
}
}
},
"required": true
}
}
},
"/models/register": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"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"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterModelRequest"
}
}
},
"required": true
}
}
},
"/shields/register": {
"post": {
"responses": {
"200": {
"description": "OK"
}
},
"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"
}
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/RegisterShieldRequest"
}
}
},
"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
}
}
}
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
},
"stop_reason": {
"$ref": "#/components/schemas/StopReason"
},
"tool_calls": {
"type": "array",
"items": {
"$ref": "#/components/schemas/ToolCall"
}
}
},
"additionalProperties": false,
"required": [
"role",
"content",
"stop_reason",
"tool_calls"
]
},
"ImageMedia": {
"type": "object",
"properties": {
"image": {
"oneOf": [
{
"type": "object",
"properties": {
"format": {
"type": "string"
},
"format_description": {
"type": "string"
}
},
"additionalProperties": false,
"title": "This class represents an image object. To create"
},
{
"$ref": "#/components/schemas/URL"
}
]
}
},
"additionalProperties": false,
"required": [
"image"
]
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
}
},
"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
},
"default": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"additionalProperties": false,
"required": [
"param_type"
]
},
"ToolPromptFormat": {
"type": "string",
"enum": [
"json",
"function_tag",
"python_list"
],
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
}
},
"additionalProperties": false,
"required": [
"role",
"call_id",
"tool_name",
"content"
]
},
"URL": {
"type": "string",
"format": "uri",
"pattern": "^(https?://|file://|data:)"
},
"UserMessage": {
"type": "object",
"properties": {
"role": {
"type": "string",
"const": "user",
"default": "user"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
},
"context": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
}
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
}
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
},
"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"
]
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
},
{
"$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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
}
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
}
},
"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"
]
},
"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"
]
},
"EmbeddingsRequest": {
"type": "object",
"properties": {
"model": {
"type": "string"
},
"contents": {
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
}
}
},
"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
},
"GraphMemoryBankDef": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"provider_id": {
"type": "string",
"default": ""
},
"type": {
"type": "string",
"const": "graph",
"default": "graph"
}
},
"additionalProperties": false,
"required": [
"identifier",
"provider_id",
"type"
]
},
"KeyValueMemoryBankDef": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"provider_id": {
"type": "string",
"default": ""
},
"type": {
"type": "string",
"const": "keyvalue",
"default": "keyvalue"
}
},
"additionalProperties": false,
"required": [
"identifier",
"provider_id",
"type"
]
},
"KeywordMemoryBankDef": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"provider_id": {
"type": "string",
"default": ""
},
"type": {
"type": "string",
"const": "keyword",
"default": "keyword"
}
},
"additionalProperties": false,
"required": [
"identifier",
"provider_id",
"type"
]
},
"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": {
"oneOf": [
{
"$ref": "#/components/schemas/VectorMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeyValueMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeywordMemoryBankDef"
},
{
"$ref": "#/components/schemas/GraphMemoryBankDef"
}
]
}
},
"additionalProperties": false,
"required": [
"session_id",
"session_name",
"turns",
"started_at"
],
"title": "A single session of an interaction with an Agentic System."
},
"VectorMemoryBankDef": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"provider_id": {
"type": "string",
"default": ""
},
"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": [
"identifier",
"provider_id",
"type",
"embedding_model",
"chunk_size_in_tokens"
]
},
"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"
]
},
"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"
]
},
"ModelDefWithProvider": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"llama_model": {
"type": "string"
},
"metadata": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"provider_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"identifier",
"llama_model",
"metadata",
"provider_id"
]
},
"ShieldDefWithProvider": {
"type": "object",
"properties": {
"identifier": {
"type": "string"
},
"type": {
"type": "string"
},
"params": {
"type": "object",
"additionalProperties": {
"oneOf": [
{
"type": "null"
},
{
"type": "boolean"
},
{
"type": "number"
},
{
"type": "string"
},
{
"type": "array"
},
{
"type": "object"
}
]
}
},
"provider_id": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"identifier",
"type",
"params",
"provider_id"
]
},
"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"
]
},
"HealthInfo": {
"type": "object",
"properties": {
"status": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"status"
]
},
"MemoryBankDocument": {
"type": "object",
"properties": {
"document_id": {
"type": "string"
},
"content": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
},
{
"$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"
]
},
"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"
]
},
"ProviderInfo": {
"type": "object",
"properties": {
"provider_id": {
"type": "string"
},
"provider_type": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
"provider_id",
"provider_type"
]
},
"RouteInfo": {
"type": "object",
"properties": {
"route": {
"type": "string"
},
"method": {
"type": "string"
},
"provider_types": {
"type": "array",
"items": {
"type": "string"
}
}
},
"additionalProperties": false,
"required": [
"route",
"method",
"provider_types"
]
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
},
"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"
},
{
"$ref": "#/components/schemas/ImageMedia"
},
{
"type": "array",
"items": {
"oneOf": [
{
"type": "string"
},
{
"$ref": "#/components/schemas/ImageMedia"
}
]
}
}
]
},
"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"
]
},
"RegisterMemoryBankRequest": {
"type": "object",
"properties": {
"memory_bank": {
"oneOf": [
{
"$ref": "#/components/schemas/VectorMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeyValueMemoryBankDef"
},
{
"$ref": "#/components/schemas/KeywordMemoryBankDef"
},
{
"$ref": "#/components/schemas/GraphMemoryBankDef"
}
]
}
},
"additionalProperties": false,
"required": [
"memory_bank"
]
},
"RegisterModelRequest": {
"type": "object",
"properties": {
"model": {
"$ref": "#/components/schemas/ModelDefWithProvider"
}
},
"additionalProperties": false,
"required": [
"model"
]
},
"RegisterShieldRequest": {
"type": "object",
"properties": {
"shield": {
"$ref": "#/components/schemas/ShieldDefWithProvider"
}
},
"additionalProperties": false,
"required": [
"shield"
]
},
"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."
}
},
"responses": {}
},
"security": [
{
"Default": []
}
],
"tags": [
{
"name": "RewardScoring"
},
{
"name": "Memory"
},
{
"name": "SyntheticDataGeneration"
},
{
"name": "Models"
},
{
"name": "Safety"
},
{
"name": "BatchInference"
},
{
"name": "Agents"
},
{
"name": "MemoryBanks"
},
{
"name": "Shields"
},
{
"name": "Datasets"
},
{
"name": "Evaluations"
},
{
"name": "Inspect"
},
{
"name": "PostTraining"
},
{
"name": "Telemetry"
},
{
"name": "Inference"
},
{
"name": "BuiltinTool",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/BuiltinTool\" />"
},
{
"name": "CompletionMessage",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/CompletionMessage\" />"
},
{
"name": "ImageMedia",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ImageMedia\" />"
},
{
"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": "URL",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/URL\" />"
},
{
"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": "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": "DeleteAgentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteAgentsRequest\" />"
},
{
"name": "DeleteAgentsSessionRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteAgentsSessionRequest\" />"
},
{
"name": "DeleteDatasetRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/DeleteDatasetRequest\" />"
},
{
"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": "GraphMemoryBankDef",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/GraphMemoryBankDef\" />"
},
{
"name": "KeyValueMemoryBankDef",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/KeyValueMemoryBankDef\" />"
},
{
"name": "KeywordMemoryBankDef",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/KeywordMemoryBankDef\" />"
},
{
"name": "Session",
"description": "A single session of an interaction with an Agentic System.\n\n<SchemaDefinition schemaRef=\"#/components/schemas/Session\" />"
},
{
"name": "VectorMemoryBankDef",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/VectorMemoryBankDef\" />"
},
{
"name": "AgentStepResponse",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/AgentStepResponse\" />"
},
{
"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": "ModelDefWithProvider",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ModelDefWithProvider\" />"
},
{
"name": "ShieldDefWithProvider",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ShieldDefWithProvider\" />"
},
{
"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": "HealthInfo",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/HealthInfo\" />"
},
{
"name": "MemoryBankDocument",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/MemoryBankDocument\" />"
},
{
"name": "InsertDocumentsRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/InsertDocumentsRequest\" />"
},
{
"name": "ProviderInfo",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/ProviderInfo\" />"
},
{
"name": "RouteInfo",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RouteInfo\" />"
},
{
"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": "RegisterMemoryBankRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterMemoryBankRequest\" />"
},
{
"name": "RegisterModelRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterModelRequest\" />"
},
{
"name": "RegisterShieldRequest",
"description": "<SchemaDefinition schemaRef=\"#/components/schemas/RegisterShieldRequest\" />"
},
{
"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\" />"
}
],
"x-tagGroups": [
{
"name": "Operations",
"tags": [
"Agents",
"BatchInference",
"Datasets",
"Evaluations",
"Inference",
"Inspect",
"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",
"DPOAlignmentConfig",
"DeleteAgentsRequest",
"DeleteAgentsSessionRequest",
"DeleteDatasetRequest",
"DialogGenerations",
"DoraFinetuningConfig",
"EmbeddingsRequest",
"EmbeddingsResponse",
"EvaluateQuestionAnsweringRequest",
"EvaluateSummarizationRequest",
"EvaluateTextGenerationRequest",
"EvaluationJob",
"EvaluationJobArtifactsResponse",
"EvaluationJobLogStream",
"EvaluationJobStatusResponse",
"FinetuningAlgorithm",
"FunctionCallToolDefinition",
"GetAgentsSessionRequest",
"GraphMemoryBankDef",
"HealthInfo",
"ImageMedia",
"InferenceStep",
"InsertDocumentsRequest",
"KeyValueMemoryBankDef",
"KeywordMemoryBankDef",
"LogEventRequest",
"LogSeverity",
"LoraFinetuningConfig",
"MemoryBankDocument",
"MemoryRetrievalStep",
"MemoryToolDefinition",
"MetricEvent",
"ModelDefWithProvider",
"OptimizerConfig",
"PhotogenToolDefinition",
"PostTrainingJob",
"PostTrainingJobArtifactsResponse",
"PostTrainingJobLogStream",
"PostTrainingJobStatus",
"PostTrainingJobStatusResponse",
"PreferenceOptimizeRequest",
"ProviderInfo",
"QLoraFinetuningConfig",
"QueryDocumentsRequest",
"QueryDocumentsResponse",
"RLHFAlgorithm",
"RegisterMemoryBankRequest",
"RegisterModelRequest",
"RegisterShieldRequest",
"RestAPIExecutionConfig",
"RestAPIMethod",
"RewardScoreRequest",
"RewardScoringResponse",
"RouteInfo",
"RunShieldRequest",
"RunShieldResponse",
"SafetyViolation",
"SamplingParams",
"SamplingStrategy",
"ScoredDialogGenerations",
"ScoredMessage",
"SearchToolDefinition",
"Session",
"ShieldCallStep",
"ShieldDefWithProvider",
"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",
"UserMessage",
"VectorMemoryBankDef",
"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>