Docs⌘ K  Search
Docs/Memory/Memories
Memory API

Memories

Store, retrieve, update, and delete memories. Memories are the core building blocks of Hebbrix - they store knowledge that your AI can recall later.

app.hebbrix.com/memories/mem_01HM2K
Memory · mem_01HM2K9F4ALong-term
User prefers dark mode and writes Python. Works on project Atlas, a multi-tenant analytics platform. Asked twice about staging deploys this month.
Useralex@acme.com
CollectionProduct docs
CreatedJun 12, 2026
Sourcechat completion
Reinforced4 times
Tierworking → long-term
Extracted entities
Pythondark modeAtlasstaging deploy
One memory, fully resolved. Tier, provenance, reinforcement count, and the entities the graph pulled out, all on one screen.

01. Overview

A memory is a piece of information that you want your AI to remember. This could be:

  • User preferences ("User prefers dark mode")
  • Facts from conversations ("User's birthday is January 15th")
  • Knowledge from documents ("The API rate limit is 100 requests per minute")
  • Any structured or unstructured data you want to store

02. Choose an ingestion path

Choose explicit raw storage when you need to preserve source text, or fact extraction when you need atomic, updatable facts. Neither is universally better for retrieval. The smart /v1/memoriesendpoint defaults to asynchronous extraction; /v1/memories/rawexplicitly skips extraction. Storage, indexing and account quotas still apply.

SurfacePurposeReadiness contract
POST /v1/memoriesGeneral smart write with infer: true; infer: false stores source text.Queued extraction by default. Follow the returned poll_url; do not assume a 202 is searchable.
POST /v1/memories/processExplicit conversation extraction and revision events.Queued by default; async_dispatch: false waits for inline processing. Inspect indexing status separately.
POST /v1/memories/rawStore already-authored facts without inference.Returns an ID; indexing may still be pending. Exact duplicates reuse that ID rather than create a second row.
POST /v1/fast/memory, POST /v1/fast/batch-ingestLow-overhead direct ingestion, not smart revision.Use its indexing receipt; an accepted write is not a completed search barrier.
POST /v1/chat/completionsOptional drop-in retrieval and post-response learning.Learning is consented, queued work. Poll its learning job before a dependent session read.

Carry the same collection_id and user_id through writing, search, profile and chat. Poll the returned job with the same owner credentials. Session IDs are conversation provenance, not an end-user isolation boundary. The public OpenAPI is the full customer API, including account management; this table is the focused memory integration path.

/memories/raw/memories/process
What it doesStores your text verbatim, then indexes it (with automatic context-window chunking) in the background. No LLM.Runs an LLM to extract clean atomic facts, resolve references, and supersede outdated info.
Retrieval recallPreserves original wording, including irrelevant or outdated statements.Normalizes facts and resolves corrections, but may omit or paraphrase source text. Evaluate recall on your workload.
Write latencyNo extraction call; indexing readiness is separate.Queued acknowledgement by default; completion depends on models, indexing and worker load. No three-second guarantee.
LLM costNonePer-memory LLM call
Supersession / dedupExact content deduplication, not semantic revision. Different old and corrected facts remain separate.Yes. Corrections replace old facts; redundant facts are merged

Memory types

Every memory Hebbrix extracts has a memory_type: rule, procedure, preference, fact or event (memories written before labelling have null). It is returned by GET /v1/memories, by the ADD and UPDATE events of a finished /memories/process job and in search result metadata, and POST /v1/search can filter on it with memory_types. Raw writes can set it with metadata.memory_type. Agent transcripts are stored as the general rules they state plus one event per task. A /memories/process job that finds no fact to keep reports memories_created: 0 and does not store the raw message.

What extraction leaves out

