fx has two relevant durable surfaces:
AGENTS.md files.memory tool that stores durable user preferences in ~/.fx/memories.json.The fx docs describe AGENTS.md as project guidance. The fx source shows the memory tool supports save, list, and clear; it stores a JSON array of strings and resolves the path through the profile path helper.
Instructions:
~/.fx/AGENTS.md.AGENTS.md files.AGENTS.md files for files or directories targeted by a tool call.Native memory tool:
~/.fx/memories.json.Other state:
~/.fx/, but those are not memory-import surfaces for project knowledge unless a future fx export documents them.Instructions:
AGENTS.md files.AGENTS.md, skills, MCP metadata, tools, and the selected model.Native memory tool:
save requires a fact string and deduplicates by exact byte equality.list returns all entries as bullet lines.clear removes the file and is irreversible.memories.json itself is the store and each array element is a complete memory string.Recommended import order:
AGENTS.md files.~/.fx/memories.json only with explicit user approval because it is intended for user preferences.~/.fx/AGENTS.md only with explicit user-scope opt-in.Suggested mapping:
~/.fx/memories.json -> preference by default.AGENTS.md facts -> pattern, config, or decision after classification.~/.fx/memories.json entries as project memory unless the user confirms they apply to the current project.Important importer behavior:
memories.json strictly as a JSON array of strings.