POST
/
v1
/
teams
/
{teamId}
/
team-memory
/
search
TypeScript client
import { OctosparkClient } from '@octospark/sdk'

const client = new OctosparkClient({
  token: process.env.OCTOSPARK_TOKEN
})

const response = await client.teamMemory.searchTeamMemory({
  teamId: process.env.OCTOSPARK_TEAM_ID ?? "teamId",
  body: {},
})
{
  "data": [
    {
      "entry": {
        "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "teamId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "key": "<string>",
        "scope": "<string>",
        "title": "<string>",
        "description": "<string>",
        "content": "<string>",
        "pinned": true,
        "sourceRef": "<string>",
        "confidence": 123,
        "runId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "actorUserId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
        "verified": true,
        "current": true,
        "embedded": true,
        "createdAt": "<string>"
      },
      "refinedBy": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "contradictedBy": [
        "3c90c3cc-0d44-4b50-8888-8dd25736052a"
      ],
      "score": 123,
      "arms": {
        "key": 123,
        "lexical": 123,
        "vector": 123
      }
    }
  ],
  "degraded": [
    "vector"
  ]
}

Authorizations

Authorization
string
header
required

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

Path Parameters

teamId
string
required

Team (workspace) id (UUID). Discover ids via the list teams endpoint or the agent context.

Body

application/json
query
string
required

What to look for. A key (rule/tone) matches exactly or by prefix, quoted phrases match exactly, and the query is also embedded for semantic search.

Required string length: 1 - 2000
kinds
enum<string>[]

Only search these kinds; omit to search every kind.

What the memory records: company_fact (true about the business), user_preference (how one person likes things done), observation (something noticed, e.g. by an agent) or rule (a standing instruction).

Available options:
company_fact,
user_preference,
observation,
rule
limit
integer

How many results to return, 1-25 (default 8).

Required range: 1 <= x <= 25
includeHistory
boolean

true to also search superseded, replaced and retracted entries (default false: current only).

Response

SearchTeamMemoryResponse

data
object[]
required
degraded
enum<string>[]
required

Arms that could not run: vector when the query could not be embedded.

Available options:
vector