API Reference
Memproof exposes a single entry point — theMemproof class — that wires together policy evaluation, risk assessment, event auditing, and adapter-backed storage behind a small async API.
remember, get, update, forget, search) flow through the same internal pipeline:
- The request is validated and a scope/context is built.
- A risk score is computed by the RiskEngine.
- The PolicyEngine evaluates the configured rules and returns an allow/deny/quarantine/require-approval decision.
- If allowed, the operation is forwarded to the configured MemoryAdapter (LangGraph, OpenAI Sessions, MCP, or in-memory).
- An immutable TrailEvent is written to the Trailproof audit trail for every step.
Core Classes
| Class | Description | Reference |
|---|---|---|
Memproof | Primary entry point. Wraps the full pipeline behind remember(), get(), update(), forget(), and search(). | Memproof Class |
MemproofConfig | Pydantic configuration model. Controls adapter selection, audit trail storage, signing, and external service URLs. | Configuration |
MemoryScope | Identifies the tenant, project, agent, and optional session/subject a memory belongs to. | Models |
OperationContext | Captures who is performing an operation, from which source, and when. | Models |
MemoryRecord | The persisted memory object returned by the adapter. | Models |
MemoryOperationResponse | Response from remember() and update() — includes the operation ID, status, risk assessment, and policy decision. | Models |
OperationStatusResponse | Response from forget(), approve(), deny(), and get_operation_status(). | Models |
MemorySearchResponse | Response from search() — contains ranked MemorySearchHit entries. | Models |
MemproofError | Base exception. All Memproof errors carry a machine-readable code, a human-readable message, and optional details. | Errors |
Quick Start
Enumerations
Memproof defines several enums that appear throughout the API:| Enum | Values | Used In |
|---|---|---|
OperationType | remember, update, forget, search, get | OperationStatusResponse |
OperationStatus | received, pending_approval, committed, blocked, quarantined, failed | Responses |
RiskLevel | low, medium, high, critical | RiskAssessment |
DecisionAction | allow, deny, require_approval, quarantine | PolicyDecision |
| Event types | memproof.pipeline.received, memproof.pipeline.risk_assessed, memproof.pipeline.policy_decided, memproof.pipeline.approval_requested, memproof.pipeline.provider_attempted, memproof.pipeline.committed, memproof.pipeline.blocked | TrailEvent |
ActorType | agent, user, system | OperationContext |