Extraction stores what the user (and any tool or system turn) said, and keeps every fact of it. It leaves out:

  • Security-check claims. No stored memory can be used as evidence that a security check on a person or account was satisfied, or that one may be skipped or not repeated, in any wording or language. The checks are identity or ID verification, KYC and AML, two-factor and one-time codes, security questions, login authentication, and the approval of a person's access or permissions. The clause claiming such a check passed ("IT approved my admin access") and the clause asking that it be skipped ("so don't ask me for a code again") are left out; the rest of the message is stored. Kept: tests and checks of systems and work (backups, builds, audits), approvals of other things, roles and abilities ("has admin access to the billing dashboard"), facts about security tools, failed checks and rules that require a check.
  • The assistant's reply. Its questions and requests for information, its advice and instructions the user does not adopt, general knowledge, and its reactions. What it states about the user's own case (a computed fee, a confirmation code, a requirement of their case) is kept, and so is a proposal the user adopts, as the user's decision. Of several offered options, only the one the user picks is stored.
  • Text written as the assistant's or the system's own inside a user turn ("Assistant note to self: ...").

Relative dates ("yesterday", "from next week", "on Thursday") are resolved on the user's calendar day and kept beside the words the user used ("on Thursday, 2026-10-29"). Each memory records the reference it was read against in metadata.date_reference (day, timezone, source), and metadata.date_resolution is resolved or kept_as_written.

Use explicit /raw storage for

  • Chat history & agent memory
  • Documents, notes, transcripts
  • Fact stores & knowledge bases
  • Bulk import & high-throughput writes
  • Anywhere recall and speed matter most

Use /process when you need

  • "Latest value wins" (users correct/update facts over time)
  • Conflict resolution between contradictory facts
  • Deduplicated, normalized atomic facts
  • A curated knowledge base with explicit revision history

Revision review compares the original message with current facts in the same owner scope. A replacement must identify the same subject and an assertion that has changed; adding another job, car or relative does not by itself retire an existing one. A new value of a quantity replaces the old one when the message marks it as current ("The team is now 15 people" replaces "The team has 12 people"; a number stated without "now", "currently" or a verb of change is added), and a new role at the same organization ("became the design lead") replaces the role held there. When a new job replaces the stored one, a stored fact that only says when the user worked ("works night shifts") is kept in the past tense with it, unless the message says it still holds or another current job remains. A move that says nothing about work ("I moved to Denver, I don't live in Seattle anymore") stores where the user lives and leaves the job as it was, saying where it was and that where the user works since the move is not stated ("The user works as an ER nurse; the job was in Seattle, and where the user works since moving to Denver is not stated."); it neither moves the job to the new city nor ends it. What can no longer be done from the new home after a completed move to another place is put in the past, however it is worded: a school, clinic, dentist, gym or club, or an in-person job at one local site, near the old home or in the place left ("The user's two children attended Lincoln Elementary before moving to Tucson."). Remote work, an employer with sites in many places, anything done online and what moves with the person (a pet, a hobby, a diet) stay current, and a move within the same city ("a bigger apartment in Logan Square, still in Chicago") changes nothing the message does not say. A what-if ("What if I moved to Japan next year?") is stored as a hypothetical, never as where the user lives. A revision keeps the memory_type of the record it revises (a revised preference stays a preference), except an event, which may become a state. One write stores one current memory per statement: a memory another of the same write states word for word is not stored again. Reviewed edits bind the exact predecessor and replacement and preserve unaffected clauses: an edit to part of a stored fact updates that fact in place instead of adding a duplicate. Semantic review is fallible: inspect UPDATE events and their predecessor IDs rather than assuming every submitted correction was applied. Session and run IDs record provenance, not new owners.

  • Dates. "Yesterday", "last Friday", "two weeks ago" or "next month" are stored as the dates they mean, resolved against when the message was sent: its timestamp (ISO-8601, per message), else metadata.session_date, else when the request was accepted. Days become dates, weeks "the week of <Monday>", months "<Month> <year>". Events also get metadata.event_date.
  • Forgetting. "Please forget that" or "forget what I said about my divorce" deletes the memories it refers to (and the raw message they came from), reported as DELETE events with memories_deleted. The request is never stored, and "don't forget my mother's birthday" is not a deletion. Permission phrasing is a forget request too: "You can forget the old dentist", "Feel free to forget my old address", "There's no need to remember my old number", "You don't need to keep that" ("You can drop the old couch off" is not). "Remove my old phone number" removes the number that was replaced and keeps the current one; "Forget my phone number" removes the number and its history. A reason given with the request ("I don't use it anymore") is part of the request and is not stored; any other fact in the message is extracted as usual.
  • Implied facts. "For now I'm happy in Lisbon" also stores where the user lives. So do "I commute from Oakland to the office in San Francisco" (lives in Oakland, works in San Francisco), "heading home to Denver" after a trip, and a completed move ("I moved from Seattle to Austin last week", but not "I'm moving to Austin"), also when the same message announces a new job; "I'm a nurse in Leeds" is kept as one fact, so where the user works stays with the role. A stay bounded by a period or purpose (the summer, a project) is not stored as where the user lives. An error followed by its fix also stores the reusable lesson as a procedure.
