Hosted memory search
Search hosted Team OS memory.
When the local workspace is signed in to Team OS, memory recall uses the hosted API by default.
Recall is layered. It searches first. If a result is too short, it can expand
that result into nearby source context. Transcript drill-down is local-only for
now because raw transcripts stay in context/transcripts/.
Run recall from command-centre/:
npm run memory:recall -- "onboarding notes"Search a client you can access:
npm run memory:recall -- "onboarding notes" --client acmeThis adds that client's memory to the default system, Team, and private memory layers. It does not limit the search to client memory only.
The search step uses --embedding-mode auto by default. In auto mode, the CLI
checks /v1/health. If the server has server-side search embeddings enabled,
the CLI sends query text only. Otherwise, it sends a client-made BGE-M3 query
embedding.
Force one path when you need to test it:
npm run memory:recall -- "onboarding notes" --embedding-mode server
npm run memory:recall -- "onboarding notes" --embedding-mode clientExpand a result from the same scope:
npm run memory:recall -- --expand <chunk-id> --client acmeUse local transcript drill-down only when you need exact wording, a command, or output from the raw transcript:
npm run memory:recall -- --transcript <chunk-id> --client acme --localMemory mode
TEAM_OS_MEMORY_MODE controls routing:
| Value | Meaning |
|---|---|
auto | Default. Use the hosted API when signed in, otherwise use local PGLite. |
team | Require the hosted Team OS API. Fail if login or server access is unavailable. |
local | Use local PGLite even when signed in. This is useful for offline work. |
Direct API call
Use memory:recall for normal work. Custom clients can call the hosted API
directly. They can send a BGE-M3 query embedding, or they can ask the server to
create the query embedding when the API has MEMORY_API_SERVER_EMBEDDINGS=1.
The examples below expect TEAM_OS_API_URL and TEAM_OS_SESSION_TOKEN to be
injected securely into the current process. Do not open the saved Team OS
profile to copy its session token.
Client-provided embedding:
$body = @{
query = "onboarding notes"
queryEmbedding = @("<1024 BGE-M3 numbers>")
embeddingModel = "bge-m3"
embeddingDim = 1024
topK = 5
scope = @{
clientId = "acme"
include = @("team", "client")
}
storeQueryText = $false
} | ConvertTo-Json -Depth 6
Invoke-RestMethod `
-Uri "$env:TEAM_OS_API_URL/v1/memory/search" `
-Method Post `
-Headers @{ Authorization = "Bearer $env:TEAM_OS_SESSION_TOKEN" } `
-ContentType "application/json" `
-Body $bodyServer-side embedding:
$body = @{
query = "onboarding notes"
embeddingMode = "server"
topK = 5
scope = @{
clientId = "acme"
include = @("team", "client")
}
storeQueryText = $false
} | ConvertTo-Json -Depth 6
Invoke-RestMethod `
-Uri "$env:TEAM_OS_API_URL/v1/memory/search" `
-Method Post `
-Headers @{ Authorization = "Bearer $env:TEAM_OS_SESSION_TOKEN" } `
-ContentType "application/json" `
-Body $bodyIf server-side embeddings are disabled, the API returns
server_embedding_disabled.
The server resolves the real Team and user from the authenticated request. It
replaces body Team and user IDs with that trusted principal. include and
clientId can narrow the search, but request-body IDs cannot widen access.
For the full recall flow, see Layered recall. For endpoint details, see Hosted Team OS API.
Next: File sync model
