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.
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]| Prop | Type |
|---|---|
--user-id | str |
--session-idrequired | str |
--source | str |
--agent-version | str |
--wait | flag |
--user-message | str |
--agent-response | str |
--data | str |
--file | path |
--stdin | flag |
--skip-aggregation | flag |
--force-extraction | flag |
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_abcCommand: emend interactions list
List recently published interactions, optionally filtered by user.
emend interactions list [OPTIONS]| Prop | Type |
|---|---|
--user-id | str |
--limit | int |
emend interactions list --user-id user_123 --limit 10Command: emend interactions search
Run a semantic search over published interactions.
emend interactions search --query "flight booking" [OPTIONS]| Prop | Type |
|---|---|
--query | str |
--user-id | str |
--limit | int |
emend interactions search --query "morning commute" --user-id user_123Command: emend interactions delete
Delete a single interaction.
emend interactions delete --interaction-id <id> --user-id <uid>| Prop | Type |
|---|---|
--interaction-id | str |
--user-id | str |
Command: emend interactions delete-all
Delete every interaction across all users. Prompts for confirmation unless --yes is passed.
emend interactions delete-all [--yes]| Prop | Type |
|---|---|
--yes / -y | flag |
emend user-profiles delete-all and emend agent-playbooks delete-all separately if you also want to wipe downstream state.