components: responses: {} schemas: AgenticSystemCreateRequest: additionalProperties: false properties: instance_config: $ref: '#/components/schemas/AgenticSystemInstanceConfig' model: $ref: '#/components/schemas/InstructModel' required: - model - instance_config type: object AgenticSystemCreateResponse: additionalProperties: false properties: system_id: type: string required: - system_id type: object AgenticSystemInstanceConfig: additionalProperties: false properties: available_tools: items: $ref: '#/components/schemas/AgenticSystemToolDefinition' type: array debug_prefix_messages: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' type: array input_shields: items: $ref: '#/components/schemas/ShieldDefinition' type: array instructions: type: string output_shields: items: $ref: '#/components/schemas/ShieldDefinition' type: array quantization_config: oneOf: - $ref: '#/components/schemas/Bf16QuantizationConfig' - $ref: '#/components/schemas/Fp8QuantizationConfig' sampling_params: $ref: '#/components/schemas/SamplingParams' required: - instructions type: object AgenticSystemSessionCreateRequest: additionalProperties: false properties: session_name: type: string system_id: type: string required: - system_id - session_name type: object AgenticSystemSessionCreateResponse: additionalProperties: false properties: session_id: type: string required: - session_id type: object AgenticSystemToolDefinition: additionalProperties: false properties: description: type: string execution_config: $ref: '#/components/schemas/RestAPIExecutionConfig' input_shields: items: $ref: '#/components/schemas/ShieldDefinition' type: array output_shields: items: $ref: '#/components/schemas/ShieldDefinition' type: array parameters: additionalProperties: $ref: '#/components/schemas/ToolParamDefinition' type: object tool_name: oneOf: - enum: - brave_search - wolfram_alpha - photogen - code_interpreter type: string - type: string required: - tool_name type: object AgenticSystemTurnCreateRequest: additionalProperties: false properties: messages: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/ToolResponseMessage' type: array override_config: $ref: '#/components/schemas/AgenticSystemInstanceConfig' session_id: type: string stream: type: boolean system_id: type: string required: - system_id - session_id - messages type: object AgenticSystemTurnResponseEvent: additionalProperties: false properties: payload: oneOf: - $ref: '#/components/schemas/AgenticSystemTurnResponseStepStartPayload' - $ref: '#/components/schemas/AgenticSystemTurnResponseStepProgressPayload' - $ref: '#/components/schemas/AgenticSystemTurnResponseStepCompletePayload' - $ref: '#/components/schemas/AgenticSystemTurnResponseTurnStartPayload' - $ref: '#/components/schemas/AgenticSystemTurnResponseTurnCompletePayload' required: - payload title: Streamed agent execution response. type: object AgenticSystemTurnResponseStepCompletePayload: additionalProperties: false properties: event_type: const: step_complete type: string step_details: oneOf: - $ref: '#/components/schemas/ModelInferenceStep' - $ref: '#/components/schemas/ToolExecutionStep' - $ref: '#/components/schemas/ShieldCallStep' - $ref: '#/components/schemas/MemoryRetrievalStep' step_type: enum: - model_inference - tool_execution - shield_call - memory_retrieval type: string required: - event_type - step_type - step_details type: object AgenticSystemTurnResponseStepProgressPayload: additionalProperties: false properties: event_type: const: step_progress type: string model_response_text_delta: type: string step_id: type: string step_type: enum: - model_inference - tool_execution - shield_call - memory_retrieval type: string tool_call_delta: $ref: '#/components/schemas/ToolCallDelta' tool_response_text_delta: type: string required: - event_type - step_type - step_id type: object AgenticSystemTurnResponseStepStartPayload: additionalProperties: false properties: event_type: const: step_start type: string metadata: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object step_id: type: string step_type: enum: - model_inference - tool_execution - shield_call - memory_retrieval type: string required: - event_type - step_type - step_id type: object AgenticSystemTurnResponseStreamChunk: additionalProperties: false properties: event: $ref: '#/components/schemas/AgenticSystemTurnResponseEvent' required: - event type: object AgenticSystemTurnResponseTurnCompletePayload: additionalProperties: false properties: event_type: const: turn_complete type: string turn: $ref: '#/components/schemas/Turn' required: - event_type - turn type: object AgenticSystemTurnResponseTurnStartPayload: additionalProperties: false properties: event_type: const: turn_start type: string turn_id: type: string required: - event_type - turn_id type: object Attachment: additionalProperties: false properties: mime_type: type: string url: $ref: '#/components/schemas/URL' required: - url - mime_type type: object BatchChatCompletionRequest: additionalProperties: false properties: available_tools: items: $ref: '#/components/schemas/ToolDefinition' type: array logprobs: additionalProperties: false properties: top_k: type: integer type: object messages_batch: items: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' type: array type: array model: $ref: '#/components/schemas/InstructModel' quantization_config: oneOf: - $ref: '#/components/schemas/Bf16QuantizationConfig' - $ref: '#/components/schemas/Fp8QuantizationConfig' sampling_params: $ref: '#/components/schemas/SamplingParams' required: - model - messages_batch type: object BatchCompletionRequest: additionalProperties: false properties: content_batch: items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' - items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' type: array type: array logprobs: additionalProperties: false properties: top_k: type: integer type: object model: $ref: '#/components/schemas/PretrainedModel' quantization_config: oneOf: - $ref: '#/components/schemas/Bf16QuantizationConfig' - $ref: '#/components/schemas/Fp8QuantizationConfig' sampling_params: $ref: '#/components/schemas/SamplingParams' required: - model - content_batch type: object Bf16QuantizationConfig: additionalProperties: false properties: quantization_type: const: bf16 type: string required: - quantization_type type: object BuiltinShield: enum: - llama_guard - prompt_guard - code_scanner_guard - third_party_shield type: string ChatCompletionRequest: additionalProperties: false properties: available_tools: items: $ref: '#/components/schemas/ToolDefinition' type: array logprobs: additionalProperties: false properties: top_k: type: integer type: object messages: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' type: array model: $ref: '#/components/schemas/InstructModel' quantization_config: oneOf: - $ref: '#/components/schemas/Bf16QuantizationConfig' - $ref: '#/components/schemas/Fp8QuantizationConfig' sampling_params: $ref: '#/components/schemas/SamplingParams' stream: type: boolean required: - model - messages type: object ChatCompletionResponse: additionalProperties: false properties: completion_message: $ref: '#/components/schemas/CompletionMessage' logprobs: items: $ref: '#/components/schemas/TokenLogProbs' type: array required: - completion_message type: object ChatCompletionResponseEvent: additionalProperties: false properties: delta: oneOf: - type: string - $ref: '#/components/schemas/ToolCallDelta' event_type: $ref: '#/components/schemas/ChatCompletionResponseEventType' logprobs: items: $ref: '#/components/schemas/TokenLogProbs' type: array stop_reason: $ref: '#/components/schemas/StopReason' required: - event_type - delta title: Chat completion response event. type: object ChatCompletionResponseEventType: enum: - start - complete - progress type: string ChatCompletionResponseStreamChunk: additionalProperties: false properties: event: $ref: '#/components/schemas/ChatCompletionResponseEvent' required: - event title: SSE-stream of these events. type: object CompletionMessage: additionalProperties: false properties: content: oneOf: - type: string - $ref: '#/components/schemas/Attachment' - items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' type: array role: const: assistant type: string stop_reason: $ref: '#/components/schemas/StopReason' tool_calls: items: $ref: '#/components/schemas/ToolCall' type: array required: - role - content - stop_reason - tool_calls type: object CompletionRequest: additionalProperties: false properties: content: oneOf: - type: string - $ref: '#/components/schemas/Attachment' - items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' type: array logprobs: additionalProperties: false properties: top_k: type: integer type: object model: $ref: '#/components/schemas/PretrainedModel' quantization_config: oneOf: - $ref: '#/components/schemas/Bf16QuantizationConfig' - $ref: '#/components/schemas/Fp8QuantizationConfig' sampling_params: $ref: '#/components/schemas/SamplingParams' stream: type: boolean required: - model - content type: object CompletionResponse: additionalProperties: false properties: completion_message: $ref: '#/components/schemas/CompletionMessage' logprobs: items: $ref: '#/components/schemas/TokenLogProbs' type: array required: - completion_message type: object CompletionResponseStreamChunk: additionalProperties: false properties: delta: type: string logprobs: items: $ref: '#/components/schemas/TokenLogProbs' type: array stop_reason: $ref: '#/components/schemas/StopReason' required: - delta title: streamed completion response. type: object CreateDatasetRequest: additionalProperties: false properties: dataset: $ref: '#/components/schemas/TrainEvalDataset' uuid: type: string required: - uuid - dataset title: Request to create a dataset. type: object DPOAlignmentConfig: additionalProperties: false properties: epsilon: type: number gamma: type: number reward_clip: type: number reward_scale: type: number required: - reward_scale - reward_clip - epsilon - gamma type: object DialogGenerations: additionalProperties: false properties: dialog: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' type: array sampled_generations: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' type: array required: - dialog - sampled_generations type: object DoraFinetuningConfig: additionalProperties: false properties: alpha: type: integer apply_lora_to_mlp: type: boolean apply_lora_to_output: type: boolean lora_attn_modules: items: type: string type: array rank: type: integer required: - lora_attn_modules - apply_lora_to_mlp - apply_lora_to_output - rank - alpha type: object EvaluateQuestionAnsweringRequest: additionalProperties: false properties: checkpoint: additionalProperties: false properties: iters: type: integer path: $ref: '#/components/schemas/URL' required: - iters - path type: object dataset: $ref: '#/components/schemas/TrainEvalDataset' job_uuid: type: string metrics: items: enum: - em - f1 type: string type: array sampling_params: $ref: '#/components/schemas/SamplingParams' required: - job_uuid - dataset - checkpoint - sampling_params - metrics title: Request to evaluate question answering. type: object EvaluateSummarizationRequest: additionalProperties: false properties: checkpoint: additionalProperties: false properties: iters: type: integer path: $ref: '#/components/schemas/URL' required: - iters - path type: object dataset: $ref: '#/components/schemas/TrainEvalDataset' job_uuid: type: string metrics: items: enum: - rouge - bleu type: string type: array sampling_params: $ref: '#/components/schemas/SamplingParams' required: - job_uuid - dataset - checkpoint - sampling_params - metrics title: Request to evaluate summarization. type: object EvaluateTextGenerationRequest: additionalProperties: false properties: checkpoint: additionalProperties: false properties: iters: type: integer path: $ref: '#/components/schemas/URL' required: - iters - path type: object dataset: $ref: '#/components/schemas/TrainEvalDataset' job_uuid: type: string metrics: items: enum: - perplexity - rouge - bleu type: string type: array sampling_params: $ref: '#/components/schemas/SamplingParams' required: - job_uuid - dataset - checkpoint - sampling_params - metrics title: Request to evaluate text generation. type: object EvaluationJob: additionalProperties: false properties: job_uuid: type: string required: - job_uuid type: object EvaluationJobArtifactsResponse: additionalProperties: false properties: job_uuid: type: string required: - job_uuid title: Artifacts of a evaluation job. type: object EvaluationJobLogStream: additionalProperties: false properties: job_uuid: type: string required: - job_uuid type: object EvaluationJobStatusResponse: additionalProperties: false properties: job_uuid: type: string required: - job_uuid type: object FinetuningAlgorithm: enum: - full - lora - qlora - dora type: string Fp8QuantizationConfig: additionalProperties: false properties: quantization_type: const: fp8 type: string required: - quantization_type type: object InstructModel: enum: - llama3_8b_chat - llama3_70b_chat type: string LoraFinetuningConfig: additionalProperties: false properties: alpha: type: integer apply_lora_to_mlp: type: boolean apply_lora_to_output: type: boolean lora_attn_modules: items: type: string type: array rank: type: integer required: - lora_attn_modules - apply_lora_to_mlp - apply_lora_to_output - rank - alpha type: object MemoryBank: additionalProperties: false properties: memory_bank_id: type: string memory_bank_name: type: string required: - memory_bank_id - memory_bank_name type: object MemoryBankDocument: additionalProperties: false properties: content: contentEncoding: base64 type: string document_id: type: string metadata: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object mime_type: type: string required: - document_id - content - metadata - mime_type type: object MemoryRetrievalStep: additionalProperties: false properties: completed_at: format: date-time type: string documents: items: $ref: '#/components/schemas/MemoryBankDocument' type: array memory_bank_ids: items: type: string type: array scores: items: type: number type: array started_at: format: date-time type: string step_id: type: string step_type: const: memory_retrieval type: string turn_id: type: string required: - turn_id - step_id - step_type - memory_bank_ids - documents - scores type: object ModelInferenceStep: additionalProperties: false properties: completed_at: format: date-time type: string model_response: $ref: '#/components/schemas/CompletionMessage' started_at: format: date-time type: string step_id: type: string step_type: const: model_inference type: string turn_id: type: string required: - turn_id - step_id - step_type - model_response type: object OnViolationAction: enum: - 0 - 1 - 2 type: integer OptimizerConfig: additionalProperties: false properties: lr: type: number lr_min: type: number optimizer_type: enum: - adam - adamw - sgd type: string weight_decay: type: number required: - optimizer_type - lr - lr_min - weight_decay type: object PostTrainingJob: additionalProperties: false properties: job_uuid: type: string required: - job_uuid type: object PostTrainingJobArtifactsResponse: additionalProperties: false properties: checkpoints: items: additionalProperties: false properties: iters: type: integer path: $ref: '#/components/schemas/URL' required: - iters - path type: object type: array job_uuid: type: string required: - job_uuid - checkpoints title: Artifacts of a finetuning job. type: object PostTrainingJobLogStream: additionalProperties: false properties: job_uuid: type: string log_lines: items: type: string type: array required: - job_uuid - log_lines title: Stream of logs from a finetuning job. type: object PostTrainingJobStatus: enum: - running - completed - failed - scheduled type: string PostTrainingJobStatusResponse: additionalProperties: false properties: checkpoints: items: additionalProperties: false properties: iters: type: integer path: $ref: '#/components/schemas/URL' required: - iters - path type: object type: array completed_at: format: date-time type: string job_uuid: type: string resources_allocated: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object scheduled_at: format: date-time type: string started_at: format: date-time type: string status: $ref: '#/components/schemas/PostTrainingJobStatus' required: - job_uuid - status - checkpoints title: Status of a finetuning job. type: object PostTrainingRLHFRequest: additionalProperties: false properties: algorithm: $ref: '#/components/schemas/RLHFAlgorithm' algorithm_config: $ref: '#/components/schemas/DPOAlignmentConfig' dataset: $ref: '#/components/schemas/TrainEvalDataset' finetuned_model: $ref: '#/components/schemas/URL' hyperparam_search_config: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object job_uuid: type: string logger_config: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object optimizer_config: $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' validation_dataset: $ref: '#/components/schemas/TrainEvalDataset' required: - job_uuid - finetuned_model - dataset - validation_dataset - algorithm - algorithm_config - optimizer_config - training_config - hyperparam_search_config - logger_config title: Request to finetune a model. type: object PostTrainingSFTRequest: additionalProperties: false properties: algorithm: $ref: '#/components/schemas/FinetuningAlgorithm' algorithm_config: oneOf: - $ref: '#/components/schemas/LoraFinetuningConfig' - $ref: '#/components/schemas/QLoraFinetuningConfig' - $ref: '#/components/schemas/DoraFinetuningConfig' dataset: $ref: '#/components/schemas/TrainEvalDataset' hyperparam_search_config: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object job_uuid: type: string logger_config: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object model: $ref: '#/components/schemas/PretrainedModel' optimizer_config: $ref: '#/components/schemas/OptimizerConfig' training_config: $ref: '#/components/schemas/TrainingConfig' validation_dataset: $ref: '#/components/schemas/TrainEvalDataset' required: - job_uuid - model - dataset - validation_dataset - algorithm - algorithm_config - optimizer_config - training_config - hyperparam_search_config - logger_config title: Request to finetune a model. type: object PretrainedModel: enum: - llama3_8b - llama3_70b type: string QLoraFinetuningConfig: additionalProperties: false properties: alpha: type: integer apply_lora_to_mlp: type: boolean apply_lora_to_output: type: boolean lora_attn_modules: items: type: string type: array rank: type: integer required: - lora_attn_modules - apply_lora_to_mlp - apply_lora_to_output - rank - alpha type: object RLHFAlgorithm: enum: - dpo type: string RestAPIExecutionConfig: additionalProperties: false properties: body: additionalProperties: type: string type: object headers: additionalProperties: type: string type: object method: $ref: '#/components/schemas/RestAPIMethod' params: additionalProperties: type: string type: object url: $ref: '#/components/schemas/URL' required: - url - method type: object RestAPIMethod: enum: - GET - POST - PUT - DELETE type: string RewardModel: enum: - llama3_70b_reward - llama3_405b_reward type: string RewardScoringRequest: additionalProperties: false properties: dialog_generations: items: $ref: '#/components/schemas/DialogGenerations' type: array model: $ref: '#/components/schemas/RewardModel' required: - dialog_generations - model title: Request to score a reward function. A list of prompts and a list of responses per prompt. type: object RewardScoringResponse: additionalProperties: false properties: scored_generations: items: $ref: '#/components/schemas/ScoredDialogGenerations' type: array required: - scored_generations title: Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold. type: object SamplingParams: additionalProperties: false properties: max_tokens: type: integer repetition_penalty: type: number strategy: $ref: '#/components/schemas/SamplingStrategy' temperature: type: number top_k: type: integer top_p: type: number required: - strategy type: object SamplingStrategy: enum: - greedy - top_p - top_k type: string ScoredDialogGenerations: additionalProperties: false properties: dialog: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' type: array scored_generations: items: $ref: '#/components/schemas/ScoredMessage' type: array required: - dialog - scored_generations type: object ScoredMessage: additionalProperties: false properties: message: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' score: type: number required: - message - score type: object Session: additionalProperties: false properties: session_id: type: string session_name: type: string started_at: format: date-time type: string turns: items: $ref: '#/components/schemas/Turn' type: array required: - session_id - session_name - turns - started_at title: A single session of an interaction with an Agentic System. type: object ShieldCallStep: additionalProperties: false properties: completed_at: format: date-time type: string response: $ref: '#/components/schemas/ShieldResponse' started_at: format: date-time type: string step_id: type: string step_type: const: shield_call type: string turn_id: type: string required: - turn_id - step_id - step_type - response type: object ShieldDefinition: additionalProperties: false properties: description: type: string execution_config: $ref: '#/components/schemas/RestAPIExecutionConfig' on_violation_action: $ref: '#/components/schemas/OnViolationAction' parameters: additionalProperties: $ref: '#/components/schemas/ToolParamDefinition' type: object shield_type: oneOf: - $ref: '#/components/schemas/BuiltinShield' - type: string required: - shield_type - on_violation_action type: object ShieldResponse: additionalProperties: false properties: is_violation: type: boolean shield_type: oneOf: - $ref: '#/components/schemas/BuiltinShield' - type: string violation_return_message: type: string violation_type: type: string required: - shield_type - is_violation type: object StopReason: enum: - end_of_turn - end_of_message - out_of_tokens type: string SyntheticDataGenerationRequest: additionalProperties: false properties: dialogs: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/SystemMessage' - $ref: '#/components/schemas/ToolResponseMessage' - $ref: '#/components/schemas/CompletionMessage' type: array filtering_function: enum: - none - random - top_k - top_p - top_k_top_p - sigmoid title: The type of filtering function. type: string model: $ref: '#/components/schemas/RewardModel' required: - dialogs - filtering_function title: Request to generate synthetic data. A small batch of prompts and a filtering function type: object SyntheticDataGenerationResponse: additionalProperties: false properties: statistics: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object synthetic_data: items: $ref: '#/components/schemas/ScoredDialogGenerations' type: array required: - synthetic_data title: Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. type: object SystemMessage: additionalProperties: false properties: content: oneOf: - type: string - $ref: '#/components/schemas/Attachment' - items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' type: array role: const: system type: string required: - role - content type: object TokenLogProbs: additionalProperties: false properties: logprobs_by_token: additionalProperties: type: number type: object required: - logprobs_by_token type: object ToolCall: additionalProperties: false properties: arguments: additionalProperties: oneOf: - type: string - type: integer - type: number - type: boolean - type: 'null' - items: oneOf: - type: string - type: integer - type: number - type: boolean - type: 'null' type: array - additionalProperties: oneOf: - type: string - type: integer - type: number - type: boolean - type: 'null' type: object type: object call_id: type: string tool_name: oneOf: - enum: - brave_search - wolfram_alpha - photogen - code_interpreter type: string - type: string required: - call_id - tool_name - arguments type: object ToolCallDelta: additionalProperties: false properties: content: oneOf: - type: string - $ref: '#/components/schemas/ToolCall' parse_status: $ref: '#/components/schemas/ToolCallParseStatus' required: - content - parse_status type: object ToolCallParseStatus: enum: - start - in_progress - failure - success type: string ToolDefinition: additionalProperties: false properties: description: type: string parameters: additionalProperties: $ref: '#/components/schemas/ToolParamDefinition' type: object tool_name: oneOf: - enum: - brave_search - wolfram_alpha - photogen - code_interpreter type: string - type: string required: - tool_name type: object ToolExecutionStep: additionalProperties: false properties: completed_at: format: date-time type: string started_at: format: date-time type: string step_id: type: string step_type: const: tool_execution type: string tool_calls: items: $ref: '#/components/schemas/ToolCall' type: array tool_responses: items: $ref: '#/components/schemas/ToolResponse' type: array turn_id: type: string required: - turn_id - step_id - step_type - tool_calls - tool_responses type: object ToolParamDefinition: additionalProperties: false properties: description: type: string param_type: type: string required: type: boolean required: - param_type type: object ToolResponse: additionalProperties: false properties: call_id: type: string content: oneOf: - type: string - $ref: '#/components/schemas/Attachment' - items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' type: array tool_name: oneOf: - enum: - brave_search - wolfram_alpha - photogen - code_interpreter type: string - type: string required: - call_id - tool_name - content type: object ToolResponseMessage: additionalProperties: false properties: call_id: type: string content: oneOf: - type: string - $ref: '#/components/schemas/Attachment' - items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' type: array role: const: ipython type: string tool_name: oneOf: - enum: - brave_search - wolfram_alpha - photogen - code_interpreter type: string - type: string required: - role - call_id - tool_name - content type: object TrainEvalDataset: additionalProperties: false properties: columns: additionalProperties: $ref: '#/components/schemas/TrainEvalDatasetColumnType' type: object content_url: $ref: '#/components/schemas/URL' metadata: additionalProperties: oneOf: - type: 'null' - type: boolean - type: number - type: string - type: array - type: object type: object required: - columns - content_url title: Dataset to be used for training or evaluating language models. type: object TrainEvalDatasetColumnType: enum: - dialog - text - media - number - json type: string TrainingConfig: additionalProperties: false properties: batch_size: type: integer enable_activation_checkpointing: type: boolean fsdp_cpu_offload: type: boolean memory_efficient_fsdp_wrap: type: boolean n_epochs: type: integer n_iters: type: integer shuffle: type: boolean required: - n_epochs - batch_size - shuffle - n_iters - enable_activation_checkpointing - memory_efficient_fsdp_wrap - fsdp_cpu_offload type: object Turn: additionalProperties: false properties: completed_at: format: date-time type: string input_messages: items: oneOf: - $ref: '#/components/schemas/UserMessage' - $ref: '#/components/schemas/ToolResponseMessage' type: array output_message: $ref: '#/components/schemas/CompletionMessage' session_id: type: string started_at: format: date-time type: string steps: items: oneOf: - $ref: '#/components/schemas/ModelInferenceStep' - $ref: '#/components/schemas/ToolExecutionStep' - $ref: '#/components/schemas/ShieldCallStep' - $ref: '#/components/schemas/MemoryRetrievalStep' type: array turn_id: type: string required: - turn_id - session_id - input_messages - steps - output_message - started_at title: A single turn in an interaction with an Agentic System. type: object URL: format: uri pattern: ^(https?://|file://|data:) type: string UserMessage: additionalProperties: false properties: content: oneOf: - type: string - $ref: '#/components/schemas/Attachment' - items: oneOf: - type: string - $ref: '#/components/schemas/Attachment' type: array role: const: user type: string required: - role - content type: object 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-07-19 11:49:56.794897" title: '[DRAFT] Llama Stack Specification' version: 0.0.1 jsonSchemaDialect: https://json-schema.org/draft/2020-12/schema openapi: 3.1.0 paths: /agentic_system/create: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AgenticSystemCreateRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AgenticSystemCreateResponse' description: OK tags: - AgenticSystem /agentic_system/delete: delete: parameters: - in: query name: agent_id required: true schema: type: string responses: '200': description: OK tags: - AgenticSystem /agentic_system/memory_bank/attach: post: parameters: - in: query name: agent_id required: true schema: type: string - in: query name: session_id required: true schema: type: string requestBody: content: application/json: schema: items: type: string type: array required: true responses: '200': description: OK tags: - AgenticSystem /agentic_system/memory_bank/detach: post: parameters: - in: query name: agent_id required: true schema: type: string - in: query name: session_id required: true schema: type: string requestBody: content: application/json: schema: items: type: string type: array required: true responses: '200': description: OK tags: - AgenticSystem /agentic_system/session/create: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AgenticSystemSessionCreateRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AgenticSystemSessionCreateResponse' description: OK tags: - AgenticSystem /agentic_system/session/get: post: parameters: - in: query name: agent_id required: true schema: type: string - in: query name: session_id required: true schema: type: string requestBody: content: application/json: schema: oneOf: - items: type: string type: array - type: 'null' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/Session' description: OK tags: - AgenticSystem /agentic_system/turn/create: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/AgenticSystemTurnCreateRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/AgenticSystemTurnResponseStreamChunk' description: OK tags: - AgenticSystem /agentic_system/turn/get: get: parameters: - in: query name: agent_id required: true schema: type: string - in: query name: turn_id required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/Turn' description: OK tags: - AgenticSystem /datasets/create: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CreateDatasetRequest' required: true responses: '200': description: OK tags: - Datasets /datasets/delete: delete: parameters: - in: query name: dataset_uuid required: true schema: type: string responses: '200': description: OK tags: - Datasets /datasets/get: get: parameters: - in: query name: dataset_uuid required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/TrainEvalDataset' description: OK tags: - Datasets /evaluate/job/artifacts: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/EvaluationJobArtifactsResponse' description: OK tags: - Evaluations /evaluate/job/cancel: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': description: OK tags: - Evaluations /evaluate/job/logs: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/EvaluationJobLogStream' description: OK tags: - Evaluations /evaluate/job/status: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/EvaluationJobStatusResponse' description: OK tags: - Evaluations /evaluate/jobs: get: parameters: [] responses: '200': content: application/jsonl: schema: $ref: '#/components/schemas/EvaluationJob' description: OK tags: - Evaluations /evaluate/question_answering/: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/EvaluateQuestionAnsweringRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/EvaluationJob' description: OK tags: - Evaluations /evaluate/summarization/: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/EvaluateSummarizationRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/EvaluationJob' description: OK tags: - Evaluations /evaluate/text_generation/: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/EvaluateTextGenerationRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/EvaluationJob' description: OK tags: - Evaluations /inference/batch_chat_completion: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchChatCompletionRequest' required: true responses: '200': content: application/jsonl: schema: $ref: '#/components/schemas/ChatCompletionResponse' description: OK tags: - ModelInference /inference/batch_completion: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/BatchCompletionRequest' required: true responses: '200': content: application/jsonl: schema: $ref: '#/components/schemas/CompletionResponse' description: OK tags: - ModelInference /inference/chat_completion: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/ChatCompletionRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/ChatCompletionResponseStreamChunk' description: SSE-stream of these events. tags: - ModelInference /inference/completion: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/CompletionRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/CompletionResponseStreamChunk' description: streamed completion response. tags: - ModelInference /memory_bank/delete: post: parameters: - in: query name: bank_id required: true schema: type: string requestBody: content: application/json: schema: items: type: string type: array required: true responses: '200': content: application/jsonl: schema: type: string description: OK tags: - MemoryBanks /memory_bank/get: post: parameters: - in: query name: bank_id required: true schema: type: string requestBody: content: application/json: schema: items: type: string type: array required: true responses: '200': content: application/jsonl: schema: $ref: '#/components/schemas/MemoryBankDocument' description: OK tags: - MemoryBanks /memory_bank/insert: post: parameters: - in: query name: bank_id required: true schema: type: string requestBody: content: application/json: schema: items: $ref: '#/components/schemas/MemoryBankDocument' type: array required: true responses: '200': description: OK tags: - MemoryBanks /memory_bank/update: post: parameters: - in: query name: bank_id required: true schema: type: string requestBody: content: application/json: schema: items: $ref: '#/components/schemas/MemoryBankDocument' type: array required: true responses: '200': description: OK tags: - MemoryBanks /memory_banks/create: post: parameters: - in: query name: bank_id required: true schema: type: string - in: query name: bank_name required: true schema: type: string requestBody: content: application/json: schema: items: $ref: '#/components/schemas/MemoryBankDocument' type: array required: true responses: '200': description: OK tags: - MemoryBanks /memory_banks/drop: delete: parameters: - in: query name: bank_id required: true schema: type: string responses: '200': content: application/json: schema: type: string description: OK tags: - MemoryBanks /memory_banks/get: get: parameters: - in: query name: bank_id required: true schema: type: string responses: '200': content: application/jsonl: schema: $ref: '#/components/schemas/MemoryBank' description: OK tags: - MemoryBanks /memory_banks/list: get: parameters: [] responses: '200': content: application/jsonl: schema: $ref: '#/components/schemas/MemoryBank' description: OK tags: - MemoryBanks /post_training/job/artifacts: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/PostTrainingJobArtifactsResponse' description: OK tags: - PostTraining /post_training/job/cancel: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': description: OK tags: - PostTraining /post_training/job/logs: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/PostTrainingJobLogStream' description: OK tags: - PostTraining /post_training/job/status: get: parameters: - in: query name: job_uuid required: true schema: type: string responses: '200': content: application/json: schema: $ref: '#/components/schemas/PostTrainingJobStatusResponse' description: OK tags: - PostTraining /post_training/jobs: get: parameters: [] responses: '200': content: application/jsonl: schema: $ref: '#/components/schemas/PostTrainingJob' description: OK tags: - PostTraining /post_training/preference_optimize: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/PostTrainingRLHFRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/PostTrainingJob' description: OK tags: - PostTraining /post_training/supervised_fine_tune: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/PostTrainingSFTRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/PostTrainingJob' description: OK tags: - PostTraining /reward_scoring/score: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/RewardScoringRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/RewardScoringResponse' description: OK tags: - RewardScoring /synthetic_data_generation/generate: post: parameters: [] requestBody: content: application/json: schema: $ref: '#/components/schemas/SyntheticDataGenerationRequest' required: true responses: '200': content: application/json: schema: $ref: '#/components/schemas/SyntheticDataGenerationResponse' description: OK tags: - SyntheticDataGeneration security: - Default: [] servers: - url: http://any-hosted-llama-stack.com tags: - name: AgenticSystem - name: Datasets - name: ModelInference - name: SyntheticDataGeneration - name: MemoryBanks - name: PostTraining - name: Evaluations - name: RewardScoring - description: name: Attachment - description: name: BatchChatCompletionRequest - description: name: Bf16QuantizationConfig - description: name: CompletionMessage - description: name: Fp8QuantizationConfig - description: name: InstructModel - description: name: SamplingParams - description: name: SamplingStrategy - description: name: StopReason - description: name: SystemMessage - description: name: ToolCall - description: name: ToolDefinition - description: name: ToolParamDefinition - description: name: ToolResponseMessage - description: name: URL - description: name: UserMessage - description: name: ChatCompletionResponse - description: name: TokenLogProbs - description: name: BatchCompletionRequest - description: name: PretrainedModel - description: name: CompletionResponse - description: name: ChatCompletionRequest - description: 'Chat completion response event. ' name: ChatCompletionResponseEvent - description: name: ChatCompletionResponseEventType - description: 'SSE-stream of these events. ' name: ChatCompletionResponseStreamChunk - description: name: ToolCallDelta - description: name: ToolCallParseStatus - description: name: CompletionRequest - description: 'streamed completion response. ' name: CompletionResponseStreamChunk - description: name: AgenticSystemCreateRequest - description: name: AgenticSystemInstanceConfig - description: name: AgenticSystemToolDefinition - description: name: BuiltinShield - description: name: OnViolationAction - description: name: RestAPIExecutionConfig - description: name: RestAPIMethod - description: name: ShieldDefinition - description: name: AgenticSystemCreateResponse - description: name: AgenticSystemSessionCreateRequest - description: name: AgenticSystemSessionCreateResponse - description: name: AgenticSystemTurnCreateRequest - description: 'Streamed agent execution response. ' name: AgenticSystemTurnResponseEvent - description: name: AgenticSystemTurnResponseStepCompletePayload - description: name: AgenticSystemTurnResponseStepProgressPayload - description: name: AgenticSystemTurnResponseStepStartPayload - description: name: AgenticSystemTurnResponseStreamChunk - description: name: AgenticSystemTurnResponseTurnCompletePayload - description: name: AgenticSystemTurnResponseTurnStartPayload - description: name: MemoryBankDocument - description: name: MemoryRetrievalStep - description: name: ModelInferenceStep - description: name: ShieldCallStep - description: name: ShieldResponse - description: name: ToolExecutionStep - description: name: ToolResponse - description: 'A single turn in an interaction with an Agentic System. ' name: Turn - description: 'Request to create a dataset. ' name: CreateDatasetRequest - description: 'Dataset to be used for training or evaluating language models. ' name: TrainEvalDataset - description: name: TrainEvalDatasetColumnType - description: 'A single session of an interaction with an Agentic System. ' name: Session - description: 'Artifacts of a evaluation job. ' name: EvaluationJobArtifactsResponse - description: name: EvaluationJobLogStream - description: name: EvaluationJobStatusResponse - description: name: EvaluationJob - description: name: MemoryBank - description: 'Artifacts of a finetuning job. ' name: PostTrainingJobArtifactsResponse - description: 'Stream of logs from a finetuning job. ' name: PostTrainingJobLogStream - description: name: PostTrainingJobStatus - description: 'Status of a finetuning job. ' name: PostTrainingJobStatusResponse - description: name: PostTrainingJob - description: 'Request to evaluate question answering. ' name: EvaluateQuestionAnsweringRequest - description: 'Request to evaluate summarization. ' name: EvaluateSummarizationRequest - description: 'Request to evaluate text generation. ' name: EvaluateTextGenerationRequest - description: name: RewardModel - description: 'Request to generate synthetic data. A small batch of prompts and a filtering function ' name: SyntheticDataGenerationRequest - description: name: ScoredDialogGenerations - description: name: ScoredMessage - description: 'Response from the synthetic data generation. Batch of (prompt, response, score) tuples that pass the threshold. ' name: SyntheticDataGenerationResponse - description: name: DPOAlignmentConfig - description: name: OptimizerConfig - description: 'Request to finetune a model. ' name: PostTrainingRLHFRequest - description: name: RLHFAlgorithm - description: name: TrainingConfig - description: name: DialogGenerations - description: 'Request to score a reward function. A list of prompts and a list of responses per prompt. ' name: RewardScoringRequest - description: 'Response from the reward scoring. Batch of (prompt, response, score) tuples that pass the threshold. ' name: RewardScoringResponse - description: name: DoraFinetuningConfig - description: name: FinetuningAlgorithm - description: name: LoraFinetuningConfig - description: 'Request to finetune a model. ' name: PostTrainingSFTRequest - description: name: QLoraFinetuningConfig x-tagGroups: - name: Operations tags: - AgenticSystem - Datasets - Evaluations - MemoryBanks - ModelInference - PostTraining - RewardScoring - SyntheticDataGeneration - name: Types tags: - AgenticSystemCreateRequest - AgenticSystemCreateResponse - AgenticSystemInstanceConfig - AgenticSystemSessionCreateRequest - AgenticSystemSessionCreateResponse - AgenticSystemToolDefinition - AgenticSystemTurnCreateRequest - AgenticSystemTurnResponseEvent - AgenticSystemTurnResponseStepCompletePayload - AgenticSystemTurnResponseStepProgressPayload - AgenticSystemTurnResponseStepStartPayload - AgenticSystemTurnResponseStreamChunk - AgenticSystemTurnResponseTurnCompletePayload - AgenticSystemTurnResponseTurnStartPayload - Attachment - BatchChatCompletionRequest - BatchCompletionRequest - Bf16QuantizationConfig - BuiltinShield - ChatCompletionRequest - ChatCompletionResponse - ChatCompletionResponseEvent - ChatCompletionResponseEventType - ChatCompletionResponseStreamChunk - CompletionMessage - CompletionRequest - CompletionResponse - CompletionResponseStreamChunk - CreateDatasetRequest - DPOAlignmentConfig - DialogGenerations - DoraFinetuningConfig - EvaluateQuestionAnsweringRequest - EvaluateSummarizationRequest - EvaluateTextGenerationRequest - EvaluationJob - EvaluationJobArtifactsResponse - EvaluationJobLogStream - EvaluationJobStatusResponse - FinetuningAlgorithm - Fp8QuantizationConfig - InstructModel - LoraFinetuningConfig - MemoryBank - MemoryBankDocument - MemoryRetrievalStep - ModelInferenceStep - OnViolationAction - OptimizerConfig - PostTrainingJob - PostTrainingJobArtifactsResponse - PostTrainingJobLogStream - PostTrainingJobStatus - PostTrainingJobStatusResponse - PostTrainingRLHFRequest - PostTrainingSFTRequest - PretrainedModel - QLoraFinetuningConfig - RLHFAlgorithm - RestAPIExecutionConfig - RestAPIMethod - RewardModel - RewardScoringRequest - RewardScoringResponse - SamplingParams - SamplingStrategy - ScoredDialogGenerations - ScoredMessage - Session - ShieldCallStep - ShieldDefinition - ShieldResponse - StopReason - SyntheticDataGenerationRequest - SyntheticDataGenerationResponse - SystemMessage - TokenLogProbs - ToolCall - ToolCallDelta - ToolCallParseStatus - ToolDefinition - ToolExecutionStep - ToolParamDefinition - ToolResponse - ToolResponseMessage - TrainEvalDataset - TrainEvalDatasetColumnType - TrainingConfig - Turn - URL - UserMessage