Menu
CLI

reflexio interactions

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

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.

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


Command: reflexio interactions publish

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

  1. Single-turn — pass --user-message and --agent-response for a one-shot capture.
  2. File / stdin — stream a JSON or JSONL payload via --file or --stdin.
  3. Inline — pass --data '{...}' (or --data @path/to/file.json).
Terminal
reflexio interactions publish [OPTIONS]

Options

PropTypeDefaultDescription
--user-id?strnoneUser identifier. Optional if the JSON payload already contains `user_id`, required for single-turn mode.
--session-idstr—Non-empty session ID for grouping multiple interactions. Required unless each JSON payload includes `session_id`.
--source?str"cli"Non-sensitive producer/workflow label matching `^[a-z0-9][a-z0-9._:-]{0,127}$`. Never use user identifiers or PII.
--agent-version?strnoneAgent version string. Used downstream for playbook scoping.
--wait?flagfalseBlock until the server completes extraction. Without this, the server queues extraction and returns a bare acknowledgement.
--user-message?strnoneSingle-turn user message (pairs with --agent-response).
--agent-response?strnoneSingle-turn agent response (pairs with --user-message).
--data?strnoneInline JSON payload, or `@path/to/file.json` to load from disk.
--file?pathnonePath to a JSON or JSONL file containing one or more payloads.
--stdin?flagfalseRead the JSON/JSONL payload from stdin.
--skip-aggregation?flagfalseRun profile/playbook extractors but skip the aggregation step that promotes user playbooks into the agent playbook layer.
--force-extraction?flagfalseBypass stride_size checks and always run extractors, even if the configured sliding window has not elapsed.

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:

json
{
  "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

Terminal
# Single-turn capture
reflexio 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 finishes
reflexio interactions publish --file conversations.jsonl --session-id session_abc --wait

# Inline payload with force extraction
reflexio interactions publish \
  --data '{"user_id":"user_123","session_id":"session_abc","interactions":[{"role":"user","content":"hi"},{"role":"assistant","content":"hello"}]}' \
  --force-extraction

# Stream from stdin
cat conversations.json | reflexio interactions publish --stdin --user-id user_123 --session-id session_abc

Command: reflexio interactions list

List recently published interactions, optionally filtered by user.

Terminal
reflexio interactions list [OPTIONS]
PropTypeDefaultDescription
--user-id?strnoneFilter by user ID.
--limit?int20Maximum number of interactions to return.
Terminal
reflexio interactions list --user-id user_123 --limit 10

Run a semantic search over published interactions.

Terminal
reflexio interactions search --query "flight booking" [OPTIONS]
PropTypeDefaultDescription
--query?str—Search query string. Required.
--user-id?strnoneFilter by user ID.
--limit?int10Maximum number of results.
Terminal
reflexio interactions search --query "morning commute" --user-id user_123

Command: reflexio interactions delete

Delete a single interaction.

Terminal
reflexio interactions delete --interaction-id <id> --user-id <uid>
PropTypeDefaultDescription
--interaction-id?str—Interaction ID to delete. Required.
--user-id?str—User ID that owns the interaction. Required.

Command: reflexio interactions delete-all

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

Terminal
reflexio interactions delete-all [--yes]
PropTypeDefaultDescription
--yes / -y?flagfalseSkip the interactive confirmation prompt.

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