§ Get started
Verify the setup. A four-step sanity check.
Before you wire OctaMem into a production workflow, run this script. It exercises auth, write, read, and audit, the four things that need to work end-to-end.
- Base URL
- platform.octamem.com
- Auth
- Bearer API key
- Primitives
- details / search / add
The probe script
Set OCTA_API_KEY and run this top to bottom. Each of the three steps should print within a couple of seconds. If any step raises, jump to If something fails below.
probe.py
Python
from octamem import OctaMem
octa = OctaMem(api_key="oct_live_...")
# 1. Auth: returns the account, plan, and remaining quota.
print(octa.account.details())
# 2. Round-trip: write then read in the same scope.
record = octa.remember(
content="probe @ 2026-04-12",
type="episodic",
scope="probe",
)
print("wrote:", record.id)
ctx = octa.recall(query="probe", scope="probe", limit=1)
assert ctx.records[0].id == record.id, "round-trip failed"
print("ok: round-trip succeeded")
# 3. Audit: confirm the read shows up in the log.
log = octa.audit.query(scope="probe", limit=2)
print("audit:", [(e.action, e.actor) for e in log.entries])What to look for
account.details()returns plan, storage used, and AI usage for the billing period. If this raisesAuthError, the key is wrong or revoked.- The round-trip
assertpasses. If recall returns no records, the most common cause is a typo inscope. - The audit query returns entries for both the write and the recall. Audit is durable, entries appear within ~200ms.
If something fails
- Read the response body of any failing HTTP request, error envelopes carry a
codeandfixhint. - Confirm the API key prefix matches your environment:
oct_live_for production,oct_test_for sandbox. - Email [email protected] to check for any incident affecting your region.
- See Troubleshooting for the longer list of common errors.