Versions Compared

Key

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

...

When asked to perform search tasks, the agent would correctly invoke the appropriate action group function to fetch the user requested data from Synapse. While it would often take more than 10 seconds for the agent’s LLM (Claude 3 Sonnet by Anthropic in this case) to process and respond to the data, I found the resulting summaries to be useful. Once the desired data was loaded and processed by the agent, the response times improved. The agent was able to provide insightful information about the wiki pages that it digested. A user with a bit of patience would likely find such insights to be useful in understanding some of the complex projects to be found in Synapse.

...

  • Search - The agent can execute Synapse searches on the user’s behalf

  • Entity metadata:

    • AnnotaionAnnotation

    • View/Table schemas

    • ACLs

    • Access Requirements

    • children of containers

  • Table and view query support - Train the agent to execute SQL command on the user’s behalf.

  • User profile information - Provide information about who created/modified Entities

  • Help documentation - The agent should be able to read the help docs on the user’s behalf to answer questions.

  • Add Files to a User’s Download List and help them understand and meet access restrictions.

  • Search and read project's forum posts

  • Anything else we think would be useful.

...

It is difficult to predict exactly how much this feature would cost as number of tokens exchanged with the LLM is not directly in our control, nor is it fully transparent. However, I did look at the bedrock costs under the developer account that I have been using to test the prof of concept application. I have run dozes of experiments and our total cost for Claude 3 Sonnet ( Bedrock Edition) in that account is $0.03.

Web Services

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

AgentChatRequestStart

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.

Object Models

CreateAgentSessionRequest:

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": {
		"agentAccessLevel": {
			"description": "Required. Specifies the access level that the agent will have during this session only.",
			"$ref": "org.sagebionetworks.repo.model.agent.AgentAccessLevel"
		},
		"agentId": {
			"type": "string",
			"description": "Optional. Most users will not use this parameter.  If you are authorized to test experimental agents, provide the ID of the agent you wish to test."
		}
	}
}

AgentAccessLevel:

Code Block
languagejson
{
	"description": "Defines the level of data access that the agent will be given during a session.",
	"name": "AgentAccessLevel",
	"type": "string",
	"enum": [
		{
			"name": "PUBLICLY_ACCESSIBLE",
			"description": "The agent will only have access to ALL data that is already publicly available to anyone."
		},
		{
			"name": "READ_YOUR_PRIVATE_DATA",
			"description": "The agent will have access to ALL data in Synapse that you have 'read' access to.  The agent will also have access to ALL data that is publicly available."
		},
		{
			"name": "WRITE_YOUR_PRIVATE_DATA",
			"description": "Grant the agent permission to make data changes within Synapse on your behalf. Any change the agent makes will be attributed to you.  Under this level the Agent will also have access to ALL data in Synapse that you have 'read' access to.  The agent will also have access to ALL data that is publicly available."
		}
	]
}

AgentSession:

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."
		}
	}
}

ListAgentSessionsRequst:

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."
		}
	}
}

ListAgentSessionsResponse:

Code Block
languagejson
{
	"description": "A single page of agent sessions",
	"properties": {
		"page": {
			"type": "array",
			"items": {
				"$ref": "org.sagebionetworks.repo.model.agent.AgentSession"
			}
		},
		"nextPageToken": {
			"type": "string",
			"description": "Forward this token to get the next page of results."
		}
	}
}

AgentChatRequest:

Code Block
languagejson
{
	"description": "Send a chat message to the Synapse chat agent",
	"implements": [
		{
			"$ref": "org.sagebionetworks.repo.model.asynch.AsynchronousRequestBody"
		}
	],
	"properties": {
		"sessionId": {
			"description": "The sessionId that identifies the conversation with the agent.",
			"type": "string"
		},
		"chatText": {
			"description": "The user's text message to send to the agent.",
			"type": "string"
		}
	}
}

AgentChatResponse:

Code Block
languagejson
{
	"description": "The response to an agent chat request.",
	"implements": [
		{
			"$ref": "org.sagebionetworks.repo.model.asynch.AsynchronousResponseBody"
		}
	],
	"properties": {
		"sessionId": {
			"description": "The sessionId that identifies the conversation with the agent.",
			"type": "string"
		},
		"responseText": {
			"description": "The agent's text response to the user's request",
			"type": "string"
		}
	}
}