Memory

Get Company Memory

The company's memory: its facts and its people's (subject named per fact), open objections, relationships (people who work there, tools, competitors) and the latest interactions with its leads, each with citations. 404 if the company is missing or deleted.

API key access

Needs the leads:read scope with an API key (ro_pat_...). A signed-in session uses the caller's role.
GET/api/v1/companies/{company_id}/memory
AuthorizationBearer <token>

Access token from /api/v1/auth/login, or an API key (ro_pat_..., RO-176) from /api/v1/workspaces/current/api-keys: the key implies its workspace and needs the route's scope. MCP connectors (/api/v1/mcp only) may use an OAuth access token (ro_oat_..., RO-284).

In: header

Path Parameters

company_idCompany Id
Formatuuid

Query Parameters

max_tokens?Max Tokens

Token cap of text (estimated as characters / 4).

Default600
Range50 <= value <= 4000
q?Q

Rank the facts by closeness to this text (RO-227; only with fact embeddings on and an embedding provider, see query_ranked).

Header Parameters

X-Workspace-Id?X-Workspace-Id

Id of the workspace to act on (must be a member).

Response Body

curl -X GET "http://localhost:8000/api/v1/companies/497f6eca-6276-4993-bfeb-53cbbbba6f08/memory?max_tokens=600&q=string" \  -H "X-Workspace-Id: string"
{
  "subject_type": "lead",
  "subject_id": "80e197be-61ad-4068-b4ff-a483fb5c18f9",
  "subject_label": "string",
  "as_of": "2019-08-24T14:15:22Z",
  "facts": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "subject": "string",
      "subject_type": "lead",
      "predicate": "string",
      "value": "string",
      "object_kind": "string",
      "confidence": 0,
      "observed_at": "2019-08-24T14:15:22Z",
      "evidence": "string",
      "evidence_count": 1,
      "citations": [
        0
      ]
    }
  ],
  "objections": [
    {
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "subject": "string",
      "subject_type": "lead",
      "predicate": "string",
      "value": "string",
      "object_kind": "string",
      "confidence": 0,
      "observed_at": "2019-08-24T14:15:22Z",
      "evidence": "string",
      "evidence_count": 1,
      "citations": [
        0
      ]
    }
  ],
  "relationships": [
    {
      "kind": "string",
      "direction": "out",
      "node_kind": "string",
      "node_label": "string",
      "node_ref_id": "f91546fb-2e3a-4e81-8845-f69266de54ef",
      "weight": 0,
      "since": "2019-08-24T14:15:22Z",
      "last_at": "2019-08-24T14:15:22Z",
      "citations": [
        0
      ]
    }
  ],
  "recent_interactions": [
    {
      "type": "string",
      "channel": "string",
      "occurred_at": "2019-08-24T14:15:22Z",
      "summary": "string",
      "lead_id": "9bddab70-98e6-43a9-8f32-c9788b9de0c0",
      "citations": [
        0
      ]
    }
  ],
  "citations": [
    {
      "n": 0,
      "type": "string",
      "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
      "at": "2019-08-24T14:15:22Z",
      "url": "string",
      "label": "string"
    }
  ],
  "text": "string",
  "token_estimate": 0,
  "truncated": true,
  "has_knowledge": true,
  "query_ranked": false
}
{
  "detail": [
    {
      "loc": [
        "string"
      ],
      "msg": "string",
      "type": "string",
      "input": null,
      "ctx": {}
    }
  ]
}