diff --git a/docs/resources/llama-stack-spec.html b/docs/resources/llama-stack-spec.html
index 0d06ce03d..21d356f62 100644
--- a/docs/resources/llama-stack-spec.html
+++ b/docs/resources/llama-stack-spec.html
@@ -21,7 +21,7 @@
"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-02 15:40:53.008257"
+ "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-08 15:18:57.600111"
},
"servers": [
{
@@ -422,46 +422,6 @@
}
}
},
- "/memory/create": {
- "post": {
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/MemoryBank"
- }
- }
- }
- }
- },
- "tags": [
- "Memory"
- ],
- "parameters": [
- {
- "name": "X-LlamaStack-ProviderData",
- "in": "header",
- "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/CreateMemoryBankRequest"
- }
- }
- },
- "required": true
- }
- }
- },
"/agents/delete": {
"post": {
"responses": {
@@ -594,46 +554,6 @@
}
}
},
- "/memory/drop": {
- "post": {
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "type": "string"
- }
- }
- }
- }
- },
- "tags": [
- "Memory"
- ],
- "parameters": [
- {
- "name": "X-LlamaStack-ProviderData",
- "in": "header",
- "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ],
- "requestBody": {
- "content": {
- "application/json": {
- "schema": {
- "$ref": "#/components/schemas/DropMemoryBankRequest"
- }
- }
- },
- "required": true
- }
- }
- },
"/inference/embeddings": {
"post": {
"responses": {
@@ -1180,7 +1100,7 @@
]
}
},
- "/memory/get": {
+ "/memory_banks/get": {
"get": {
"responses": {
"200": {
@@ -1190,7 +1110,20 @@
"schema": {
"oneOf": [
{
- "$ref": "#/components/schemas/MemoryBank"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/VectorMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/KeyValueMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/KeywordMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/GraphMemoryBankDef"
+ }
+ ]
},
{
"type": "null"
@@ -1202,11 +1135,11 @@
}
},
"tags": [
- "Memory"
+ "MemoryBanks"
],
"parameters": [
{
- "name": "bank_id",
+ "name": "identifier",
"in": "query",
"required": true,
"schema": {
@@ -1235,7 +1168,7 @@
"schema": {
"oneOf": [
{
- "$ref": "#/components/schemas/ModelServingSpec"
+ "$ref": "#/components/schemas/ModelDef"
},
{
"type": "null"
@@ -1251,7 +1184,7 @@
],
"parameters": [
{
- "name": "core_model_id",
+ "name": "identifier",
"in": "query",
"required": true,
"schema": {
@@ -1270,51 +1203,6 @@
]
}
},
- "/memory_banks/get": {
- "get": {
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/json": {
- "schema": {
- "oneOf": [
- {
- "$ref": "#/components/schemas/MemoryBankSpec"
- },
- {
- "type": "null"
- }
- ]
- }
- }
- }
- }
- },
- "tags": [
- "MemoryBanks"
- ],
- "parameters": [
- {
- "name": "bank_type",
- "in": "query",
- "required": true,
- "schema": {
- "$ref": "#/components/schemas/MemoryBankType"
- }
- },
- {
- "name": "X-LlamaStack-ProviderData",
- "in": "header",
- "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ]
- }
- },
"/shields/get": {
"get": {
"responses": {
@@ -1325,7 +1213,49 @@
"schema": {
"oneOf": [
{
- "$ref": "#/components/schemas/ShieldSpec"
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
+ },
+ "params": {
+ "type": "object",
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "identifier",
+ "type",
+ "params"
+ ]
},
{
"type": "null"
@@ -1613,7 +1543,20 @@
"content": {
"application/jsonl": {
"schema": {
- "$ref": "#/components/schemas/MemoryBankSpec"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/VectorMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/KeyValueMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/KeywordMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/GraphMemoryBankDef"
+ }
+ ]
}
}
}
@@ -1635,36 +1578,6 @@
]
}
},
- "/memory/list": {
- "get": {
- "responses": {
- "200": {
- "description": "OK",
- "content": {
- "application/jsonl": {
- "schema": {
- "$ref": "#/components/schemas/MemoryBank"
- }
- }
- }
- }
- },
- "tags": [
- "Memory"
- ],
- "parameters": [
- {
- "name": "X-LlamaStack-ProviderData",
- "in": "header",
- "description": "JSON-encoded provider data which will be made available to the adapter servicing the API",
- "required": false,
- "schema": {
- "type": "string"
- }
- }
- ]
- }
- },
"/models/list": {
"get": {
"responses": {
@@ -1673,7 +1586,7 @@
"content": {
"application/jsonl": {
"schema": {
- "$ref": "#/components/schemas/ModelServingSpec"
+ "$ref": "#/components/schemas/ModelDef"
}
}
}
@@ -1772,7 +1685,7 @@
"content": {
"application/jsonl": {
"schema": {
- "$ref": "#/components/schemas/ShieldSpec"
+ "$ref": "#/components/schemas/ShieldDef"
}
}
}
@@ -1907,6 +1820,105 @@
}
}
},
+ "/memory_banks/register": {
+ "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/RegisterMemoryBankRequest"
+ }
+ }
+ },
+ "required": true
+ }
+ }
+ },
+ "/inference/register_model": {
+ "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
+ }
+ }
+ },
+ "/safety/register_shield": {
+ "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": {
@@ -4305,184 +4317,6 @@
"dataset"
]
},
- "CreateMemoryBankRequest": {
- "type": "object",
- "properties": {
- "name": {
- "type": "string"
- },
- "config": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "vector",
- "default": "vector"
- },
- "embedding_model": {
- "type": "string"
- },
- "chunk_size_in_tokens": {
- "type": "integer"
- },
- "overlap_size_in_tokens": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "type",
- "embedding_model",
- "chunk_size_in_tokens"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "keyvalue",
- "default": "keyvalue"
- }
- },
- "additionalProperties": false,
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "keyword",
- "default": "keyword"
- }
- },
- "additionalProperties": false,
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "graph",
- "default": "graph"
- }
- },
- "additionalProperties": false,
- "required": [
- "type"
- ]
- }
- ]
- },
- "url": {
- "$ref": "#/components/schemas/URL"
- }
- },
- "additionalProperties": false,
- "required": [
- "name",
- "config"
- ]
- },
- "MemoryBank": {
- "type": "object",
- "properties": {
- "bank_id": {
- "type": "string"
- },
- "name": {
- "type": "string"
- },
- "config": {
- "oneOf": [
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "vector",
- "default": "vector"
- },
- "embedding_model": {
- "type": "string"
- },
- "chunk_size_in_tokens": {
- "type": "integer"
- },
- "overlap_size_in_tokens": {
- "type": "integer"
- }
- },
- "additionalProperties": false,
- "required": [
- "type",
- "embedding_model",
- "chunk_size_in_tokens"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "keyvalue",
- "default": "keyvalue"
- }
- },
- "additionalProperties": false,
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "keyword",
- "default": "keyword"
- }
- },
- "additionalProperties": false,
- "required": [
- "type"
- ]
- },
- {
- "type": "object",
- "properties": {
- "type": {
- "type": "string",
- "const": "graph",
- "default": "graph"
- }
- },
- "additionalProperties": false,
- "required": [
- "type"
- ]
- }
- ]
- },
- "url": {
- "$ref": "#/components/schemas/URL"
- }
- },
- "additionalProperties": false,
- "required": [
- "bank_id",
- "name",
- "config"
- ]
- },
"DeleteAgentsRequest": {
"type": "object",
"properties": {
@@ -4542,18 +4376,6 @@
"document_ids"
]
},
- "DropMemoryBankRequest": {
- "type": "object",
- "properties": {
- "bank_id": {
- "type": "string"
- }
- },
- "additionalProperties": false,
- "required": [
- "bank_id"
- ]
- },
"EmbeddingsRequest": {
"type": "object",
"properties": {
@@ -4693,6 +4515,69 @@
},
"additionalProperties": false
},
+ "GraphMemoryBankDef": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "const": "graph",
+ "default": "graph"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "identifier",
+ "type"
+ ]
+ },
+ "KeyValueMemoryBankDef": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "const": "keyvalue",
+ "default": "keyvalue"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "identifier",
+ "type"
+ ]
+ },
+ "KeywordMemoryBankDef": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string",
+ "const": "keyword",
+ "default": "keyword"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "identifier",
+ "type"
+ ]
+ },
"Session": {
"type": "object",
"properties": {
@@ -4713,7 +4598,20 @@
"format": "date-time"
},
"memory_bank": {
- "$ref": "#/components/schemas/MemoryBank"
+ "oneOf": [
+ {
+ "$ref": "#/components/schemas/VectorMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/KeyValueMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/KeywordMemoryBankDef"
+ },
+ {
+ "$ref": "#/components/schemas/GraphMemoryBankDef"
+ }
+ ]
}
},
"additionalProperties": false,
@@ -4725,6 +4623,38 @@
],
"title": "A single session of an interaction with an Agentic System."
},
+ "VectorMemoryBankDef": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
+ },
+ "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",
+ "type",
+ "embedding_model",
+ "chunk_size_in_tokens"
+ ]
+ },
"AgentStepResponse": {
"type": "object",
"properties": {
@@ -4870,169 +4800,23 @@
"job_uuid"
]
},
- "Model": {
- "description": "The model family and SKU of the model along with other parameters corresponding to the model."
- },
- "ModelServingSpec": {
+ "ModelDef": {
"type": "object",
"properties": {
- "llama_model": {
- "$ref": "#/components/schemas/Model"
- },
- "provider_config": {
- "type": "object",
- "properties": {
- "provider_type": {
- "type": "string"
- },
- "config": {
- "type": "object",
- "additionalProperties": {
- "oneOf": [
- {
- "type": "null"
- },
- {
- "type": "boolean"
- },
- {
- "type": "number"
- },
- {
- "type": "string"
- },
- {
- "type": "array"
- },
- {
- "type": "object"
- }
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "provider_type",
- "config"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "llama_model",
- "provider_config"
- ]
- },
- "MemoryBankType": {
- "type": "string",
- "enum": [
- "vector",
- "keyvalue",
- "keyword",
- "graph"
- ]
- },
- "MemoryBankSpec": {
- "type": "object",
- "properties": {
- "bank_type": {
- "$ref": "#/components/schemas/MemoryBankType"
- },
- "provider_config": {
- "type": "object",
- "properties": {
- "provider_type": {
- "type": "string"
- },
- "config": {
- "type": "object",
- "additionalProperties": {
- "oneOf": [
- {
- "type": "null"
- },
- {
- "type": "boolean"
- },
- {
- "type": "number"
- },
- {
- "type": "string"
- },
- {
- "type": "array"
- },
- {
- "type": "object"
- }
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "provider_type",
- "config"
- ]
- }
- },
- "additionalProperties": false,
- "required": [
- "bank_type",
- "provider_config"
- ]
- },
- "ShieldSpec": {
- "type": "object",
- "properties": {
- "shield_type": {
+ "identifier": {
"type": "string"
},
- "provider_config": {
- "type": "object",
- "properties": {
- "provider_type": {
- "type": "string"
- },
- "config": {
- "type": "object",
- "additionalProperties": {
- "oneOf": [
- {
- "type": "null"
- },
- {
- "type": "boolean"
- },
- {
- "type": "number"
- },
- {
- "type": "string"
- },
- {
- "type": "array"
- },
- {
- "type": "object"
- }
- ]
- }
- }
- },
- "additionalProperties": false,
- "required": [
- "provider_type",
- "config"
- ]
+ "llama_model": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
}
},
"additionalProperties": false,
"required": [
- "shield_type",
- "provider_config"
+ "identifier",
+ "llama_model"
]
},
"Trace": {
@@ -5222,17 +5006,17 @@
"ProviderInfo": {
"type": "object",
"properties": {
- "provider_type": {
+ "provider_id": {
"type": "string"
},
- "description": {
+ "provider_type": {
"type": "string"
}
},
"additionalProperties": false,
"required": [
- "provider_type",
- "description"
+ "provider_id",
+ "provider_type"
]
},
"RouteInfo": {
@@ -5244,7 +5028,7 @@
"method": {
"type": "string"
},
- "providers": {
+ "provider_types": {
"type": "array",
"items": {
"type": "string"
@@ -5255,7 +5039,52 @@
"required": [
"route",
"method",
- "providers"
+ "provider_types"
+ ]
+ },
+ "ShieldDef": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
+ },
+ "params": {
+ "type": "object",
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "identifier",
+ "type",
+ "params"
]
},
"LogSeverity": {
@@ -5838,6 +5667,97 @@
"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/ModelDef"
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "model"
+ ]
+ },
+ "RegisterShieldRequest": {
+ "type": "object",
+ "properties": {
+ "shield": {
+ "type": "object",
+ "properties": {
+ "identifier": {
+ "type": "string"
+ },
+ "type": {
+ "type": "string"
+ },
+ "provider_id": {
+ "type": "string"
+ },
+ "params": {
+ "type": "object",
+ "additionalProperties": {
+ "oneOf": [
+ {
+ "type": "null"
+ },
+ {
+ "type": "boolean"
+ },
+ {
+ "type": "number"
+ },
+ {
+ "type": "string"
+ },
+ {
+ "type": "array"
+ },
+ {
+ "type": "object"
+ }
+ ]
+ }
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "identifier",
+ "type",
+ "params"
+ ]
+ }
+ },
+ "additionalProperties": false,
+ "required": [
+ "shield"
+ ]
+ },
"DialogGenerations": {
"type": "object",
"properties": {
@@ -6369,50 +6289,50 @@
}
],
"tags": [
- {
- "name": "Datasets"
- },
- {
- "name": "Inspect"
- },
- {
- "name": "Memory"
- },
{
"name": "BatchInference"
},
{
- "name": "Agents"
+ "name": "Datasets"
},
{
"name": "Inference"
},
{
- "name": "Shields"
+ "name": "Evaluations"
},
{
- "name": "SyntheticDataGeneration"
- },
- {
- "name": "Models"
- },
- {
- "name": "RewardScoring"
- },
- {
- "name": "MemoryBanks"
+ "name": "Memory"
},
{
"name": "Safety"
},
{
- "name": "Evaluations"
+ "name": "PostTraining"
+ },
+ {
+ "name": "MemoryBanks"
+ },
+ {
+ "name": "Models"
+ },
+ {
+ "name": "Shields"
+ },
+ {
+ "name": "Inspect"
+ },
+ {
+ "name": "SyntheticDataGeneration"
},
{
"name": "Telemetry"
},
{
- "name": "PostTraining"
+ "name": "Agents"
+ },
+ {
+ "name": "RewardScoring"
},
{
"name": "BuiltinTool",
@@ -6674,14 +6594,6 @@
"name": "CreateDatasetRequest",
"description": ""
},
- {
- "name": "CreateMemoryBankRequest",
- "description": ""
- },
- {
- "name": "MemoryBank",
- "description": ""
- },
{
"name": "DeleteAgentsRequest",
"description": ""
@@ -6698,10 +6610,6 @@
"name": "DeleteDocumentsRequest",
"description": ""
},
- {
- "name": "DropMemoryBankRequest",
- "description": ""
- },
{
"name": "EmbeddingsRequest",
"description": ""
@@ -6730,10 +6638,26 @@
"name": "GetAgentsSessionRequest",
"description": ""
},
+ {
+ "name": "GraphMemoryBankDef",
+ "description": ""
+ },
+ {
+ "name": "KeyValueMemoryBankDef",
+ "description": ""
+ },
+ {
+ "name": "KeywordMemoryBankDef",
+ "description": ""
+ },
{
"name": "Session",
"description": "A single session of an interaction with an Agentic System.\n\n"
},
+ {
+ "name": "VectorMemoryBankDef",
+ "description": ""
+ },
{
"name": "AgentStepResponse",
"description": ""
@@ -6759,24 +6683,8 @@
"description": ""
},
{
- "name": "Model",
- "description": "The model family and SKU of the model along with other parameters corresponding to the model.\n\n"
- },
- {
- "name": "ModelServingSpec",
- "description": ""
- },
- {
- "name": "MemoryBankType",
- "description": ""
- },
- {
- "name": "MemoryBankSpec",
- "description": ""
- },
- {
- "name": "ShieldSpec",
- "description": ""
+ "name": "ModelDef",
+ "description": ""
},
{
"name": "Trace",
@@ -6822,6 +6730,10 @@
"name": "RouteInfo",
"description": ""
},
+ {
+ "name": "ShieldDef",
+ "description": ""
+ },
{
"name": "LogSeverity",
"description": ""
@@ -6882,6 +6794,18 @@
"name": "QueryDocumentsResponse",
"description": ""
},
+ {
+ "name": "RegisterMemoryBankRequest",
+ "description": ""
+ },
+ {
+ "name": "RegisterModelRequest",
+ "description": ""
+ },
+ {
+ "name": "RegisterShieldRequest",
+ "description": ""
+ },
{
"name": "DialogGenerations",
"description": ""
@@ -7001,7 +6925,6 @@
"CreateAgentSessionRequest",
"CreateAgentTurnRequest",
"CreateDatasetRequest",
- "CreateMemoryBankRequest",
"DPOAlignmentConfig",
"DeleteAgentsRequest",
"DeleteAgentsSessionRequest",
@@ -7009,7 +6932,6 @@
"DeleteDocumentsRequest",
"DialogGenerations",
"DoraFinetuningConfig",
- "DropMemoryBankRequest",
"EmbeddingsRequest",
"EmbeddingsResponse",
"EvaluateQuestionAnsweringRequest",
@@ -7023,22 +6945,21 @@
"FunctionCallToolDefinition",
"GetAgentsSessionRequest",
"GetDocumentsRequest",
+ "GraphMemoryBankDef",
"HealthInfo",
"ImageMedia",
"InferenceStep",
"InsertDocumentsRequest",
+ "KeyValueMemoryBankDef",
+ "KeywordMemoryBankDef",
"LogEventRequest",
"LogSeverity",
"LoraFinetuningConfig",
- "MemoryBank",
"MemoryBankDocument",
- "MemoryBankSpec",
- "MemoryBankType",
"MemoryRetrievalStep",
"MemoryToolDefinition",
"MetricEvent",
- "Model",
- "ModelServingSpec",
+ "ModelDef",
"OptimizerConfig",
"PhotogenToolDefinition",
"PostTrainingJob",
@@ -7052,6 +6973,9 @@
"QueryDocumentsRequest",
"QueryDocumentsResponse",
"RLHFAlgorithm",
+ "RegisterMemoryBankRequest",
+ "RegisterModelRequest",
+ "RegisterShieldRequest",
"RestAPIExecutionConfig",
"RestAPIMethod",
"RewardScoreRequest",
@@ -7067,7 +6991,7 @@
"SearchToolDefinition",
"Session",
"ShieldCallStep",
- "ShieldSpec",
+ "ShieldDef",
"SpanEndPayload",
"SpanStartPayload",
"SpanStatus",
@@ -7097,6 +7021,7 @@
"UnstructuredLogEvent",
"UpdateDocumentsRequest",
"UserMessage",
+ "VectorMemoryBankDef",
"ViolationLevel",
"WolframAlphaToolDefinition"
]
diff --git a/docs/resources/llama-stack-spec.yaml b/docs/resources/llama-stack-spec.yaml
index 317d1ee33..3f1bcc7c7 100644
--- a/docs/resources/llama-stack-spec.yaml
+++ b/docs/resources/llama-stack-spec.yaml
@@ -580,63 +580,6 @@ components:
- uuid
- dataset
type: object
- CreateMemoryBankRequest:
- additionalProperties: false
- properties:
- config:
- oneOf:
- - additionalProperties: false
- properties:
- chunk_size_in_tokens:
- type: integer
- embedding_model:
- type: string
- overlap_size_in_tokens:
- type: integer
- type:
- const: vector
- default: vector
- type: string
- required:
- - type
- - embedding_model
- - chunk_size_in_tokens
- type: object
- - additionalProperties: false
- properties:
- type:
- const: keyvalue
- default: keyvalue
- type: string
- required:
- - type
- type: object
- - additionalProperties: false
- properties:
- type:
- const: keyword
- default: keyword
- type: string
- required:
- - type
- type: object
- - additionalProperties: false
- properties:
- type:
- const: graph
- default: graph
- type: string
- required:
- - type
- type: object
- name:
- type: string
- url:
- $ref: '#/components/schemas/URL'
- required:
- - name
- - config
- type: object
DPOAlignmentConfig:
additionalProperties: false
properties:
@@ -739,14 +682,6 @@ components:
- rank
- alpha
type: object
- DropMemoryBankRequest:
- additionalProperties: false
- properties:
- bank_id:
- type: string
- required:
- - bank_id
- type: object
EmbeddingsRequest:
additionalProperties: false
properties:
@@ -908,6 +843,21 @@ components:
required:
- document_ids
type: object
+ GraphMemoryBankDef:
+ additionalProperties: false
+ properties:
+ identifier:
+ type: string
+ provider_id:
+ type: string
+ type:
+ const: graph
+ default: graph
+ type: string
+ required:
+ - identifier
+ - type
+ type: object
HealthInfo:
additionalProperties: false
properties:
@@ -973,6 +923,36 @@ components:
- bank_id
- documents
type: object
+ KeyValueMemoryBankDef:
+ additionalProperties: false
+ properties:
+ identifier:
+ type: string
+ provider_id:
+ type: string
+ type:
+ const: keyvalue
+ default: keyvalue
+ type: string
+ required:
+ - identifier
+ - type
+ type: object
+ KeywordMemoryBankDef:
+ additionalProperties: false
+ properties:
+ identifier:
+ type: string
+ provider_id:
+ type: string
+ type:
+ const: keyword
+ default: keyword
+ type: string
+ required:
+ - identifier
+ - type
+ type: object
LogEventRequest:
additionalProperties: false
properties:
@@ -1015,66 +995,6 @@ components:
- rank
- alpha
type: object
- MemoryBank:
- additionalProperties: false
- properties:
- bank_id:
- type: string
- config:
- oneOf:
- - additionalProperties: false
- properties:
- chunk_size_in_tokens:
- type: integer
- embedding_model:
- type: string
- overlap_size_in_tokens:
- type: integer
- type:
- const: vector
- default: vector
- type: string
- required:
- - type
- - embedding_model
- - chunk_size_in_tokens
- type: object
- - additionalProperties: false
- properties:
- type:
- const: keyvalue
- default: keyvalue
- type: string
- required:
- - type
- type: object
- - additionalProperties: false
- properties:
- type:
- const: keyword
- default: keyword
- type: string
- required:
- - type
- type: object
- - additionalProperties: false
- properties:
- type:
- const: graph
- default: graph
- type: string
- required:
- - type
- type: object
- name:
- type: string
- url:
- $ref: '#/components/schemas/URL'
- required:
- - bank_id
- - name
- - config
- type: object
MemoryBankDocument:
additionalProperties: false
properties:
@@ -1107,41 +1027,6 @@ components:
- content
- metadata
type: object
- MemoryBankSpec:
- additionalProperties: false
- properties:
- bank_type:
- $ref: '#/components/schemas/MemoryBankType'
- provider_config:
- additionalProperties: false
- properties:
- config:
- additionalProperties:
- oneOf:
- - type: 'null'
- - type: boolean
- - type: number
- - type: string
- - type: array
- - type: object
- type: object
- provider_type:
- type: string
- required:
- - provider_type
- - config
- type: object
- required:
- - bank_type
- - provider_config
- type: object
- MemoryBankType:
- enum:
- - vector
- - keyvalue
- - keyword
- - graph
- type: string
MemoryRetrievalStep:
additionalProperties: false
properties:
@@ -1349,36 +1234,18 @@ components:
- value
- unit
type: object
- Model:
- description: The model family and SKU of the model along with other parameters
- corresponding to the model.
- ModelServingSpec:
+ ModelDef:
additionalProperties: false
properties:
+ identifier:
+ type: string
llama_model:
- $ref: '#/components/schemas/Model'
- provider_config:
- additionalProperties: false
- properties:
- config:
- additionalProperties:
- oneOf:
- - type: 'null'
- - type: boolean
- - type: number
- - type: string
- - type: array
- - type: object
- type: object
- provider_type:
- type: string
- required:
- - provider_type
- - config
- type: object
+ type: string
+ provider_id:
+ type: string
required:
+ - identifier
- llama_model
- - provider_config
type: object
OptimizerConfig:
additionalProperties: false
@@ -1554,13 +1421,13 @@ components:
ProviderInfo:
additionalProperties: false
properties:
- description:
+ provider_id:
type: string
provider_type:
type: string
required:
+ - provider_id
- provider_type
- - description
type: object
QLoraFinetuningConfig:
additionalProperties: false
@@ -1650,6 +1517,56 @@ components:
enum:
- dpo
type: string
+ RegisterMemoryBankRequest:
+ additionalProperties: false
+ properties:
+ memory_bank:
+ oneOf:
+ - $ref: '#/components/schemas/VectorMemoryBankDef'
+ - $ref: '#/components/schemas/KeyValueMemoryBankDef'
+ - $ref: '#/components/schemas/KeywordMemoryBankDef'
+ - $ref: '#/components/schemas/GraphMemoryBankDef'
+ required:
+ - memory_bank
+ type: object
+ RegisterModelRequest:
+ additionalProperties: false
+ properties:
+ model:
+ $ref: '#/components/schemas/ModelDef'
+ required:
+ - model
+ type: object
+ RegisterShieldRequest:
+ additionalProperties: false
+ properties:
+ shield:
+ additionalProperties: false
+ properties:
+ identifier:
+ type: string
+ params:
+ additionalProperties:
+ oneOf:
+ - type: 'null'
+ - type: boolean
+ - type: number
+ - type: string
+ - type: array
+ - type: object
+ type: object
+ provider_id:
+ type: string
+ type:
+ type: string
+ required:
+ - identifier
+ - type
+ - params
+ type: object
+ required:
+ - shield
+ type: object
RestAPIExecutionConfig:
additionalProperties: false
properties:
@@ -1728,7 +1645,7 @@ components:
properties:
method:
type: string
- providers:
+ provider_types:
items:
type: string
type: array
@@ -1737,7 +1654,7 @@ components:
required:
- route
- method
- - providers
+ - provider_types
type: object
RunShieldRequest:
additionalProperties: false
@@ -1892,7 +1809,11 @@ components:
additionalProperties: false
properties:
memory_bank:
- $ref: '#/components/schemas/MemoryBank'
+ oneOf:
+ - $ref: '#/components/schemas/VectorMemoryBankDef'
+ - $ref: '#/components/schemas/KeyValueMemoryBankDef'
+ - $ref: '#/components/schemas/KeywordMemoryBankDef'
+ - $ref: '#/components/schemas/GraphMemoryBankDef'
session_id:
type: string
session_name:
@@ -1935,33 +1856,29 @@ components:
- step_id
- step_type
type: object
- ShieldSpec:
+ ShieldDef:
additionalProperties: false
properties:
- provider_config:
- additionalProperties: false
- properties:
- config:
- additionalProperties:
- oneOf:
- - type: 'null'
- - type: boolean
- - type: number
- - type: string
- - type: array
- - type: object
- type: object
- provider_type:
- type: string
- required:
- - provider_type
- - config
+ identifier:
+ type: string
+ params:
+ additionalProperties:
+ oneOf:
+ - type: 'null'
+ - type: boolean
+ - type: number
+ - type: string
+ - type: array
+ - type: object
type: object
- shield_type:
+ provider_id:
+ type: string
+ type:
type: string
required:
- - shield_type
- - provider_config
+ - identifier
+ - type
+ - params
type: object
SpanEndPayload:
additionalProperties: false
@@ -2571,6 +2488,29 @@ components:
- role
- content
type: object
+ VectorMemoryBankDef:
+ additionalProperties: false
+ properties:
+ chunk_size_in_tokens:
+ type: integer
+ embedding_model:
+ type: string
+ identifier:
+ type: string
+ overlap_size_in_tokens:
+ type: integer
+ provider_id:
+ type: string
+ type:
+ const: vector
+ default: vector
+ type: string
+ required:
+ - identifier
+ - type
+ - embedding_model
+ - chunk_size_in_tokens
+ type: object
ViolationLevel:
enum:
- info
@@ -2604,7 +2544,7 @@ info:
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-02 15:40:53.008257"
+ \ draft and subject to change.\n Generated at 2024-10-08 15:18:57.600111"
title: '[DRAFT] Llama Stack Specification'
version: 0.0.1
jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema
@@ -3226,7 +3166,7 @@ paths:
description: OK
tags:
- Inference
- /memory/create:
+ /inference/register_model:
post:
parameters:
- description: JSON-encoded provider data which will be made available to the
@@ -3240,17 +3180,13 @@ paths:
content:
application/json:
schema:
- $ref: '#/components/schemas/CreateMemoryBankRequest'
+ $ref: '#/components/schemas/RegisterModelRequest'
required: true
responses:
'200':
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/MemoryBank'
description: OK
tags:
- - Memory
+ - Models
/memory/documents/delete:
post:
parameters:
@@ -3302,57 +3238,6 @@ paths:
description: OK
tags:
- Memory
- /memory/drop:
- post:
- parameters:
- - description: JSON-encoded provider data which will be made available to the
- adapter servicing the API
- in: header
- name: X-LlamaStack-ProviderData
- required: false
- schema:
- type: string
- requestBody:
- content:
- application/json:
- schema:
- $ref: '#/components/schemas/DropMemoryBankRequest'
- required: true
- responses:
- '200':
- content:
- application/json:
- schema:
- type: string
- description: OK
- tags:
- - Memory
- /memory/get:
- get:
- parameters:
- - in: query
- name: bank_id
- required: true
- schema:
- type: string
- - description: JSON-encoded provider data which will be made available to the
- adapter servicing the API
- in: header
- name: X-LlamaStack-ProviderData
- required: false
- schema:
- type: string
- responses:
- '200':
- content:
- application/json:
- schema:
- oneOf:
- - $ref: '#/components/schemas/MemoryBank'
- - type: 'null'
- description: OK
- tags:
- - Memory
/memory/insert:
post:
parameters:
@@ -3374,25 +3259,6 @@ paths:
description: OK
tags:
- Memory
- /memory/list:
- get:
- parameters:
- - description: JSON-encoded provider data which will be made available to the
- adapter servicing the API
- in: header
- name: X-LlamaStack-ProviderData
- required: false
- schema:
- type: string
- responses:
- '200':
- content:
- application/jsonl:
- schema:
- $ref: '#/components/schemas/MemoryBank'
- description: OK
- tags:
- - Memory
/memory/query:
post:
parameters:
@@ -3443,10 +3309,10 @@ paths:
get:
parameters:
- in: query
- name: bank_type
+ name: identifier
required: true
schema:
- $ref: '#/components/schemas/MemoryBankType'
+ type: string
- description: JSON-encoded provider data which will be made available to the
adapter servicing the API
in: header
@@ -3460,7 +3326,11 @@ paths:
application/json:
schema:
oneOf:
- - $ref: '#/components/schemas/MemoryBankSpec'
+ - oneOf:
+ - $ref: '#/components/schemas/VectorMemoryBankDef'
+ - $ref: '#/components/schemas/KeyValueMemoryBankDef'
+ - $ref: '#/components/schemas/KeywordMemoryBankDef'
+ - $ref: '#/components/schemas/GraphMemoryBankDef'
- type: 'null'
description: OK
tags:
@@ -3480,15 +3350,40 @@ paths:
content:
application/jsonl:
schema:
- $ref: '#/components/schemas/MemoryBankSpec'
+ oneOf:
+ - $ref: '#/components/schemas/VectorMemoryBankDef'
+ - $ref: '#/components/schemas/KeyValueMemoryBankDef'
+ - $ref: '#/components/schemas/KeywordMemoryBankDef'
+ - $ref: '#/components/schemas/GraphMemoryBankDef'
description: OK
tags:
- MemoryBanks
+ /memory_banks/register:
+ post:
+ parameters:
+ - description: JSON-encoded provider data which will be made available to the
+ adapter servicing the API
+ in: header
+ name: X-LlamaStack-ProviderData
+ required: false
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RegisterMemoryBankRequest'
+ required: true
+ responses:
+ '200':
+ description: OK
+ tags:
+ - Memory
/models/get:
get:
parameters:
- in: query
- name: core_model_id
+ name: identifier
required: true
schema:
type: string
@@ -3505,7 +3400,7 @@ paths:
application/json:
schema:
oneOf:
- - $ref: '#/components/schemas/ModelServingSpec'
+ - $ref: '#/components/schemas/ModelDef'
- type: 'null'
description: OK
tags:
@@ -3525,7 +3420,7 @@ paths:
content:
application/jsonl:
schema:
- $ref: '#/components/schemas/ModelServingSpec'
+ $ref: '#/components/schemas/ModelDef'
description: OK
tags:
- Models
@@ -3760,6 +3655,27 @@ paths:
description: OK
tags:
- Inspect
+ /safety/register_shield:
+ post:
+ parameters:
+ - description: JSON-encoded provider data which will be made available to the
+ adapter servicing the API
+ in: header
+ name: X-LlamaStack-ProviderData
+ required: false
+ schema:
+ type: string
+ requestBody:
+ content:
+ application/json:
+ schema:
+ $ref: '#/components/schemas/RegisterShieldRequest'
+ required: true
+ responses:
+ '200':
+ description: OK
+ tags:
+ - Shields
/safety/run_shield:
post:
parameters:
@@ -3806,7 +3722,29 @@ paths:
application/json:
schema:
oneOf:
- - $ref: '#/components/schemas/ShieldSpec'
+ - additionalProperties: false
+ properties:
+ identifier:
+ type: string
+ params:
+ additionalProperties:
+ oneOf:
+ - type: 'null'
+ - type: boolean
+ - type: number
+ - type: string
+ - type: array
+ - type: object
+ type: object
+ provider_id:
+ type: string
+ type:
+ type: string
+ required:
+ - identifier
+ - type
+ - params
+ type: object
- type: 'null'
description: OK
tags:
@@ -3826,7 +3764,7 @@ paths:
content:
application/jsonl:
schema:
- $ref: '#/components/schemas/ShieldSpec'
+ $ref: '#/components/schemas/ShieldDef'
description: OK
tags:
- Shields
@@ -3905,21 +3843,21 @@ security:
servers:
- url: http://any-hosted-llama-stack.com
tags:
-- name: Datasets
-- name: Inspect
-- name: Memory
- name: BatchInference
-- name: Agents
+- name: Datasets
- name: Inference
-- name: Shields
-- name: SyntheticDataGeneration
-- name: Models
-- name: RewardScoring
-- name: MemoryBanks
-- name: Safety
- name: Evaluations
-- name: Telemetry
+- name: Memory
+- name: Safety
- name: PostTraining
+- name: MemoryBanks
+- name: Models
+- name: Shields
+- name: Inspect
+- name: SyntheticDataGeneration
+- name: Telemetry
+- name: Agents
+- name: RewardScoring
- description:
name: BuiltinTool
- description:
name: CreateDatasetRequest
-- description:
- name: CreateMemoryBankRequest
-- description:
- name: MemoryBank
- description:
name: DeleteAgentsRequest
@@ -4140,9 +4073,6 @@ tags:
- description:
name: DeleteDocumentsRequest
-- description:
- name: DropMemoryBankRequest
- description:
name: EmbeddingsRequest
@@ -4163,11 +4093,23 @@ tags:
- description:
name: GetAgentsSessionRequest
+- description:
+ name: GraphMemoryBankDef
+- description:
+ name: KeyValueMemoryBankDef
+- description:
+ name: KeywordMemoryBankDef
- description: 'A single session of an interaction with an Agentic System.
'
name: Session
+- description:
+ name: VectorMemoryBankDef
- description:
name: AgentStepResponse
@@ -4189,21 +4131,8 @@ tags:
- description:
name: EvaluationJobStatusResponse
-- description: 'The model family and SKU of the model along with other parameters
- corresponding to the model.
-
-
- '
- name: Model
-- description:
- name: ModelServingSpec
-- description:
- name: MemoryBankType
-- description:
- name: MemoryBankSpec
-- description:
- name: ShieldSpec
+- description:
+ name: ModelDef
- description:
name: Trace
- description: 'Checkpoint created during training runs
@@ -4243,6 +4172,8 @@ tags:
name: ProviderInfo
- description:
name: RouteInfo
+- description:
+ name: ShieldDef
- description:
name: LogSeverity
- description:
@@ -4282,6 +4213,15 @@ tags:
- description:
name: QueryDocumentsResponse
+- description:
+ name: RegisterMemoryBankRequest
+- description:
+ name: RegisterModelRequest
+- description:
+ name: RegisterShieldRequest
- description:
name: DialogGenerations
@@ -4387,7 +4327,6 @@ x-tagGroups:
- CreateAgentSessionRequest
- CreateAgentTurnRequest
- CreateDatasetRequest
- - CreateMemoryBankRequest
- DPOAlignmentConfig
- DeleteAgentsRequest
- DeleteAgentsSessionRequest
@@ -4395,7 +4334,6 @@ x-tagGroups:
- DeleteDocumentsRequest
- DialogGenerations
- DoraFinetuningConfig
- - DropMemoryBankRequest
- EmbeddingsRequest
- EmbeddingsResponse
- EvaluateQuestionAnsweringRequest
@@ -4409,22 +4347,21 @@ x-tagGroups:
- FunctionCallToolDefinition
- GetAgentsSessionRequest
- GetDocumentsRequest
+ - GraphMemoryBankDef
- HealthInfo
- ImageMedia
- InferenceStep
- InsertDocumentsRequest
+ - KeyValueMemoryBankDef
+ - KeywordMemoryBankDef
- LogEventRequest
- LogSeverity
- LoraFinetuningConfig
- - MemoryBank
- MemoryBankDocument
- - MemoryBankSpec
- - MemoryBankType
- MemoryRetrievalStep
- MemoryToolDefinition
- MetricEvent
- - Model
- - ModelServingSpec
+ - ModelDef
- OptimizerConfig
- PhotogenToolDefinition
- PostTrainingJob
@@ -4438,6 +4375,9 @@ x-tagGroups:
- QueryDocumentsRequest
- QueryDocumentsResponse
- RLHFAlgorithm
+ - RegisterMemoryBankRequest
+ - RegisterModelRequest
+ - RegisterShieldRequest
- RestAPIExecutionConfig
- RestAPIMethod
- RewardScoreRequest
@@ -4453,7 +4393,7 @@ x-tagGroups:
- SearchToolDefinition
- Session
- ShieldCallStep
- - ShieldSpec
+ - ShieldDef
- SpanEndPayload
- SpanStartPayload
- SpanStatus
@@ -4483,5 +4423,6 @@ x-tagGroups:
- UnstructuredLogEvent
- UpdateDocumentsRequest
- UserMessage
+ - VectorMemoryBankDef
- ViolationLevel
- WolframAlphaToolDefinition