Memory
Cosine CLI maintains project knowledge through two mechanisms.
AGENTS.md
Section titled “AGENTS.md”An AGENTS.md file in your repository root serves as persistent context that the agent reads at the start of every session. Use it to document:
- Project architecture and conventions
- Build and test commands
- Team preferences and coding standards
- Non-obvious setup steps
Initialize one with:
cos initSession memories
Section titled “Session memories”During a conversation, the agent can save reusable facts using the save_memory tool — things like build fixes, project conventions, or user preferences. These are stored in .cosine/agents.md and automatically loaded in future sessions.
What belongs in memory
Section titled “What belongs in memory”Good candidates include:
- stable project conventions
- user or team preferences
- recurring setup fixes
- reusable context that should persist across runs
See Also
Section titled “See Also”- Session History — Resume conversations with prior context
- Configuration — Repo and user configuration