memmy-memory turn complete
Intent map:
- finish a turn and persist the interaction ->
memmy-memory turn complete <turnId>; - record a failed turn outcome ->
memmy-memory turn complete <turnId> --status failed; - connect the final answer to the session and query ->
memmy-memory turn complete <turnId> --session-id <id> --query <text> --answer <text>.
Use this command when:
- the agent has produced the final answer for the turn;
- the turn was started with
memmy-memory turn start; - the outcome should be available for future memory context and evolution.
API shape:
- endpoint:
POST /turns/:turnId/complete; turnIdis sent in the URL path;- the CLI sends a JSON body;
sessionId,query, andanswerare required;statusis optional and normalized tosucceededorfailed.sourceshould be passed as--source <agent-source>by installed agent skills.- the response returns the final
episodeIdafter episode routing and turn persistence commit together.
Never store:
- secrets, credentials, access tokens, private keys, or passwords;
- unconfirmed speculation as if it were fact;
- sensitive personal data that is not necessary for durable memory;
- verbose logs when a concise result is enough.
Command:
memmy-memory turn complete <turnId> --source <agent-source> --session-id <sessionId> --query "<query>" --answer "<answer>"Common flags:
--turn-id <id>--session-id <id>--query <text>--answer <text>--status <succeeded|failed>--source <agent-source>
Example:
memmy-memory turn complete turn_123 --source codex --session-id se_123 --query "fix failing tests" --answer "fixed the failing fixture" --status succeededWorking rules:
- call this after the final answer text is known;
- keep
queryfaithful to the user request or task; - keep
answeraccurate to the actual result; - use
--status failedwhen the task failed but the result is still useful to remember; - do not call this command for a user-cancelled turn;
- use the returned
episodeIdas the turn's final episode assignment; - save returned memory ids when later inspection or deletion may be needed.