honcho/docs/openapi.json

3475 lines
92 KiB
JSON

{
"openapi": "3.1.0",
"info": {
"title": "Honcho API",
"summary": "The Identity Layer for the Agentic World",
"description": "Honcho is a platform for giving agents user-centric memory and social cognition",
"contact": {
"name": "Plastic Labs",
"url": "https://honcho.dev/",
"email": "hello@plasticlabs.ai"
},
"license": {
"name": "GNU Affero General Public License v3.0",
"identifier": "AGPL-3.0-only",
"url": "https://github.com/plastic-labs/honcho/blob/main/LICENSE"
},
"version": "2.0.0"
},
"servers": [
{
"url": "http://localhost:8000",
"description": "Local Development Server"
},
{
"url": "https://demo.honcho.dev",
"description": "Demo Server"
},
{
"url": "https://api.honcho.dev",
"description": "Production SaaS Platform"
}
],
"paths": {
"/v2/workspaces": {
"post": {
"tags": [
"workspaces"
],
"summary": "Get Or Create Workspace",
"description": "Get a Workspace by ID.\n\nIf workspace_id is provided as a query parameter, it uses that (must match JWT workspace_id).\nOtherwise, it uses the workspace_id from the JWT token.",
"operationId": "get_or_create_workspace_v2_workspaces_post",
"requestBody": {
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkspaceCreate",
"description": "Workspace creation parameters"
}
}
},
"required": true
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Workspace"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
},
"security": [
{
"HTTPBearer": []
},
{}
]
}
},
"/v2/workspaces/list": {
"post": {
"tags": [
"workspaces"
],
"summary": "Get All Workspaces",
"description": "Get all Workspaces",
"operationId": "get_all_workspaces_v2_workspaces_list_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/WorkspaceGet"
},
{
"type": "null"
}
],
"description": "Filtering and pagination options for the workspaces list",
"title": "Options"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Workspace_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}": {
"put": {
"tags": [
"workspaces"
],
"summary": "Update Workspace",
"description": "Update a Workspace",
"operationId": "update_workspace_v2_workspaces__workspace_id__put",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace to update",
"title": "Workspace Id"
},
"description": "ID of the workspace to update"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/WorkspaceUpdate",
"description": "Updated workspace parameters"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Workspace"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/search": {
"post": {
"tags": [
"workspaces"
],
"summary": "Search Workspace",
"description": "Search a Workspace",
"operationId": "search_workspace_v2_workspaces__workspace_id__search_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace to search",
"title": "Workspace Id"
},
"description": "ID of the workspace to search"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "string",
"description": "Search query",
"title": "Query"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Message_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/list": {
"post": {
"tags": [
"peers"
],
"summary": "Get Peers",
"description": "Get All Peers for a Workspace",
"operationId": "get_peers_v2_workspaces__workspace_id__peers_list_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/PeerGet"
},
{
"type": "null"
}
],
"description": "Filtering options for the peers list",
"title": "Options"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Peer_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers": {
"post": {
"tags": [
"peers"
],
"summary": "Get Or Create Peer",
"description": "Get a Peer by ID\n\nIf peer_id is provided as a query parameter, it uses that (must match JWT workspace_id).\nOtherwise, it uses the peer_id from the JWT token.",
"operationId": "get_or_create_peer_v2_workspaces__workspace_id__peers_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PeerCreate",
"description": "Peer creation parameters"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Peer"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/{peer_id}": {
"put": {
"tags": [
"peers"
],
"summary": "Update Peer",
"description": "Update a Peer's name and/or metadata",
"operationId": "update_peer_v2_workspaces__workspace_id__peers__peer_id__put",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer to update",
"title": "Peer Id"
},
"description": "ID of the peer to update"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PeerUpdate",
"description": "Updated peer parameters"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Peer"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/{peer_id}/sessions": {
"post": {
"tags": [
"peers"
],
"summary": "Get Sessions For Peer",
"description": "Get All Sessions for a Peer",
"operationId": "get_sessions_for_peer_v2_workspaces__workspace_id__peers__peer_id__sessions_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionGet"
},
{
"type": "null"
}
],
"description": "Filtering options for the sessions list",
"title": "Options"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Session_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/{peer_id}/chat": {
"post": {
"tags": [
"peers"
],
"summary": "Chat",
"operationId": "chat_v2_workspaces__workspace_id__peers__peer_id__chat_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DialecticOptions",
"description": "Dialectic Endpoint Parameters"
}
}
}
},
"responses": {
"200": {
"description": "Response to a question informed by Honcho's User Representation",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/DialecticResponse"
}
},
"text/event-stream": {}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/{peer_id}/messages": {
"post": {
"tags": [
"peers"
],
"summary": "Create Messages For Peer",
"description": "Create messages for a peer",
"operationId": "create_messages_for_peer_v2_workspaces__workspace_id__peers__peer_id__messages_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageBatchCreate",
"description": "Batch of messages to create"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
},
"title": "Response Create Messages For Peer V2 Workspaces Workspace Id Peers Peer Id Messages Post"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/{peer_id}/messages/list": {
"post": {
"tags": [
"peers"
],
"summary": "Get Messages For Peer",
"description": "Get all messages for a peer",
"operationId": "get_messages_for_peer_v2_workspaces__workspace_id__peers__peer_id__messages_list_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
},
{
"name": "reverse",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Whether to reverse the order of results",
"default": false,
"title": "Reverse"
},
"description": "Whether to reverse the order of results"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/MessageGet"
},
{
"type": "null"
}
],
"description": "Filtering options for the messages list",
"title": "Options"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Message_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/{peer_id}/representation": {
"post": {
"tags": [
"peers"
],
"summary": "Get Working Representation",
"description": "Get a peer's working representation for a session.\n\nIf a session_id is provided in the body, we get the working representation of the peer in that session.\n\nIn the current implementation, we don't offer representations of `target` so that parameter is ignored.\nFuture releases will allow for this.",
"operationId": "get_working_representation_v2_workspaces__workspace_id__peers__peer_id__representation_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/PeerRepresentationGet",
"description": "Options for getting the peer representation"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": true,
"title": "Response Get Working Representation V2 Workspaces Workspace Id Peers Peer Id Representation Post"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/peers/{peer_id}/search": {
"post": {
"tags": [
"peers"
],
"summary": "Search Peer",
"description": "Search a Peer",
"operationId": "search_peer_v2_workspaces__workspace_id__peers__peer_id__search_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "string",
"description": "Search query",
"title": "Query"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Message_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions": {
"post": {
"tags": [
"sessions"
],
"summary": "Get Or Create Session",
"description": "Get a specific session in a workspace.\n\nIf session_id is provided as a query parameter, it verifies the session is in the workspace.\nOtherwise, it uses the session_id from the JWT token for verification.",
"operationId": "get_or_create_session_v2_workspaces__workspace_id__sessions_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionCreate",
"description": "Session creation parameters"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/list": {
"post": {
"tags": [
"sessions"
],
"summary": "Get Sessions",
"description": "Get All Sessions in a Workspace",
"operationId": "get_sessions_v2_workspaces__workspace_id__sessions_list_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/SessionGet"
},
{
"type": "null"
}
],
"description": "Filtering and pagination options for the sessions list",
"title": "Options"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Session_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}": {
"put": {
"tags": [
"sessions"
],
"summary": "Update Session",
"description": "Update the metadata of a Session",
"operationId": "update_session_v2_workspaces__workspace_id__sessions__session_id__put",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session to update",
"title": "Session Id"
},
"description": "ID of the session to update"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionUpdate",
"description": "Updated session parameters"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"sessions"
],
"summary": "Delete Session",
"description": "Delete a session by marking it as inactive",
"operationId": "delete_session_v2_workspaces__workspace_id__sessions__session_id__delete",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session to delete",
"title": "Session Id"
},
"description": "ID of the session to delete"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/clone": {
"get": {
"tags": [
"sessions"
],
"summary": "Clone Session",
"description": "Clone a session, optionally up to a specific message",
"operationId": "clone_session_v2_workspaces__workspace_id__sessions__session_id__clone_get",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session to clone",
"title": "Session Id"
},
"description": "ID of the session to clone"
},
{
"name": "message_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "Message ID to cut off the clone at",
"title": "Message Id"
},
"description": "Message ID to cut off the clone at"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/peers": {
"post": {
"tags": [
"sessions"
],
"summary": "Add Peers To Session",
"description": "Add peers to a session",
"operationId": "add_peers_to_session_v2_workspaces__workspace_id__sessions__session_id__peers_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/SessionPeerConfig"
},
"description": "List of peer IDs to add to the session",
"title": "Peers"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"put": {
"tags": [
"sessions"
],
"summary": "Set Session Peers",
"description": "Set the peers in a session",
"operationId": "set_session_peers_v2_workspaces__workspace_id__sessions__session_id__peers_put",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "object",
"additionalProperties": {
"$ref": "#/components/schemas/SessionPeerConfig"
},
"description": "List of peer IDs to set for the session",
"title": "Peers"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"delete": {
"tags": [
"sessions"
],
"summary": "Remove Peers From Session",
"description": "Remove peers from a session",
"operationId": "remove_peers_from_session_v2_workspaces__workspace_id__sessions__session_id__peers_delete",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"type": "string"
},
"description": "List of peer IDs to remove from the session",
"title": "Peers"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Session"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"get": {
"tags": [
"sessions"
],
"summary": "Get Session Peers",
"description": "Get peers from a session",
"operationId": "get_session_peers_v2_workspaces__workspace_id__sessions__session_id__peers_get",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Peer_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/peers/{peer_id}/config": {
"get": {
"tags": [
"sessions"
],
"summary": "Get Peer Config",
"description": "Get the configuration for a peer in a session",
"operationId": "get_peer_config_v2_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_get",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionPeerConfig"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"post": {
"tags": [
"sessions"
],
"summary": "Set Peer Config",
"description": "Set the configuration for a peer in a session",
"operationId": "set_peer_config_v2_workspaces__workspace_id__sessions__session_id__peers__peer_id__config_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "peer_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the peer",
"title": "Peer Id"
},
"description": "ID of the peer"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionPeerConfig",
"description": "Peer configuration"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/context": {
"get": {
"tags": [
"sessions"
],
"summary": "Get Session Context",
"description": "Produce a context object from the session. The caller provides a token limit which the entire context must fit into.\nTo do this, we allocate 40% of the token limit to the summary, and 60% to recent messages -- as many as can fit.\nIf the caller does not want a summary, we allocate all the tokens to recent messages.\nThe default token limit if not provided is 2048. (TODO: make this configurable)",
"operationId": "get_session_context_v2_workspaces__workspace_id__sessions__session_id__context_get",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "tokens",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "integer"
},
{
"type": "null"
}
],
"description": "Number of tokens to use for the context. Includes summary if set to true",
"title": "Tokens"
},
"description": "Number of tokens to use for the context. Includes summary if set to true"
},
{
"name": "summary",
"in": "query",
"required": false,
"schema": {
"type": "boolean",
"description": "Whether to summarize the session history prior to the cutoff message",
"default": false,
"title": "Summary"
},
"description": "Whether to summarize the session history prior to the cutoff message"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/SessionContext"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/search": {
"post": {
"tags": [
"sessions"
],
"summary": "Search Session",
"description": "Search a Session",
"operationId": "search_session_v2_workspaces__workspace_id__sessions__session_id__search_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"type": "string",
"description": "Search query",
"title": "Query"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Message_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/messages/": {
"post": {
"tags": [
"messages"
],
"summary": "Create Messages For Session",
"operationId": "create_messages_for_session_v2_workspaces__workspace_id__sessions__session_id__messages__post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageBatchCreate",
"description": "Batch of messages to create"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"type": "array",
"items": {
"$ref": "#/components/schemas/Message"
},
"title": "Response Create Messages For Session V2 Workspaces Workspace Id Sessions Session Id Messages Post"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/messages/list": {
"post": {
"tags": [
"messages"
],
"summary": "Get Messages",
"description": "Get all messages for a session",
"operationId": "get_messages_v2_workspaces__workspace_id__sessions__session_id__messages_list_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "reverse",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"description": "Whether to reverse the order of results",
"default": false,
"title": "Reverse"
},
"description": "Whether to reverse the order of results"
},
{
"name": "page",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"minimum": 1,
"description": "Page number",
"default": 1,
"title": "Page"
},
"description": "Page number"
},
{
"name": "size",
"in": "query",
"required": false,
"schema": {
"type": "integer",
"maximum": 100,
"minimum": 1,
"description": "Page size",
"default": 50,
"title": "Size"
},
"description": "Page size"
}
],
"requestBody": {
"content": {
"application/json": {
"schema": {
"anyOf": [
{
"$ref": "#/components/schemas/MessageGet"
},
{
"type": "null"
}
],
"description": "Filtering options for the messages list",
"title": "Options"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Page_Message_"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/workspaces/{workspace_id}/sessions/{session_id}/messages/{message_id}": {
"get": {
"tags": [
"messages"
],
"summary": "Get Message",
"description": "Get a Message by ID",
"operationId": "get_message_v2_workspaces__workspace_id__sessions__session_id__messages__message_id__get",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "message_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the message to retrieve",
"title": "Message Id"
},
"description": "ID of the message to retrieve"
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
},
"put": {
"tags": [
"messages"
],
"summary": "Update Message",
"description": "Update the metadata of a Message",
"operationId": "update_message_v2_workspaces__workspace_id__sessions__session_id__messages__message_id__put",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the workspace",
"title": "Workspace Id"
},
"description": "ID of the workspace"
},
{
"name": "session_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the session",
"title": "Session Id"
},
"description": "ID of the session"
},
{
"name": "message_id",
"in": "path",
"required": true,
"schema": {
"type": "string",
"description": "ID of the message to update",
"title": "Message Id"
},
"description": "ID of the message to update"
}
],
"requestBody": {
"required": true,
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/MessageUpdate",
"description": "Updated message parameters"
}
}
}
},
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/Message"
}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
},
"/v2/keys": {
"post": {
"tags": [
"keys"
],
"summary": "Create Key",
"description": "Create a new Key",
"operationId": "create_key_v2_keys_post",
"security": [
{
"HTTPBearer": []
},
{}
],
"parameters": [
{
"name": "workspace_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ID of the workspace to scope the key to",
"title": "Workspace Id"
},
"description": "ID of the workspace to scope the key to"
},
{
"name": "peer_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ID of the peer to scope the key to",
"title": "Peer Id"
},
"description": "ID of the peer to scope the key to"
},
{
"name": "session_id",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"description": "ID of the session to scope the key to",
"title": "Session Id"
},
"description": "ID of the session to scope the key to"
},
{
"name": "expires_at",
"in": "query",
"required": false,
"schema": {
"anyOf": [
{
"type": "string",
"format": "date-time"
},
{
"type": "null"
}
],
"title": "Expires At"
}
}
],
"responses": {
"200": {
"description": "Successful Response",
"content": {
"application/json": {
"schema": {}
}
}
},
"422": {
"description": "Validation Error",
"content": {
"application/json": {
"schema": {
"$ref": "#/components/schemas/HTTPValidationError"
}
}
}
}
}
}
}
},
"components": {
"schemas": {
"DialecticOptions": {
"properties": {
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id",
"description": "ID of the session to scope the representation to"
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Target",
"description": "Optional peer to get the representation for, from the perspective of this peer"
},
"queries": {
"anyOf": [
{
"type": "string"
},
{
"items": {
"type": "string"
},
"type": "array"
}
],
"title": "Queries"
},
"stream": {
"type": "boolean",
"title": "Stream",
"default": false
}
},
"type": "object",
"required": [
"queries"
],
"title": "DialecticOptions"
},
"DialecticResponse": {
"properties": {
"content": {
"type": "string",
"title": "Content"
}
},
"type": "object",
"required": [
"content"
],
"title": "DialecticResponse"
},
"HTTPValidationError": {
"properties": {
"detail": {
"items": {
"$ref": "#/components/schemas/ValidationError"
},
"type": "array",
"title": "Detail"
}
},
"type": "object",
"title": "HTTPValidationError"
},
"Message": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"content": {
"type": "string",
"title": "Content"
},
"peer_id": {
"type": "string",
"title": "Peer Id"
},
"session_id": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Session Id"
},
"metadata": {
"additionalProperties": true,
"type": "object",
"title": "Metadata"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"workspace_id": {
"type": "string",
"title": "Workspace Id"
},
"token_count": {
"type": "integer",
"title": "Token Count"
}
},
"type": "object",
"required": [
"id",
"content",
"peer_id",
"session_id",
"created_at",
"workspace_id",
"token_count"
],
"title": "Message"
},
"MessageBatchCreate": {
"properties": {
"messages": {
"items": {
"$ref": "#/components/schemas/MessageCreate"
},
"type": "array",
"maxItems": 100,
"minItems": 1,
"title": "Messages"
}
},
"type": "object",
"required": [
"messages"
],
"title": "MessageBatchCreate",
"description": "Schema for batch message creation with a max of 100 messages"
},
"MessageCreate": {
"properties": {
"content": {
"type": "string",
"maxLength": 50000,
"minLength": 0,
"title": "Content"
},
"peer_id": {
"type": "string",
"title": "Peer Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
}
},
"type": "object",
"required": [
"content",
"peer_id"
],
"title": "MessageCreate"
},
"MessageGet": {
"properties": {
"filter": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Filter"
}
},
"type": "object",
"title": "MessageGet"
},
"MessageUpdate": {
"properties": {
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
}
},
"type": "object",
"title": "MessageUpdate"
},
"Page_Message_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/Message"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"minimum": 0.0,
"title": "Total"
},
"page": {
"type": "integer",
"minimum": 1.0,
"title": "Page"
},
"size": {
"type": "integer",
"minimum": 1.0,
"title": "Size"
},
"pages": {
"type": "integer",
"minimum": 0.0,
"title": "Pages"
}
},
"type": "object",
"required": [
"items",
"total",
"page",
"size"
],
"title": "Page[Message]"
},
"Page_Peer_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/Peer"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"minimum": 0.0,
"title": "Total"
},
"page": {
"type": "integer",
"minimum": 1.0,
"title": "Page"
},
"size": {
"type": "integer",
"minimum": 1.0,
"title": "Size"
},
"pages": {
"type": "integer",
"minimum": 0.0,
"title": "Pages"
}
},
"type": "object",
"required": [
"items",
"total",
"page",
"size"
],
"title": "Page[Peer]"
},
"Page_Session_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/Session"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"minimum": 0.0,
"title": "Total"
},
"page": {
"type": "integer",
"minimum": 1.0,
"title": "Page"
},
"size": {
"type": "integer",
"minimum": 1.0,
"title": "Size"
},
"pages": {
"type": "integer",
"minimum": 0.0,
"title": "Pages"
}
},
"type": "object",
"required": [
"items",
"total",
"page",
"size"
],
"title": "Page[Session]"
},
"Page_Workspace_": {
"properties": {
"items": {
"items": {
"$ref": "#/components/schemas/Workspace"
},
"type": "array",
"title": "Items"
},
"total": {
"type": "integer",
"minimum": 0.0,
"title": "Total"
},
"page": {
"type": "integer",
"minimum": 1.0,
"title": "Page"
},
"size": {
"type": "integer",
"minimum": 1.0,
"title": "Size"
},
"pages": {
"type": "integer",
"minimum": 0.0,
"title": "Pages"
}
},
"type": "object",
"required": [
"items",
"total",
"page",
"size"
],
"title": "Page[Workspace]"
},
"Peer": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"workspace_id": {
"type": "string",
"title": "Workspace Id"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
},
"metadata": {
"additionalProperties": true,
"type": "object",
"title": "Metadata"
},
"configuration": {
"additionalProperties": true,
"type": "object",
"title": "Configuration"
}
},
"type": "object",
"required": [
"id",
"workspace_id",
"created_at"
],
"title": "Peer"
},
"PeerCreate": {
"properties": {
"id": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"pattern": "^[a-zA-Z0-9_-]+$",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
},
"configuration": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Configuration"
}
},
"type": "object",
"required": [
"id"
],
"title": "PeerCreate"
},
"PeerGet": {
"properties": {
"filter": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Filter"
}
},
"type": "object",
"title": "PeerGet"
},
"PeerRepresentationGet": {
"properties": {
"session_id": {
"type": "string",
"title": "Session Id",
"description": "Get the working representation within this session"
},
"target": {
"anyOf": [
{
"type": "string"
},
{
"type": "null"
}
],
"title": "Target",
"description": "Optional peer ID to get the representation for, from the perspective of this peer"
}
},
"type": "object",
"required": [
"session_id"
],
"title": "PeerRepresentationGet"
},
"PeerUpdate": {
"properties": {
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
},
"configuration": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Configuration"
}
},
"type": "object",
"title": "PeerUpdate"
},
"Session": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"is_active": {
"type": "boolean",
"title": "Is Active"
},
"workspace_id": {
"type": "string",
"title": "Workspace Id"
},
"metadata": {
"additionalProperties": true,
"type": "object",
"title": "Metadata"
},
"configuration": {
"additionalProperties": true,
"type": "object",
"title": "Configuration"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"is_active",
"workspace_id",
"created_at"
],
"title": "Session"
},
"SessionContext": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"messages": {
"items": {
"$ref": "#/components/schemas/Message"
},
"type": "array",
"title": "Messages"
},
"summary": {
"type": "string",
"title": "Summary"
}
},
"type": "object",
"required": [
"id",
"messages",
"summary"
],
"title": "SessionContext"
},
"SessionCreate": {
"properties": {
"id": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"pattern": "^[a-zA-Z0-9_-]+$",
"title": "Id"
},
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
},
"peers": {
"anyOf": [
{
"additionalProperties": {
"$ref": "#/components/schemas/SessionPeerConfig"
},
"type": "object"
},
{
"type": "null"
}
],
"title": "Peers"
},
"configuration": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Configuration"
}
},
"type": "object",
"required": [
"id"
],
"title": "SessionCreate"
},
"SessionGet": {
"properties": {
"filter": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Filter"
},
"is_active": {
"type": "boolean",
"title": "Is Active",
"default": false
}
},
"type": "object",
"title": "SessionGet"
},
"SessionPeerConfig": {
"properties": {
"observe_others": {
"type": "boolean",
"title": "Observe Others",
"description": "Whether this peer should form a session-level theory-of-mind representation of other peers in the session",
"default": false
},
"observe_me": {
"anyOf": [
{
"type": "boolean"
},
{
"type": "null"
}
],
"title": "Observe Me",
"description": "Whether other peers in this session should try to form a session-level theory-of-mind representation of this peer"
}
},
"type": "object",
"title": "SessionPeerConfig"
},
"SessionUpdate": {
"properties": {
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
},
"configuration": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Configuration"
}
},
"type": "object",
"title": "SessionUpdate"
},
"ValidationError": {
"properties": {
"loc": {
"items": {
"anyOf": [
{
"type": "string"
},
{
"type": "integer"
}
]
},
"type": "array",
"title": "Location"
},
"msg": {
"type": "string",
"title": "Message"
},
"type": {
"type": "string",
"title": "Error Type"
}
},
"type": "object",
"required": [
"loc",
"msg",
"type"
],
"title": "ValidationError"
},
"Workspace": {
"properties": {
"id": {
"type": "string",
"title": "Id"
},
"metadata": {
"additionalProperties": true,
"type": "object",
"title": "Metadata"
},
"configuration": {
"additionalProperties": true,
"type": "object",
"title": "Configuration"
},
"created_at": {
"type": "string",
"format": "date-time",
"title": "Created At"
}
},
"type": "object",
"required": [
"id",
"created_at"
],
"title": "Workspace"
},
"WorkspaceCreate": {
"properties": {
"id": {
"type": "string",
"maxLength": 100,
"minLength": 1,
"pattern": "^[a-zA-Z0-9_-]+$",
"title": "Id"
},
"metadata": {
"additionalProperties": true,
"type": "object",
"title": "Metadata",
"default": {}
},
"configuration": {
"additionalProperties": true,
"type": "object",
"title": "Configuration",
"default": {}
}
},
"type": "object",
"required": [
"id"
],
"title": "WorkspaceCreate"
},
"WorkspaceGet": {
"properties": {
"filter": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Filter"
}
},
"type": "object",
"title": "WorkspaceGet"
},
"WorkspaceUpdate": {
"properties": {
"metadata": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Metadata"
},
"configuration": {
"anyOf": [
{
"additionalProperties": true,
"type": "object"
},
{
"type": "null"
}
],
"title": "Configuration"
}
},
"type": "object",
"title": "WorkspaceUpdate"
}
},
"securitySchemes": {
"HTTPBearer": {
"type": "http",
"scheme": "bearer"
}
}
}
}