mirror of
https://github.com/meta-llama/llama-stack.git
synced 2025-10-04 12:07:34 +00:00
68 lines
6.9 KiB
Text
68 lines
6.9 KiB
Text
---
|
|
id: create-a-new-session-for-an-agent
|
|
title: "Create a new session for an agent."
|
|
description: "Create a new session for an agent."
|
|
sidebar_label: "Create a new session for an agent."
|
|
hide_title: true
|
|
hide_table_of_contents: true
|
|
api: eJztWE1v2zgQ/SuETi2Q2GmwRbe5uWkXG6BFAsc5LNJgQUtjiy1FqiTlxDD83/uGlGK5TrbuopcA8SGRJXK+3ntDjVeZI19b48lnJ6vs+OiI/xXkc6fqoKzJTrKREaM5mXBJ3uPOqSMZaNxuG2QHWW5NwHPeKetaq1zyzuEXz9tXmc9LqiRfhWVNMGinXygP2Fg7W5MLKjn3yf6/quit9cEpM8fa7ZiujPrWkFAF/KqZIidm1olQkshjeIVorWXr9UEmi0LxRqkveh5nUns6QAG+NcoRnF73Q7g5yIIKmmN4PPuduLoHwlFonEEctyWZFBTyEFIYuhWSDXYRDhAiB/nHQ7WflGwKqfogbqUXyiykVoVAspXUyLlC4L8PgSBD43vrFMzOye2k+fdkciHSapHbgrL1fbV+htwH5xgpXnyAcvjSOpSiqSrplsLOIoYU19yWKi+FSkk7JVEyBlma9nn0s2b7QSq9r+e0ml1ra5CbKJtKmkMAVMipJtHbsxUOe1IGOZt8jyxfnNeJcC/FSFyNP7bJ5Ah+SqLxIEawTBKnaEGisg5kNoxnRE7IqW1CdO5rysHwXNg8b5wjuP8hrl8ieEK4Q+u+eD22xzI9UryuWYiZs1WMYXRxNhBj28xLvQQ8WttbL8Z/nYo3fx69GXDR6E5WdWJGxy9QfePvnSzEOFF8E8+ezG+Vc/z2YeXkWrHQSmz3fBGsxWaz7AyzVRBhrhbQqKxsgzVcW1XRs6ieRfXERHX8duNvAqZ/Yqa3yvJ9af1jG2gCFaK7nKjgsrHYcK4JrSoVBuJCk0RAAeyRcwmRaDx03Un1+rGTypNbAHyUk6VEKA8TqzF0h3rzoUxtGZ6l9SytJySt1/3z6oyZjcjFZWL7xn8rr9Eu5btiFANx3oAJJKt4Kk0JB4+x8RW26ORV0Ew2Ojz4Iv6o4WdRPYvqaYnq6CFve0goqoSpJuees4nTmefgt4NNk1o7cbWzVsedOIDx6FpLJyuCoNnUKjP4gq3xMQ+BjDa+1zKUO8XgA+/sfQdDGukAZ5o/E2obp+xrA0FwDSDZEWRLo/X6Ji3Guf3OFkte8ZtH7JTnz/jLGfLKLscun/ssB/9vuo7ee2RLSPWn7G4eiEBv1w03AFhpC8bFxpkhwnOSDRevhhEGP1x1CK6H3e8AqHfs1wnoxjHNyhDqk+EQ70mHJUxRcai1rOQhKJp/HeS2yhgKTyCeCsu48X3XnK9v+BkDMN5A9aFH861S32PLjJrZWPs2+4/sUlyyS3HZ6jyii5A53oTF4tUD8HBb9FsNQvZbVt9yKGUQIMNCwchnI374oAdTnH3IFLVFx/eQSXwvVA7N3SXNF/wTBh8HbiZz8smodPTZsG6tiw1t1/iUZziNFucASxvVJxwY2sfewCii+3JN2mLtJd2tYvQUst/ulvmB7sKw1njF5UgiK1Ytn65TzROjcHHS6wodqcAAJg4vXq2meGW+cnq95tughGPG4DKeW1PGGvwplOfr4l4gj6bxYtzy/qX45VbzYHbtTbCdmSV1w99w+ZWW/Z63vsHaEichjnyOOD0+TXEdTtjIZvtOM1ofdDtGeU51+M+1Nz0tX5xfTrB42ja8il8oTjInb7lz4m8M1cY6xVYW760yLc28Qex4nmzy5zsBj0lx
|
|
sidebar_class_name: "post api-method"
|
|
info_path: docs/api/llama-stack-specification
|
|
custom_edit_url: null
|
|
---
|
|
|
|
import MethodEndpoint from "@theme/ApiExplorer/MethodEndpoint";
|
|
import ParamsDetails from "@theme/ParamsDetails";
|
|
import RequestSchema from "@theme/RequestSchema";
|
|
import StatusCodes from "@theme/StatusCodes";
|
|
import OperationTabs from "@theme/OperationTabs";
|
|
import TabItem from "@theme/TabItem";
|
|
import Heading from "@theme/Heading";
|
|
|
|
<Heading
|
|
as={"h1"}
|
|
className={"openapi__heading"}
|
|
children={"Create a new session for an agent."}
|
|
>
|
|
</Heading>
|
|
|
|
<MethodEndpoint
|
|
method={"post"}
|
|
path={"/v1/agents/{agent_id}/session"}
|
|
context={"endpoint"}
|
|
>
|
|
|
|
</MethodEndpoint>
|
|
|
|
|
|
|
|
Create a new session for an agent.
|
|
|
|
<Heading
|
|
id={"request"}
|
|
as={"h2"}
|
|
className={"openapi-tabs__heading"}
|
|
children={"Request"}
|
|
>
|
|
</Heading>
|
|
|
|
<ParamsDetails
|
|
parameters={[{"name":"agent_id","in":"path","description":"The ID of the agent to create the session for.","required":true,"schema":{"type":"string"}}]}
|
|
>
|
|
|
|
</ParamsDetails>
|
|
|
|
<RequestSchema
|
|
title={"Body"}
|
|
body={{"content":{"application/json":{"schema":{"type":"object","properties":{"session_name":{"type":"string","description":"The name of the session to create."}},"additionalProperties":false,"required":["session_name"],"title":"CreateAgentSessionRequest"}}},"required":true}}
|
|
>
|
|
|
|
</RequestSchema>
|
|
|
|
<StatusCodes
|
|
id={undefined}
|
|
label={undefined}
|
|
responses={{"200":{"description":"An AgentSessionCreateResponse.","content":{"application/json":{"schema":{"type":"object","properties":{"session_id":{"type":"string","description":"Unique identifier for the created session"}},"additionalProperties":false,"required":["session_id"],"title":"AgentSessionCreateResponse","description":"Response returned when creating a new agent session."}}}},"400":{"description":"The request was invalid or malformed","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":400,"title":"Bad Request","detail":"The request was invalid or malformed"}}}},"429":{"description":"The client has sent too many requests in a given amount of time","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":429,"title":"Too Many Requests","detail":"You have exceeded the rate limit. Please try again later."}}}},"500":{"description":"The server encountered an unexpected error","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":500,"title":"Internal Server Error","detail":"An unexpected error occurred. Our team has been notified."}}}},"default":{"description":"An unexpected error occurred","content":{"application/json":{"schema":{"type":"object","properties":{"status":{"type":"integer","description":"HTTP status code"},"title":{"type":"string","description":"Error title, a short summary of the error which is invariant for an error type"},"detail":{"type":"string","description":"Error detail, a longer human-readable description of the error"},"instance":{"type":"string","description":"(Optional) A URL which can be used to retrieve more information about the specific occurrence of the error"}},"additionalProperties":false,"required":["status","title","detail"],"title":"Error","description":"Error response from the API. Roughly follows RFC 7807."},"example":{"status":0,"title":"Error","detail":"An unexpected error occurred"}}}}}}
|
|
>
|
|
|
|
</StatusCodes>
|