Emend
Local OSS

playbooks

Manage user playbooks and agent playbooks — CRUD, aggregation, approval.

emend agent-playbooks / emend user-playbooks

Two related command groups manage the playbook system:

  • user-playbooks — rules extracted from individual interactions, scoped per request.
  • agent-playbooks — aggregated, agent-level rules produced by clustering user playbooks. Supports an approval workflow (pending → approved / rejected).

The typical lifecycle: publish interactions → extractors emit user playbooks → agent-playbooks aggregate clusters them into agent playbooks → review and approve.

emend agent-playbooks

list

emend agent-playbooks list [OPTIONS]
PropType
--limitint
--playbook-namestr
--agent-versionstr
--playbook-statusstr

search

emend agent-playbooks search "<query>" [OPTIONS]
PropType
QUERYstr (positional)
--limitint
--agent-versionstr
--playbook-statusstr

add

Add an agent playbook directly, bypassing the aggregation pipeline. Useful for seeding rules without first producing sample user playbooks for the aggregator to cluster.

emend agent-playbooks add --content "<text>" --agent-version <v> [OPTIONS]
PropType
--contentstr
--agent-versionstr
--playbook-namestr
--playbook-statusstr
--triggerstr
--instructionstr
--pitfallstr
--rationalestr

update

Update editable fields on an existing agent playbook. Pass at least one of --content / --playbook-name.

emend agent-playbooks update --id <int> [--content "<text>"] [--playbook-name <name>]
PropType
--idint
--contentstr
--playbook-namestr
Info
To update trigger or rationale, use the Python client's update_agent_playbook() / update_user_playbook() methods — each field is updated independently.

update-status

Dedicated approval-workflow command. Prefer this over update for status changes — the server has a single-purpose endpoint that writes a smaller change log.

emend agent-playbooks update-status --id <int> --status <pending|approved|rejected>
PropType
--idint
--statusstr

delete

emend agent-playbooks delete --id <id>
PropType
--idstr

delete-all

Delete every agent playbook (scoped to agent playbooks only — user playbooks are untouched).

emend agent-playbooks delete-all [--yes]
PropType
--yes / -yflag

aggregate

Cluster similar user playbooks into agent playbooks. Without --agent-version, discovers every agent version that has user playbooks and aggregates each one separately. --playbook-name defaults to the first playbook name configured on the server.

emend agent-playbooks aggregate [OPTIONS]
PropType
--agent-versionstr
--playbook-namestr
--waitflag

regenerate

Re-run playbook generation for a specific agent version.

emend agent-playbooks regenerate --agent-version <v> [--wait]
PropType
--agent-versionstr
--waitflag

emend user-playbooks

Same shape as agent-playbooks for list / search / add / update / delete / delete-all, but operates on the pre-aggregation user playbook layer and has no approval workflow.

list

emend user-playbooks list [OPTIONS]
PropType
--user-idstr
--limitint
--playbook-namestr
--agent-versionstr
--statusstr

search

emend user-playbooks search "<query>" [OPTIONS]
PropType
QUERYstr (positional)
--limitint
--agent-versionstr

add

Manually add a user playbook entry. Fills in the structured data block directly rather than running it through extraction.

emend user-playbooks add --content "<text>" [OPTIONS]
PropType
--contentstr
--playbook-namestr
--triggerstr
--instructionstr
--pitfallstr
--rationalestr

update

emend user-playbooks update --id <int> [--content "<text>"] [--playbook-name <name>]
PropType
--idint
--contentstr
--playbook-namestr

delete

emend user-playbooks delete --id <id>
PropType
--idstr

delete-all

emend user-playbooks delete-all [--yes]
PropType
--yes / -yflag
Danger
user-playbooks delete-all and agent-playbooks delete-all are independent — each wipes only its own layer. Run both if you want a clean slate.