Emend
Local OSS

interactions

Publish, list, search, and delete user-agent conversations.

emend interactions

Manage interactions — the raw conversations between a user and your agent. Publishing an interaction feeds the profile and playbook extractors; everything else is available through the same group for inspection and cleanup.

Info
emend publish at the top level is a shortcut for emend interactions publish. The options and examples on this page apply to both.

Command: emend interactions publish

Publish one or more interactions for a user. Supports three input modes:

  • Single-turn — pass --user-message and --agent-response for a one-shot capture.
  • File / stdin — stream a JSON or JSONL payload via --file or --stdin.
  • Inline — pass --data '{...}' (or --data @path/to/file.json).
emend interactions publish [OPTIONS]
PropType
--user-idstr
--session-idrequiredstr
--sourcestr
--agent-versionstr
--waitflag
--user-messagestr
--agent-responsestr
--datastr
--filepath
--stdinflag
--skip-aggregationflag
--force-extractionflag

Payload format

When using --data, --file, or --stdin, the payload is a JSON object (or JSONL stream of objects) with at minimum an interactions array:

{  "user_id": "user_123",  "session_id": "session_abc",  "source": "support-agent:v2",  "agent_version": "v1",  "interactions": [    { "role": "user", "content": "Find me a flight to Tokyo" },    { "role": "assistant", "content": "Searching flights..." }  ]}

Fields set in the payload override the corresponding CLI flags. tools_used and other InteractionData fields are forwarded verbatim so the server can emit [used tool: ...] markers for playbook extraction.

Examples

# Single-turn captureemend interactions publish \  --user-id user_123 \  --session-id session_abc \  --user-message "Find me a flight to Tokyo" \  --agent-response "Searching flights..." # JSONL file, blocking until extraction finishesemend interactions publish --file conversations.jsonl --session-id session_abc --wait # Inline payload with force extractionemend interactions publish \  --data '{"user_id":"user_123","session_id":"session_abc","interactions":[{"role":"user","content":"hi"},{"role":"assistant","content":"hello"}]}' \  --force-extraction # Stream from stdincat conversations.json | emend interactions publish --stdin --user-id user_123 --session-id session_abc

Command: emend interactions list

List recently published interactions, optionally filtered by user.

emend interactions list [OPTIONS]
PropType
--user-idstr
--limitint
emend interactions list --user-id user_123 --limit 10

Command: emend interactions search

Run a semantic search over published interactions.

emend interactions search --query "flight booking" [OPTIONS]
PropType
--querystr
--user-idstr
--limitint
emend interactions search --query "morning commute" --user-id user_123

Command: emend interactions delete

Delete a single interaction.

emend interactions delete --interaction-id <id> --user-id <uid>
PropType
--interaction-idstr
--user-idstr

Command: emend interactions delete-all

Delete every interaction across all users. Prompts for confirmation unless --yes is passed.

emend interactions delete-all [--yes]
PropType
--yes / -yflag
Danger
This is irreversible. The server deletes interactions, not their derived profiles/playbooks — run emend user-profiles delete-all and emend agent-playbooks delete-all separately if you also want to wipe downstream state.