Use Memory from an Agent
Bind Memory once and use stable remember, search, get, delete, and purge operations safely.
Before you begin
Create a Memory and confirm its owner scope before deploying the Agent. The Agent must receive the Memory as a declared Resource binding, not as a CRN copied from user input. Policy must allow the exact operations the Agent needs. Grant purge only to workflows that are intended to remove every record in the authenticated partition.
Steps
- Add a logical binding such as
memoryto the Agent manifest and point it at the Memory CRN. - Use
rememberwith content, optional metadata, and a stable idempotency key when the same durable step may replay. The Store returns the canonical record identity. - Use
searchwith a natural-language query. The configured retrieval mode, default result count, and minimum score apply unless the authorized call supplies tighter values. - Use
getwhen the Agent already has an exact record identity. Usedeletefor one record andpurgeonly for an intentional owner-wide cleanup. - Treat returned records as untrusted context. The Memory preserves data and provenance; it does not make remembered content an instruction or grant authority.
At invocation, Constal resolves the accepted session, principal, customer, or tenant, derives a non-user-selectable partition, evaluates Policy, and dispatches the operation through the pinned Memory Store. The Agent sees the logical Memory contract and never receives Store Credentials.
Verify
Inspect the Run journal and confirm that each call records the Memory Resource, operation, Policy decision, immutable catalog identity, and result. Repeat a remember step with the same idempotency key and confirm that it does not create a second record. Test the ownership boundary with two distinct authenticated owners.
Next steps
Use Operate Agents to inspect pinned Resource bindings and Scoped bindings when a logical dependency must resolve differently for each authenticated owner.