API

SDK Methods

Usage details for MemoryEngine and AsyncMemoryEngine.

Need credentials first?

Orbit Cloud: create your API key in Dashboard. Self-hosted: use your JWT token and local base URL.

ingest()

Store one memory event and return an IngestResponse.

ingest.py
engine.ingest(
    content="I still do not understand Python for loops.",
    event_type="user_question",  # optional but recommended
    metadata={"source": "chat"},  # optional
    entity_id="alice",  # strongly recommended
)

retrieve()

Fetch ranked memories for a query. Returns RetrieveResponse with memories list.

retrieve.py
results = engine.retrieve(
    query="What should I know about alice?",
    limit=5,  # default: 10
    entity_id="alice",  # optional filter
    event_type="user_question",  # optional filter
    time_range={"start": "2026-01-01", "end": "2026-02-01"},  # optional
)

for memory in results.memories:
    print(memory.content)
    print(memory.metadata.get("inference_provenance"))

feedback()

Send outcome signal for a memory ID so Orbit can tune ranking and importance.

feedback.py
engine.feedback(
    memory_id="mem_abc123",
    helpful=True,
    outcome_value=1.0,  # optional, range -1.0 to 1.0
)

ingest_batch() / feedback_batch()

Batch operations for high-throughput pipelines.

batch.py
# Batch ingest
responses = engine.ingest_batch([
    {"content": "Lesson 1 complete", "event_type": "learning_progress", "entity_id": "alice"},
    {"content": "Lesson 2 complete", "event_type": "learning_progress", "entity_id": "alice"},
])

# Batch feedback
engine.feedback_batch([
    {"memory_id": "mem_abc", "helpful": True, "outcome_value": 1.0},
    {"memory_id": "mem_def", "helpful": False, "outcome_value": -1.0},
])

status()

Return current usage, quota, and storage stats for the authenticated account.

status.py
status = engine.status()
print(status.memory_count, status.storage_used)

Async client

AsyncMemoryEngine mirrors every method above for async frameworks. Same contract, just await and go.