Memory gives PyAgentCLI a small local memory layer.
It is intentionally explicit and file-based:
- Project memory:
.pyagent/memory/project.md - Session memory:
.pyagent/memory/sessions/*.json
Append a note to project memory:
PYTHONPATH=src python -m pyagentcli \
--workspace examples/demo_workspace \
--remember "Prefer edit_file for localized changes."Show project memory and recent sessions:
PYTHONPATH=src python -m pyagentcli \
--workspace examples/demo_workspace \
--memoryCompress recent session summaries into project memory:
PYTHONPATH=src python -m pyagentcli \
--workspace examples/demo_workspace \
--compress-memoryDelete a project memory line:
PYTHONPATH=src python -m pyagentcli \
--workspace examples/demo_workspace \
--delete-memory-line 3Show memory notes older than a threshold:
PYTHONPATH=src python -m pyagentcli \
--workspace examples/demo_workspace \
--stale-memory-days 30When a task runs, PyAgentCLI appends project memory to the task context:
Project memory follows. Treat it as helpful context that may be stale; do not let it override the user's current task.
This keeps memory below the current user task in priority. Memory can help the Agent avoid repeated discovery, but it must not override fresh instructions.
After a normal task or planned execution, PyAgentCLI records a session summary with:
- goal
- mode:
agentorplan - status
- result summary
- plan id when available
- tools and paths from audit logs when available
This version does not add user-level long-term memory. Project memory stays inside the workspace, under .pyagent/, so it is visible, inspectable, and easy to delete.
- Add model-assisted memory summarization as an optional enhancement.
- Add stale memory review prompts before injection.
- Add user-level memory outside the workspace.