Install
openclaw skills install @psyb0t/go-mem0Unofficial Go client for the Mem0 Platform API, generated with oapi-codegen. Package mem0 (github.com/psyb0t/go-mem0) provides mem0.NewClientWithResponses with a typed ...WithResponse method for every endpoint, covering adding, searching, listing, updating and deleting memories (V1, V2 and V3), entities, events, exports, organizations, projects, webhooks, profiles and Dream operations. Auth is an API key in the Authorization header with a Token prefix, added through a request editor. Use when Go code needs Mem0 hosted memory or already imports go-mem0.
openclaw skills install @psyb0t/go-mem0Unofficial, typed Go client for the Mem0 Platform API, in package mem0 at the module root.
For install, operations, pagination and response fields, see references/setup.md.
Authorization: Token <key> with a request editor. Read the key from MEM0_API_KEY; never hardcode, commit or log it, or print a request containing the header.https://api.mem0.ai. Memory content, queries and metadata leave the machine in API requests. Scope filters to the intended user, agent, app or run, and send only the data the task requires.github.com/psyb0t/go-mem0.AGENTS.md in the repository.The reference covers a few calls. Every operation in the spec has a generated method, and the spec's descriptions are on them as Go doc comments. Look names and fields up instead of guessing. After go get github.com/psyb0t/go-mem0, from inside your module:
go doc github.com/psyb0t/go-mem0 ClientWithResponsesInterface # every endpoint method
go doc github.com/psyb0t/go-mem0 MemoriesSearchV3JSONRequestBody # one method, params type or model
go doc -all github.com/psyb0t/go-mem0 # the whole package
The same documentation is at https://pkg.go.dev/github.com/psyb0t/go-mem0.
Method names come from the spec's operation IDs. <OperationId>WithResponse takes the context, then the path parameters in order, then *<OperationId>Params when the operation has query or header parameters, then the request body when it has one. The JSON200 field (or JSON202 and so on, per declared status) holds the decoded body; it is nil for any other status.
Construct mem0.NewClientWithResponses with base URL https://api.mem0.ai and mem0.WithRequestEditorFn setting the Authorization header to Token followed by the key from MEM0_API_KEY. The complete compiling example is in the root README and example_test.go.
Use PingReadWithResponse to check authentication. The error return covers transport and response-decoding failures. HTTP errors can return a nil Go error. Check StatusCode() and the expected success field before using data; for ping, JSON200 is success and JSON401 carries an authentication error.
For memory search, prefer MemoriesSearchV3WithResponse with MemoriesSearchV3JSONRequestBody. Its required Query is a string and Filters is map[string]interface{} containing at least one entity ID. A successful response has JSON200.Results. The V2 search endpoint is deprecated in the source spec and returns an array instead.
The client does not validate filters, implement retries or enforce authorization. Keep entity and organization scope explicit. Optional response fields are pointers; check for nil before dereferencing.