Skip to main content
GET
/
v2
/
workspaces
/
{workspace_id}
/
peers
/
{peer_id}
/
context
Get Peer Context
curl --request GET \
  --url http://localhost:8000/v2/workspaces/{workspace_id}/peers/{peer_id}/context \
  --header 'Authorization: Bearer <token>'
{
  "peer_id": "<string>",
  "target_id": "<string>",
  "representation": {
    "explicit": [
      {
        "created_at": "2023-11-07T05:31:56Z",
        "message_ids": [
          123
        ],
        "session_name": "<string>",
        "content": "<string>"
      }
    ],
    "deductive": [
      {
        "created_at": "2023-11-07T05:31:56Z",
        "message_ids": [
          123
        ],
        "session_name": "<string>",
        "conclusion": "<string>",
        "premises": [
          "<string>"
        ]
      }
    ]
  },
  "peer_card": [
    "<string>"
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

workspace_id
string
required

ID of the workspace

peer_id
string
required

ID of the peer (observer)

Query Parameters

target
string | null

The target peer to get context for. If not provided, returns the peer's own context (self-observation)

search_query
string | null

Optional query to curate the representation around semantic search results

search_top_k
integer | null

Only used if search_query is provided. Number of semantic-search-retrieved observations to include

Required range: 1 <= x <= 100
search_max_distance
number | null

Only used if search_query is provided. Maximum distance for semantically relevant observations

Required range: 0 <= x <= 1
include_most_derived
boolean
default:true

Whether to include the most derived observations in the representation

max_observations
integer | null

Maximum number of observations to include in the representation

Required range: 1 <= x <= 100

Response

Successful Response

Context for a peer, including representation and peer card.

peer_id
string
required

The ID of the peer

target_id
string
required

The ID of the target peer being observed

representation
Representation · object

The working representation of the target peer from the observer's perspective

peer_card
string[] | null

The peer card for the target peer from the observer's perspective