Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Response

url

Request

Description

Authorization

AgentSession

POST /agent/session

CreateAgentSessionRequest

Used to start a new session with the Synapse agent.

A user must be authenticated to make this call.

ListAgentSessionsResponse

POST /agent/sessions/list

ListAgentSessionsRequest

List all of the user’s sessions starting with the latest.

Will only list sessions that belong to the caller.

JobState

POST /agent/chat/async/start

AgentChatRequestStartAgentChatRequest Start

Start an asynchronous job to send a chat message to the Synapse agent.

A user must be authenticated to make this call. The provided sessionId must belong to the caller. The agent’s access level will be determined by the level selected by the users for the session.

AgentChatResponse

GET /agent/chat/async/get/{job_id}

Get the results of an asynchronous job that contains the Synapse agent’s response to a user’s request.

Authentication required. Only the user that started the job can get its results.

...

Code Block
languagejson
{
	"description": "Information about a specific session (conversation) with an agent.  Each session is immutable.  You will need to start a new session if you wish to use a different access level or agentId.",
	"properties": {
		"sessionId": {
			"type": "string",
			"description": "The unique identifier for a conversation with an agent.  The sessionId issued by Synapse when the session is started.  The caller must provided this sessionId with each chat request to identify a specific conversation with an agent.  A sessionId can only be used by the user that created it."
		},
		"agentAccessLevel": {
			"description": "Specifies the access level that the agent will have during this session only.",
			"$ref": "org.sagebionetworks.repo.model.agent.AgentAccessLevel"
		},
		"startedOn": {
			"type": "string",
			"format": "date-time",
			"description": "The date this session was started."
		},
		"agentId": {
			"type": "string",
			"description": "Identifies that agent that will be used for this session.  The default value is null, which indicates that the default agent will be used."
		}
	}
}

ListAgentSessionsRequstListAgentSessionsRequest:

Code Block
languagejson
{
	"description": "Request a single page agent sessions for the current user.  The session are ordered by 'startedOn' descending.",
	"properties": {
		"nextPageToken": {
			"type": "string",
			"description": "Forward the returned 'nextPageToken' to get the next page of results."
		}
	}
}

...