@engramviz/sdk provides a fail-open TypeScript client around the application boundary where memory becomes model context.
Install
Initialize the project and run the agent through the CLI so the SDK receives its local capture environment:
Create a client
By default the client reads ENGRAM_URL, ENGRAM_TOKEN, and ENGRAM_PROJECT_ID from the environment.
Capture a turn
The callback must return either a string or { output: string }. Engram records the completed or failed turn envelope and correlates it with all memory event IDs emitted inside the callback.
Turn methods
Delivery behavior
Capture is fail-open by default. Network or collector failures are sent to onError and do not fail the agent turn. Set strict: true only when telemetry delivery is part of a test or CI contract.
Do not emit a completed store, delete, or summarize event from a provider acknowledgement that lacks concrete memory IDs. Surface an instrumentation gap instead.