Local OSSManage 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]
| Prop | Type |
|---|
--limit | int |
--playbook-name | str |
--agent-version | str |
--playbook-status | str |
search
emend agent-playbooks search "<query>" [OPTIONS]
| Prop | Type |
|---|
QUERY | str (positional) |
--limit | int |
--agent-version | str |
--playbook-status | str |
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]
| Prop | Type |
|---|
--content | str |
--agent-version | str |
--playbook-name | str |
--playbook-status | str |
--trigger | str |
--instruction | str |
--pitfall | str |
--rationale | str |
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>]
| Prop | Type |
|---|
--id | int |
--content | str |
--playbook-name | str |
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>
| Prop | Type |
|---|
--id | int |
--status | str |
delete
emend agent-playbooks delete --id <id>
delete-all
Delete every agent playbook (scoped to agent playbooks only — user playbooks are untouched).
emend agent-playbooks delete-all [--yes]
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]
| Prop | Type |
|---|
--agent-version | str |
--playbook-name | str |
--wait | flag |
regenerate
Re-run playbook generation for a specific agent version.
emend agent-playbooks regenerate --agent-version <v> [--wait]
| Prop | Type |
|---|
--agent-version | str |
--wait | flag |
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]
| Prop | Type |
|---|
--user-id | str |
--limit | int |
--playbook-name | str |
--agent-version | str |
--status | str |
search
emend user-playbooks search "<query>" [OPTIONS]
| Prop | Type |
|---|
QUERY | str (positional) |
--limit | int |
--agent-version | str |
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]
| Prop | Type |
|---|
--content | str |
--playbook-name | str |
--trigger | str |
--instruction | str |
--pitfall | str |
--rationale | str |
update
emend user-playbooks update --id <int> [--content "<text>"] [--playbook-name <name>]
| Prop | Type |
|---|
--id | int |
--content | str |
--playbook-name | str |
delete
emend user-playbooks delete --id <id>
delete-all
emend user-playbooks delete-all [--yes]
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.