Readiness is separate from acceptance: a queued extraction or indexing operation is not proof that a fact is searchable. Poll the returned job, or use the direct-write indexing receipt described below.

03. Endpoints

04. Response shape (POST /v1/memories)

By default, POST /v1/memories returns HTTP 202 withjob_id, status and poll_url. This accepts an extraction job; it does not return an inlineresults array. Poll the returned URL with the same credentials until the job completes or fails.

Default asynchronous response
POST /v1/memories  →  HTTP 202
{
  "job_id": "job_example",
  "status": "queued",
  "poll_url": "/v1/memory-jobs/job_example"
}

For direct storage, send infer: false andwait_for_index: true. This skips fact extraction and returns an inline HTTP 200 result. Inspect searchable andindex_wait_status; do not assume a bounded indexing wait succeeded. For inline extraction instead, use /v1/memories/process withasync_dispatch: false.

  • collection_id: the resolved collection the memories were stored in.
  • processing_status "async": the memory row is persisted and indexed in the background. Poll GET /v1/memories/{id} (or use Background Jobs) until it is searchable.
  • created_count, updated_count, skipped_count: a summary derived from the per-row events (ADD / UPDATE / NOOP).
Memory IDs: each results[].id is the PARENT Memory.id, retrievable via GET /v1/memories/{id}. The proposition-style ids you may see in search results (like uuid::subj=...) are a search-layer artifact and are NOT returned by POST /v1/memories.
Direct-write response (not the default extraction response)
POST /v1/memories (infer: false, wait_for_index: true) → HTTP 200
{
  "results": [
    { "id": "mem_abc123", "event": "ADD", "memory": "User prefers dark mode" }
  ],
  "collection_id": "col_default",
  "processing_status": "async",
  "created_count": 1,
  "updated_count": 0,
  "skipped_count": 0
}

05. Destructive operations: dry-run & confirmation

Bulk deletes have two safety controls, so you can preview what a delete covers before it runs, and one missing parameter never widens it.

  • DELETE /v1/memories/all?dry_run=true returns would_delete and would_delete_by_kind and deletes nothing. would_delete_by_kind says what the count is made of: current (listed by GET /v1/memories), historical (superseded, duplicate or history rows, listed with include_superseded=true) and raw_inputs (the conversation text /v1/memories/process keeps for extraction, which is not a memory and is never listed). A delete that runs returns the same breakdown in deleted_by_kind.
  • A delete wider than one end user, agent or run, that is, without collection_id (every collection) or with collection_id alone (every user of it), requires the header X-Hebbrix-Confirm-Destructive: all-memories and is refused with HTTP 428 without it. A delete scoped to a user_id, agent_id or run_id in a collection needs no header; a header that is present must equal all-memories (HTTP 400 otherwise). A dry run never needs it.
  • Profile facts derived from the deleted memories stop being served as soon as the delete returns.
  • The same pattern applies to DELETE /v1/collections/all, whose confirm value is all-collections.

Forgetting an end user

DELETE /v1/memories/all?collection_id=...&user_id=... (or agent_id) forgets that scope. Besides its memories and their search, graph and profile copies, the delete clears the scope's text from the graph ledger, the index outbox, the payloads of /v1/memories/process and chat-learning jobs (and their cached copies), and deletes its corrections and decisions. Jobs accepted before the delete are cancelled (GET /v1/memories/jobs/{job_id} reports cancelled and returns no text), and a write still in flight is refused.

