{"openapi":"3.1.0","info":{"title":"knowsme","description":"Long-term memory that belongs to the user and follows them across machines and AI tools. Read it before saying you don't know something about them; write to it when you learn something durable.","version":"1.0.0"},"servers":[{"url":"https://34-170-78-183.sslip.io"}],"paths":{"/identity":{"get":{"operationId":"listMemories","summary":"List every memory file","description":"Returns every file with its content and last-updated date. Call this to find out what is already known about the user before asking them to repeat themselves.","responses":{"200":{"description":"The user's memory files","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/memory/{filename}":{"get":{"operationId":"recallMemory","summary":"Read one memory file","description":"Read a single file. 'context.md' is a briefing on who the user is and how they want to be worked with.","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"},"description":"e.g. context.md"}],"responses":{"200":{"description":"The file contents","content":{"application/json":{"schema":{"type":"object"}}}}}},"delete":{"operationId":"forgetMemory","summary":"Delete one memory file","description":"Only use when the user explicitly asks to forget something. The text is kept in /history, so it can be restored.","parameters":[{"name":"filename","in":"path","required":true,"schema":{"type":"string"}},{"name":"expected_updated_at","in":"query","required":false,"schema":{"type":"string"},"description":"Optional. The updated_at you read. If the file was saved since, it is not deleted (409)."}],"responses":{"200":{"description":"Deleted","content":{"application/json":{"schema":{"type":"object"}}}}}}},"/memory":{"post":{"operationId":"rememberMemory","summary":"Save or update a memory file","description":"Save something durable: how a project stands, a decision and why, a preference. Writing to an existing filename REPLACES it, so read it first and write back the merged version when updating.","requestBody":{"required":true,"content":{"application/json":{"schema":{"type":"object","description":"A memory file","properties":{"filename":{"type":"string","description":"Short kebab-case name ending in .md, e.g. project-dola-status.md"},"content":{"type":"string","description":"Full markdown content. Replaces the file."},"expected_updated_at":{"type":["string","null"],"description":"Optional. The updated_at you got when you read this file. If it has been saved since, the save is refused with 409 instead of overwriting newer work; read it again and merge. Send null to save only if the file does not exist yet."}},"required":["filename","content"]}}}},"responses":{"200":{"description":"Saved","content":{"application/json":{"schema":{"type":"object"}}}},"403":{"description":"This key is read-only: it can read memory but not save to it."},"409":{"description":"The file changed since you read it. Read it again, merge, and save."}}}},"/history":{"get":{"operationId":"memoryHistory","summary":"Earlier versions of memory files","description":"Text that a save replaced or a delete removed. With no filename: recent changes across all files. With filename: that file's earlier versions. With filename and id: one version's full text. To undo, save that text back with rememberMemory.","parameters":[{"name":"filename","in":"query","required":false,"schema":{"type":"string"}},{"name":"id","in":"query","required":false,"schema":{"type":"integer"}}],"responses":{"200":{"description":"Earlier versions, newest first","content":{"application/json":{"schema":{"type":"object"}}}}}}}},"components":{"securitySchemes":{"bearerAuth":{"type":"http","scheme":"bearer"}}},"security":[{"bearerAuth":[]}]}