Skip to main content
The Context API lets your agent find relevant content from your users’ connected knowledge sources, then read more of the surrounding text when a result looks promising. Requests are sent to the Agent OS base URL and are authenticated with a Paragon User Token.

How it works

1

Create a Setup Link

Your backend calls Create Setup Link for a Connected User and gets back a hosted URL. Send that URL to your user.
2

Your user connects their apps

The Setup Link opens a hosted page where your user connects the apps they want your agent to search, such as Google Drive, Box, or SharePoint. Apps they’ve already connected show a green check.
The Setup Link app catalog, showing connected apps and available integrations grouped by category
3

Your user chooses what to sync

After connecting an app, your user picks the folders and files to include in their searchable content. The page shows how much content has been discovered and is searchable, and the sync status of each selection.
The Manage synced content page, showing discovery progress and a list of folders with checkboxes and sync status
4

Search the content

Once content is synced and indexed, your agent finds relevant passages with Search Context and reads more of the surrounding text with Read Segment Context.

Endpoints

How search results are organized

Search returns one result per record. A record is one item (for example, a file or page) in one sync. If the same item is included in two syncs, it appears as two results. Each result includes its best matching passages. Every passage has a pointer that you can pass to Read Segment Context to retrieve more of the surrounding text.

Supported sources

You can limit a search to specific sources with the sources field: onedrive, sharepoint, dropbox, box, confluence, googledrive

Respecting user permissions

Search results only include content the user is allowed to access in the source app. Use identity to tell Agent OS which account to apply on each source. The principal can be an email address or a provider-specific user ID. When you use a provider-specific ID rather than an email, you must also set source.