Sign in
Docs
API referenceMemories

API reference

Record what a session decided

Have a token? Manage tokens in the console
POST
/v1/memory/summaries

Record a session summary and its items: what was decided, asked, approved, done and left open. Secrets are cut before anything is kept; an item an active memory already says counts as seen again; an item can supersede an earlier memory.

Needs scope decisions:write.

Authorization

bearer
headerAuthorizationBearer <JWT>

An access token from the identity provider: a person's, or a customer's from the client credentials grant with an API key (developers.inorbit.hr). The gateway verifies it; the audience is iohr-api.

Request Body

iohr.memory.v1.RecordSummaryRequest; path variables override their fields

application/json
  1. body

iohr.memory.v1.RecordSummaryRequest

account_id?string
agent?string
items?array<>
session?string
space_id?string
text?string
trigger?string

Response Body

iohr.memory.v1.RecordSummaryResponse

application/json
  1. response

iohr.memory.v1.RecordSummaryResponse

deduplicated*integer
Formatint32
records*array<>
summary?

iohr.memory.v1.Summary

import { ApiError, Public } from "@inorbithr/sdk";// Reads INORBIT_TOKEN, or INORBIT_KEY_ID and INORBIT_KEY_SECRET.const api = Public.fromEnv();try {  const { value } = await api.memory.recordSummary({    agent: "<agent>",    session: "<session>",    text: "<text>",    trigger: "<trigger>",  });  console.log(value);} catch (e) {  if (!(e instanceof ApiError)) throw e;  console.error(`${e.code}: ${e.problem} (request id ${e.raw.requestId})`);  process.exitCode = 1;}

npm install @inorbithr/sdk. Calls the package's public surface; an operation newer than your package needs the next release or a client generated for your account. The SDKs.

Example Response
{  "deduplicated": 0,  "records": [    {      "account_id": "string",      "agent": "string",      "decided_by": "string",      "kind": "string",      "links": [        "string"      ],      "record_id": "string",      "recorded_at": "string",      "recorded_by": "string",      "redactions": 0,      "score": 0.1,      "seen": 0,      "seen_at": "string",      "session": "string",      "space_id": "string",      "status": "string",      "summary_id": "string",      "superseded_by": "string",      "text": "string",      "topics": [        "string"      ],      "via": "string"    }  ],  "summary": {    "account_id": "string",    "agent": "string",    "record_ids": [      "string"    ],    "recorded_at": "string",    "recorded_by": "string",    "redactions": 0,    "session": "string",    "space_id": "string",    "summary_id": "string",    "text": "string",    "trigger": "string",    "via": "string"  }}