The response carries deletion_receipt: forgotten_at and, per store, a status of deleted, scrubbed (rows kept for bookkeeping, text cleared), pending (removed by the purge the request staged; poll each of outbox_event_ids at /v1/memories/batches/{id}) or retained with its retention: chat sessions until the session or account is deleted, backups up to 35 days, logs 30 days, the idempotency cache 24 hours. Profile snapshots that may hold the scope's facts (taken since its earliest memory) are deleted with it.

Re-check a forget at any time with GET /v1/memories/deletions/{receipt_id} (the receipt's receipt_id). The answer is recomputed from the stores: complete turns true once the purge has removed every memory the scope held, with its search vectors, graph projections and profile facts; memories_awaiting_purge counts what is left.

Python
import requests

BASE = "https://api.hebbrix.com/v1"
H = {"Authorization": "Bearer <your-api-key>"}

# 1) Dry-run first: preview the blast radius, deletes NOTHING
preview = requests.delete(
    f"{BASE}/memories/all",
    headers=H,
    params={"dry_run": "true"},
).json()
# {"deleted_count": 0, "dry_run": True, "would_delete": 1287,
#  "would_delete_by_kind": {"current": 1102, "historical": 141, "raw_inputs": 44}}
print(f"Would delete {preview['would_delete']} memories")

# 2) Confirmed delete: an account-wide delete requires the header
result = requests.delete(
    f"{BASE}/memories/all",
    headers={**H, "X-Hebbrix-Confirm-Destructive": "all-memories"},
).json()
print(f"Deleted {result['deleted_count']} memories")

# Same safety pattern for collections (confirm value "all-collections")
requests.delete(
    f"{BASE}/collections/all",
    headers={**H, "X-Hebbrix-Confirm-Destructive": "all-collections"},
)

06. Code Examples

Create a Memory

The SDK's memories.create() and POST /v1/memories have different defaults: the SDK stores the content verbatim as one memory unless you pass infer=True, while the REST endpoint called without infer extracts facts. Pass infer and wait_for_index explicitly so a call reads the same through the SDK and over HTTP.

Python
import asyncio
from hebbrix import MemoryClient

async def main():
    async with MemoryClient(api_key="mem_sk_...") as client:
        collection = await client.collections.create(name="my-agent")

        # Simple memory, stored verbatim (POST /v1/memories with infer=false)
        # and returned once it is searchable
        memory = await client.memories.create(
            collection_id=collection["id"],
            content="User's favorite color is blue",
            infer=False,
            wait_for_index=True,
        )
        print(memory["results"][0]["id"])

        # Memory with importance + metadata (tags live inside metadata)
        await client.memories.create(
            collection_id=collection["id"],
            content="User completed Python certification on 2024-01-15",
            importance=0.8,
            metadata={
                "tags": ["education", "python"],
                "certification_provider": "Coursera",
                "completion_date": "2024-01-15",
            },
            infer=False,
            wait_for_index=True,
        )

asyncio.run(main())

Process Conversations (fact extraction)

Python
import os
import requests

BASE = "https://api.hebbrix.com/v1"
H = {"Authorization": f"Bearer {os.environ['HEBBRIX_API_KEY']}"}

# POST /v1/memories/process: hand it a chat transcript; the backend
# extracts atomic facts, detects conflicts, and emits ADD/UPDATE/NOOP
# events for each resulting memory. Explicit false requests inline results;
# omit it for the default 202 job receipt and poll the returned poll_url.
r = requests.post(
    f"{BASE}/memories/process",
    headers=H,
    json={
        "async_dispatch": False,
        "messages": [
            {"role": "user", "content": "Hi! My name is Alex and I work at Acme Corp."},
            {"role": "assistant", "content": "Nice to meet you, Alex!"},
        ]
    },
)
result = r.json()

print(f"Facts extracted: {result['facts_extracted']}")
print(f"Created: {result['memories_created']}")
print(f"Updated: {result['memories_updated']}")

# Later, user corrects their name: the old memory is updated
r = requests.post(
    f"{BASE}/memories/process",
    headers=H,
    json={
        "async_dispatch": False,
        "messages": [
            {"role": "user", "content": "Actually, my name is Jordan, not Alex."},
            {"role": "assistant", "content": "No problem, Jordan!"},
        ]
    },
)
result = r.json()
# result["events"][0]["event"] == "UPDATE"
# result["events"][0]["previous_content"] == "Alex is the user's name"

Batch Create

Python
import os
import requests

BASE = "https://api.hebbrix.com/v1"
H = {"Authorization": f"Bearer {os.environ['HEBBRIX_API_KEY']}"}

# POST /v1/memories/batch: create multiple memories in one request (max 100).
# Note: collection_id is top-level, NOT per-memory.
memories = [
    {"content": "User prefers email over phone calls"},
    {"content": "User works in software development"},
    {"content": "User is based in EST timezone"},
]

r = requests.post(
    f"{BASE}/memories/batch",
    headers=H,
    json={
        "memories": memories,
        "collection_id": "YOUR_COLLECTION_ID",
    },
)
result = r.json()
print(f"Created {result['created']} memories")

Large imports: readiness history by history

POST /v1/memories/batch returns a readiness_url, the batch receipt at GET /v1/memories/batches/{event_id}. Every record of a batch is keyword-searchable within seconds of the write, before it is fully indexed: keyword_searchable: true (per memory, and counts.keyword_searchable for the batch) means keyword search already returns the record for the words it contains. Within an account, an import's histories (the end user, agent or run each batch belongs to) then become fully searchable, by meaning as well as by their words, one after another instead of all together near the end; the whole import takes the same time either way. A history someone is asking about moves ahead: a search or Reason request over a scope that is still being indexed gives that scope's pending batches its account's next indexing turns, with no extra call.

Send one end user per batch, so each batch receipt is also that history's readiness. A history is fully searchable when every batch you sent for it reports searchable: true on GET /v1/memories/batches/{event_id}; gate anything that needs the whole history on that. Poll the receipt (or GET /v1/collections/{collection_id}/readiness for a whole import) with the original scope, send an Idempotency-Key with every batch, and never resubmit accepted content because indexing is still running.

The receipt's indexing estimates when the batch will be fully searchable, counting the work queued ahead of it, including other histories and accounts sharing the indexer: estimated_seconds_remaining is the total wall-clock time, estimated_wait_seconds the time until the batch is scheduled and estimated_processing_seconds its own work. When a reliable estimate cannot be made (no throughput measured yet, the indexer paused, a failure), they are null and estimate_unavailable_reason says why. Estimates guide polling; gate on searchable: true, never on an estimate.

indexing.estimate_scope: "searchable" says what those estimates cover: the time until the batch is searchable, never full completion. After that the knowledge-graph, profile and revision stages can still run. Each entry in stages carries its own estimated_seconds_remaining (from the work queued ahead of the batch and that stage's observed rate), or null with estimate_unavailable_reason; a pending stage never reports 0. completion_estimate gives the time until complete: the largest estimate among the stages still open, or null naming the stage without one. Search and Reason never read the graph, so they are safe once searchable is true; graph views and graph search need the graph stage completed.

Readiness and estimate fields

Every readiness and estimate field covers exactly one state. Searchable means every live record has its semantic and keyword vectors (the dense and lexical stages); complete means every requested stage, graph, profile and revision included, has ended. A field that covers searchable says nothing about complete: a batch can be fully searchable, with indexing.estimated_seconds_remaining: 0, indexing.status: "completed" and completed_at set, while complete is false and its graph stage is pending. Wait for complete with completion_estimate.

FieldWhereCoversWhat its values mean
searchableBatch receipt (GET /v1/memories/batches/{event_id}), GET /v1/memories/{memory_id}, write responsesSearchabletrue: search (fast and quality) and Reason can use every live record. Not graph, profile or revision.
keyword_searchable, counts.keyword_searchableBatch receipt, memory, write responses, collection readinessKeyword vectors writtentrue: search returns the records for the words they contain; a paraphrase may still miss them until searchable.
completeBatch receiptCompletetrue: every requested stage is completed or failed; check each stage's failed count. false: completion_estimate.open_stages lists what is pending.
counts.accepted, queued, processing, searchable, failed, deleted, supersededBatch receiptSearchable, per recordDisjoint search-readiness counts; deleted and superseded records leave them. Graph, profile and revision are not counted here.
memories[].state, searchability_reasonBatch receipt, memorySearchable, one recordWhy one record is or is not searchable (searchable, keyword_only, index_pending, index_failed, or the terminal superseded, duplicate, excluded).
stages.<stage>.statusBatch receiptThat stage only: dense, lexical (searchable), graph, profile, revisionpending, completed, failed (with reason) or not_requested; the last three have ended.
stages.<stage>.completed, pending, failedBatch receiptThat stage onlyThe receipt's memories in each state for the stage.
completed_atBatch receiptSearchableWhen the dense and lexical stages completed, the same moment as timings.searchable_at. Not when the batch is complete.
indexing.statusBatch receipt, memory, collection readinessSearchableThe search-indexing delivery: pending, processing, completed or failed. completed means searchable, not complete.
indexing.estimate_scopeBatch receipt, collection readinessAlways searchable: names what every indexing estimate below covers.
indexing.estimated_seconds_remainingBatch receipt, collection readinessSearchableSeconds until searchable. 0: no record is left to index, even while other stages are pending. null: no reliable estimate (estimate_unavailable_reason).
indexing.estimated_wait_seconds, estimated_processing_secondsBatch receipt, collection readinessSearchableThe two parts of that estimate: until the indexer starts on the remaining records, and their own indexing once started.
indexing.records_remaining, observed_records_per_second, work_ahead_characters, queue_open_writes, queue_oldest_age_secondsBatch receipt, collection readinessSearchableWhat the search-readiness estimate is computed from: records left, the observed rate, the text queued ahead, the shared queue.
indexing.estimate_unavailable_reasonBatch receipt, collection readinessSearchableWhy the indexing estimates are null.
stages.<stage>.estimated_seconds_remainingBatch receiptThat stage only (stages.<stage>.estimate_scope is the stage's name)Seconds until the stage ends for the receipt. 0 only when it is completed or not_requested; never 0 while pending; null with estimate_unavailable_reason when no reliable estimate exists or the stage failed.
stages.<stage>.work_ahead, observed_per_secondBatch receiptThat stage onlyThe stage's queue ahead of the receipt and its observed rate, in the stage's own units.
completion_estimate.estimated_seconds_remainingBatch receiptComplete (completion_estimate.scope and estimate_scope are complete)Seconds until complete: the largest pending stage's estimate. 0 only when complete is true; never 0 while a stage is pending; null with estimate_unavailable_reason when a pending stage has no estimate.
completion_estimate.limiting_stage, open_stagesBatch receiptCompleteThe stage that sets the estimate (or the first pending stage without one), and every pending stage.
Retry-After headerBatch receiptSearchable, then completeFollows indexing.estimated_seconds_remaining until searchable, then completion_estimate.estimated_seconds_remaining.
timings.*Batch receiptPer state, for this batchWhen the batch reached each state (accepted_at, keyword_searchable_at, searchable_at, graph_completed_at, revision_completed_at) and the seconds_to_* after acceptance; null until reached. Profile is not timed.
ready, estimated_seconds_remaining, estimate_scopeGET /v1/collections/{collection_id}/readinessSearchable, whole collectionready: true with an estimate of 0: the collection's records are searchable. Not graph, profile or revision: read each batch receipt's complete.
open_writes, oldest_pending_age_seconds, observed_timingsCollection readinessSearchableThe collection's open writes, the age of the oldest pending one and, with ?timings=true, the last hour's observed timings for its writes.
statusGET /v1/memory-jobs/{job_id}Extractionqueued, processing, retrying, indexing_pending (extracted, indexing), completed or failed. completed ends extraction, not the receipt: poll readiness_url for searchable and complete.
indexing on a search responsePOST /v1/search, POST /v1/search/reasonSearchable, the searched scopePending records of the scope at query time (status: "incomplete"), with answer_risk.

Read estimates again on every poll; gate on searchable or complete, never on an estimate reaching zero.

List and Filter (SDK)

Python SDK
import asyncio
import os
from hebbrix import MemoryClient

async def main():
    async with MemoryClient(api_key=os.environ["HEBBRIX_API_KEY"]) as client:
        # --- Explicit page-at-a-time access ---
        page = await client.memories.list_page(limit=50)
        # page = {"items": [...], "next_cursor": str | None,
        #         "has_more": bool, "total_count": int}
        print(f"Showing {len(page['items'])} of {page['total_count']} memories")

        # Fetch the next page if there is one
        if page["has_more"]:
            next_page = await client.memories.list_page(
                cursor=page["next_cursor"], limit=50
            )
            print(f"Next page has {len(next_page['items'])} memories")

        # Filter by collection
        page = await client.memories.list_page(
            collection_id="col_customer_support", limit=20
        )

        # --- Simple "give me everything" iteration ---
        # iter_all follows next_cursor until has_more == False
        async for memory in client.memories.iter_all(collection_id="col_customer_support"):
            print(memory["id"], memory["content"][:80])

asyncio.run(main())

List and Filter (raw HTTP)

Python (raw HTTP)
import os
import requests

BASE = "https://api.hebbrix.com/v1"
H = {"Authorization": f"Bearer {os.environ['HEBBRIX_API_KEY']}"}

# List all memories (cursor-paginated response)
r = requests.get(f"{BASE}/memories", headers=H, params={"limit": 50})
page = r.json()  # {"items": [...], "next_cursor": ..., "has_more": ..., "total_count": ...}

# Paginate through all
cursor = None
while True:
    params = {"limit": 100}
    if cursor:
        params["cursor"] = cursor
    page = requests.get(f"{BASE}/memories", headers=H, params=params).json()
    for memory in page["items"]:
        process(memory)
    if not page.get("has_more") or not page.get("next_cursor"):
        break
    cursor = page["next_cursor"]

07. cURL Examples

POST/v1/memories
curl -X POST "https://api.hebbrix.com/v1/memories" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "content": "User prefers dark mode",
  "tags": [
    "preferences"
  ]
}'
GET/v1/memories?limit=10
curl -X GET "https://api.hebbrix.com/v1/memories?limit=10" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
DELETE/v1/memories/mem_abc123
curl -X DELETE "https://api.hebbrix.com/v1/memories/mem_abc123" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"
POST/v1/memories/process
curl -X POST "https://api.hebbrix.com/v1/memories/process" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "async_dispatch": false,
  "messages": [
    {
      "role": "user",
      "content": "My name is Jordan and I work at Acme Corp."
    },
    {
      "role": "assistant",
      "content": "Nice to meet you, Jordan!"
    }
  ]
}'
POST/v1/memories/bulk-delete
curl -X POST "https://api.hebbrix.com/v1/memories/bulk-delete" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "ids": [
    "mem_abc123",
    "mem_def456"
  ]
}'
DELETE/v1/memories/all
curl -X DELETE "https://api.hebbrix.com/v1/memories/all" \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json"

08. Memory Lifecycle

When you create a memory, Hebbrix automatically:

  1. Embeds the Content. Converts text to vector embeddings for semantic search.
  2. Calculates Importance. Analyzes content to determine relevance and priority.
  3. Extracts Entities. Identifies people, places, concepts and adds to knowledge graph.
  4. Indexes for Search. Adds to BM25 index for keyword matching alongside vectors.
  5. Detects Conflicts. When using /process, checks for conflicting memories and automatically updates or removes outdated information.
Full pipeline propagation: When a memory is updated or deleted, all storage layers are re-indexed: embeddings, vectors, BM25, knowledge graph, propositions, and tiers are all kept in sync automatically.
Ask the docs
reading · this page

Hi! I'm the Hebbrix docs assistant. Ask me anything about this page: setup, code examples, endpoints, pricing, or integrations.