@audienti/cli 0.2.0-exora.2 → 0.2.0-exora.21

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (91) hide show
  1. package/README.md +2 -2
  2. package/cli/account-reply-operations.mjs +27 -1
  3. package/cli/agents.mjs +74 -14
  4. package/cli/assignment-operations.mjs +12 -12
  5. package/cli/assignment.mjs +6 -6
  6. package/cli/attachment-operations.mjs +9 -0
  7. package/cli/attachments.mjs +28 -0
  8. package/cli/audience-operations.mjs +5 -0
  9. package/cli/audiences.mjs +7 -4
  10. package/cli/audienti.mjs +143 -23
  11. package/cli/audit-operations.mjs +17 -0
  12. package/cli/audit.mjs +39 -0
  13. package/cli/budget-operations.mjs +8 -0
  14. package/cli/budgets.mjs +34 -0
  15. package/cli/campaign-find.mjs +155 -0
  16. package/cli/campaign-operations.mjs +30 -0
  17. package/cli/campaigns.mjs +61 -0
  18. package/cli/cohort-operations.mjs +22 -0
  19. package/cli/cohorts.mjs +45 -0
  20. package/cli/connection-registry-operations.mjs +2 -1
  21. package/cli/content.mjs +2 -0
  22. package/cli/discovery-operations.mjs +4 -3
  23. package/cli/discovery.mjs +3 -2
  24. package/cli/file-operations.mjs +29 -0
  25. package/cli/files.mjs +14 -0
  26. package/cli/guardrails-operations.mjs +12 -0
  27. package/cli/guardrails.mjs +37 -0
  28. package/cli/hand-task-operations.mjs +11 -0
  29. package/cli/hand-tasks.mjs +18 -0
  30. package/cli/intent-operations.mjs +35 -0
  31. package/cli/intent.mjs +42 -0
  32. package/cli/json-file.mjs +1 -1
  33. package/cli/kv-operations.mjs +17 -0
  34. package/cli/kv.mjs +58 -0
  35. package/cli/mcp.mjs +5 -5
  36. package/cli/notification-operations.mjs +8 -0
  37. package/cli/offer-operations.mjs +1 -1
  38. package/cli/outbound-operations.mjs +16 -0
  39. package/cli/outbound.mjs +54 -0
  40. package/cli/outcome-operations.mjs +28 -0
  41. package/cli/outcomes.mjs +16 -0
  42. package/cli/owner-account-client.mjs +3 -3
  43. package/cli/playbook-help.mjs +83 -0
  44. package/cli/playbook-operations.mjs +38 -0
  45. package/cli/progress.mjs +29 -7
  46. package/cli/prospecting-settings-operations.mjs +1 -1
  47. package/cli/question-operations.mjs +12 -0
  48. package/cli/questions.mjs +32 -0
  49. package/cli/queue-operations.mjs +12 -0
  50. package/cli/queue.mjs +25 -0
  51. package/cli/recipient-operations.mjs +1 -1
  52. package/cli/recipients.mjs +6 -2
  53. package/cli/rooms-operations.mjs +48 -0
  54. package/cli/rooms.mjs +160 -0
  55. package/cli/search-operations.mjs +9 -0
  56. package/cli/secret-operations.mjs +7 -0
  57. package/cli/secrets.mjs +30 -0
  58. package/cli/sender-account-operations.mjs +7 -3
  59. package/cli/sender-accounts.mjs +18 -8
  60. package/cli/skills-mcp.mjs +13 -6
  61. package/cli/skills.mjs +73 -16
  62. package/cli/tools-operations.mjs +18 -10
  63. package/cli/tools.mjs +48 -20
  64. package/cli/usage-operations.mjs +8 -0
  65. package/cli/usage.mjs +41 -0
  66. package/cli/work-execution-operations.mjs +7 -0
  67. package/cli/work-execution.mjs +3 -3
  68. package/cli/work-operations.mjs +7 -5
  69. package/cli/work.mjs +11 -6
  70. package/cli/workspaces.mjs +132 -24
  71. package/package.json +2 -2
  72. package/skills/agent-rooms/SKILL.md +140 -0
  73. package/skills/agent-rooms/references/commands.md +78 -0
  74. package/skills/audienti/SKILL.md +112 -6
  75. package/skills/audienti/references/helpers.md +15 -2
  76. package/skills/audienti/references/profile-workflows.md +6 -4
  77. package/skills/audienti/scripts/contracts.mjs +1 -1
  78. package/skills/getting-started/SKILL.md +227 -0
  79. package/skills/getting-started/references/audience.md +143 -0
  80. package/skills/getting-started/references/campaign-draft.md +80 -0
  81. package/skills/getting-started/references/capabilities.md +238 -0
  82. package/skills/getting-started/references/mailbox-check.md +64 -0
  83. package/skills/getting-started/references/outcome-checks.md +125 -0
  84. package/skills/getting-started/references/replies.md +265 -0
  85. package/skills/getting-started/references/reply-checks.md +54 -0
  86. package/skills/playbook-design/SKILL.md +135 -0
  87. package/skills/playbook-design/references/fields.md +145 -0
  88. package/source-manifest.json +89 -41
  89. package/cli/approach-operations.mjs +0 -22
  90. package/cli/experiment-operations.mjs +0 -25
  91. package/cli/experiments.mjs +0 -26
@@ -0,0 +1,265 @@
1
+ # Handling a reply
2
+
3
+ A reply task (`replies.handle`) means a prospect answered. The inbound itself is never
4
+ approved: inbound wins, and you record it. What the user approves is your answer.
5
+
6
+ ## What to do
7
+
8
+ 1. Read the conversation: `audienti prospects conversation list PERSON --workspace ID`.
9
+ 2. Classify the reply as one of `interested`, `question`, `later`, `out_of_office`,
10
+ `stop`, `bounce`, `referral` or `wrong_person` (the prospect is the wrong person and
11
+ names no one else). A stop, a bounce or a referral must carry its typed
12
+ `result`, or the report is refused; see [Stop, bounce and referral](#stop-bounce-and-referral).
13
+ 3. Draft the answer from the mailbox or LinkedIn account the reply came to (the assignee's).
14
+ - Bind the recipient and the sender, or the answer waits in Blocked: the recipient's
15
+ `contactId` comes from `audienti prospects contacts list PERSON`, and the
16
+ `senderAccountId` is the user's confirmed sender account for that mailbox or LinkedIn account
17
+ (`audienti sender accounts list`).
18
+ - If you report `calendar.freebusy.read`, read the user's free times and offer up
19
+ to six slots in the answer. Put the same times in `slots`, so the user sees them on
20
+ the card: "Slots from your calendar · Thu 10:00, 14:30 ET". A scheduling tool that
21
+ reports only `calendar.read` is not the user's calendar and offers no slots.
22
+ - Without a calendar, ask the prospect for a time that suits them, and leave `slots`
23
+ out. The user's card says no agent has a calendar and links to the Capabilities
24
+ screen.
25
+ 4. Record the classification and the draft in one result, keeping the reply open:
26
+
27
+ ```sh
28
+ audienti prospects replies set PERSON --workspace ID --evidence EVIDENCE --file RESULT.json
29
+ ```
30
+
31
+ ```json
32
+ {
33
+ "requestId": "a new UUID for each result",
34
+ "expectedVersion": 0,
35
+ "status": "needs_handling",
36
+ "outcome": null,
37
+ "reason": "Interested and asked for a time on Thursday.",
38
+ "responseEvidenceId": null,
39
+ "classification": "interested",
40
+ "draft": {
41
+ "type": "email.send",
42
+ "content": { "subject": "Re: Late invoices", "body": "Thursday works. I have 10:00 or 14:30 ET. Which suits you?" },
43
+ "recipient": { "prospectId": "PERSON", "email": "jane@example.com", "contactId": "CONTACT" },
44
+ "sender": { "provider": "email", "accountRef": "owner@example.com", "senderAccountId": "SENDER" },
45
+ "reason": "Offers the two free slots on Thursday the prospect asked for.",
46
+ "slots": [
47
+ { "start": "2026-11-05T15:00:00Z", "end": "2026-11-05T15:30:00Z", "timeZone": "America/New_York" },
48
+ { "start": "2026-11-05T19:30:00Z", "end": "2026-11-05T20:00:00Z", "timeZone": "America/New_York" }
49
+ ]
50
+ }
51
+ }
52
+ ```
53
+
54
+ `expectedVersion` is the reply's current version (`audienti prospects replies get`).
55
+ The draft becomes a revision the user reviews in Operator. Nothing is sent until the
56
+ user approves it. A second result for the same reply replaces a draft the user has
57
+ not decided yet.
58
+ 5. Report the task done.
59
+
60
+ The owner can also close a reply in Operator with "Mark handled" or "Not a reply". That records the same
61
+ state as `replies set` with status `handled` or `not_reply`, and withdraws any answer you drafted for it
62
+ that no agent has claimed to send. Read `replies get` before you set a reply again.
63
+
64
+ To close a reply for the owner by CLI, pass the version you read as `expectedVersion`. Handled with no
65
+ answer is `{"requestId":"<uuid>","expectedVersion":1,"status":"handled","outcome":"closed_without_response","reason":"The owner answered by phone."}`.
66
+ Not a reply is `{"requestId":"<uuid>","expectedVersion":1,"status":"not_reply","reason":"An automatic message."}`;
67
+ it has no outcome. Give `--file` an absolute path.
68
+
69
+ The classification records a `replied` event on the person's active campaigns, except
70
+ for `bounce` and `out_of_office`, which are not replies from the person.
71
+ An `out_of_office` reply records an auto-reply instead. The playbook's out-of-office rule
72
+ snoozes the person: the wait and the next step hold for 7 days, or until the return date
73
+ when you pass `returnsOn`. Nothing is sent meanwhile and the person does not move. A
74
+ `wrong_person` reply that names no one stops the sends and leaves the reply for the user to
75
+ settle: ask who the right person is. When the reply names the right person, classify it as a
76
+ `referral` with its typed `result`.
77
+
78
+ ## Label a message with its words
79
+
80
+ A label says what a message means. Read the names with `audienti intent list`. A label goes on a message
81
+ that is stored as evidence. Get its `EVIDENCE` ID from `audienti prospects conversation append` (when you
82
+ store the message yourself) or `audienti prospects conversation list PERSON` (for one already stored); intake
83
+ returns it too. Record one to three labels, each with the `quote` that supports it (at most 300 characters,
84
+ copied from the message) and a plain `reason` (at most 200 characters, no IDs or error codes):
85
+
86
+ ```
87
+ audienti intent record --person PERSON --evidence EVIDENCE \
88
+ --label interested --quote "we are interested in a demo" --reason "They ask for a demo next week."
89
+ ```
90
+
91
+ Flags carry one label. Use `--file LABELS.json` for several labels or a typed detail (the `result` of a
92
+ stop, bounce or referral; `meeting` for `meeting_booked`; `returnsOn` for `out_of_office`). A stop that
93
+ asks for everything to end looks like this:
94
+
95
+ ```
96
+ [{"label": "stop", "quote": "please stop writing to me", "reason": "They ask us to stop.",
97
+ "result": {"type": "reply.stop", "scope": "person"}}]
98
+ ```
99
+
100
+ `audienti intent --help` prints this example. Give the same `--request-id` to repeat a call safely. Add
101
+ `confidence` (`high`, `medium` or `low`) when you are unsure; it is stored only when you give it, and it
102
+ does not change what the label does yet. A message keeps the labels it has: a second request that repeats
103
+ one is refused with `already_recorded`, and one that would give the message a second reading is refused.
104
+
105
+ Audienti checks every label and writes nothing if one fails. A refusal names the `field`, the `allowed`
106
+ values and the `next` step. The checks:
107
+
108
+ - The message is stored with its text. A message stored without a body cannot carry a label: submit the text as evidence.
109
+ - The name is on the list, and fits the message direction and channel (`bounce` is email only).
110
+ - The quote is in the message (subject and body), ignoring case and spacing.
111
+ - The reason is plain words a person can read.
112
+ - The labels fit together: `stop`, `bounce` and `out_of_office` stand alone; a message has one reading of the
113
+ reply and at most one meeting label.
114
+ - The typed detail is present: a `stop`, `bounce` or `referral` needs its `result`; `meeting_booked` needs `meeting`.
115
+
116
+ `replies set` records the same labels. Add `"intent": {"quote": "...", "reason": "..."}` next to `classification`
117
+ or `meetingState` and it runs the same checks and stores the words on the event. Without `intent` it works as before.
118
+
119
+ ## Label a message you sent
120
+
121
+ A message you sent can carry a label too. Today one fits: `meeting_requested`, for a message that asks for a
122
+ meeting or offers a time ("could we find 20 minutes next week?"). Without it Audienti does not know a meeting
123
+ was asked for, so the playbook's meeting wait cannot follow it up. With it the timeline shows the request, the
124
+ wait sends up to 3 follow-ups, and a request nobody answers is marked No answer. No reply is needed.
125
+
126
+ Do it after the send, in two calls. Store what you sent, then label it:
127
+
128
+ ```
129
+ audienti prospects conversation append PERSON --workspace ID --file ITEM.json
130
+ audienti intent record --person PERSON --evidence EVIDENCE \
131
+ --label meeting_requested --quote "find 20 minutes next week" --reason "We ask for a call next week."
132
+ ```
133
+
134
+ `ITEM.json` holds a new `requestId` and the sent message. Give it the text exactly as you sent it:
135
+
136
+ ```
137
+ { "requestId": "<uuid>",
138
+ "item": {
139
+ "source": { "provider": "email", "accountRef": "you@yourcompany.com", "itemId": "<the provider's message ID>", "threadId": null },
140
+ "payload": { "direction": "outbound", "conversationType": "direct", "occurredAt": "2026-11-06T14:00:00Z",
141
+ "subject": "Ten minutes on late invoices?", "body": "Hi Jordan, could we find 20 minutes next week?", "participants": null } } }
142
+ ```
143
+
144
+ The call returns `EVIDENCE`. If you stored the message already, to report the send (`account_evidence`) or as
145
+ the `responseEvidenceId` of an answer, use that same ID. The `quote` must be words from what you sent.
146
+ The same checks apply: a message with no stored text, a quote that is not in it, or a label that does not fit a sent message (`interested` fits a reply, not an ask) is refused and writes nothing.
147
+
148
+ - Label only a message that asks for or offers a meeting. A message that does not is not labeled.
149
+ - A follow-up that asks again needs no label: the request is already on the timeline, so a repeat writes nothing.
150
+ The same message cannot take the label twice (`already_recorded`).
151
+ - The label goes on the person's running campaign. A person runs in one campaign per workspace, so you need no option; `--participation ID` names the run if you want it explicit. The answer to `work execution send` or `report` carries that `participationId` when the send started a playbook step and the person still runs in the campaign run the send started, also when you repeat the call. A person who left and rejoined has a new run: a repeat of the old send names none. The label works without it.
152
+ - An answer to a reply that offers times is labeled the same way, with the evidence of the answer you sent.
153
+
154
+ ## Stop, bounce and referral
155
+
156
+ These three need no decision from the user. Classify the reply, report the typed
157
+ `result` next to the classification it matches, and Audienti records it against the
158
+ person. The classification without its result is refused with 400 naming the result it
159
+ needs (`reply.stop`, `email.bounce` or `reply.referral`). Use the prospect's words,
160
+ verbatim, for `quote`.
161
+
162
+ - **Stop** (`stop`): the prospect asked not to be contacted. Report status `handled`,
163
+ outcome `suppressed` and no draft:
164
+
165
+ ```json
166
+ { "classification": "stop", "status": "handled", "outcome": "suppressed",
167
+ "result": { "type": "reply.stop", "scope": "person", "quote": "Please remove me from your list." } }
168
+ ```
169
+
170
+ The person is suppressed for good on every channel, their pending sends and open
171
+ tasks are withdrawn, and they leave their campaigns. The user cannot override it.
172
+ Use `"scope": "company"` only when they asked to stop for their whole company:
173
+ everyone at the company's domain is suppressed, and so is anyone added later. The
174
+ domain goes on the do-not-contact list marked "Asked to stop", and no one can remove it.
175
+ Never contact a person who asked to stop again, on any channel.
176
+ - **Bounce** (`bounce`): a delivery failure came back instead of a reply. Report
177
+ status `not_reply` and no draft:
178
+
179
+ ```json
180
+ { "classification": "bounce", "status": "not_reply", "outcome": null,
181
+ "result": { "type": "email.bounce", "address": "priya@example.com", "kind": "hard", "evidence": "550 5.1.1 User unknown" } }
182
+ ```
183
+
184
+ `address` is the address that bounced: the person's own address, or one nobody in the
185
+ workspace holds. An address another person holds is refused with 409
186
+ `address_belongs_to_another_person`; report the bounce on the reply that came back
187
+ about that person instead.
188
+ `hard` means the address does not exist or refuses mail: it is marked bounced and
189
+ blocked in every campaign, and the person leaves the campaign as Bounced. `soft`
190
+ means a full mailbox or a temporary failure: the address is held for 24 hours, then
191
+ a retry task asks you to send the message once more. Retried once means exactly one
192
+ send: after the 24 hours the address takes one send, and every other send to it is
193
+ refused with `recipient_contact_bounced` until that send's outcome is known. A second
194
+ bounce within 14 days of the retry counts as hard; with no bounce in that time the
195
+ address opens again. Put the bounce message and its status code in `evidence`.
196
+ - **Referral** (`referral`): the prospect is the wrong person and named someone else.
197
+ Report status `needs_handling` with a thank-you as the draft, and name the person:
198
+
199
+ ```json
200
+ { "classification": "referral", "status": "needs_handling", "outcome": null,
201
+ "result": { "type": "reply.referral", "name": "Sam Lee", "title": "Finance lead",
202
+ "email": "sam@example.com", "quote": "Wrong person, try Sam Lee in finance." },
203
+ "draft": { "type": "email.send", "content": { "subject": "Re: Late invoices", "body": "Thank you, Jane. I will reach out to Sam." }, "...": "recipient, sender and reason as above" } }
204
+ ```
205
+
206
+ Give `linkedinUrl` or `email` when the prospect gave them. Audienti finds or adds the
207
+ named person (an email someone in the workspace already holds names that person), links
208
+ the two records, and leaves the referrer as Not a fit with the note "referred to Sam
209
+ Lee". When the email and the LinkedIn profile belong to different people, the referral
210
+ is refused with 409 `identity_conflict`. Reporting the same referral again, from
211
+ another reply, changes nothing. The named person is not in the queue yet: a
212
+ `prospects.verify` task asks you to check them against the campaign's audience
213
+ first. The thank-you is an answer like any other: the user approves it in Operator
214
+ before it is sent.
215
+
216
+ Every first email you draft ends with one plain sentence that lets the prospect opt
217
+ out, such as "If this is not for you, reply and I will not write again." When they do,
218
+ report it as a stop.
219
+
220
+ ## After the user approves
221
+
222
+ A `work.execute` task with `action: send_reply` follows. Claim it, send the answer in
223
+ the thread the prospect wrote in, report the result, then close the reply with status
224
+ `handled`, outcome `response_recorded` and the sent message's evidence as
225
+ `responseEvidenceId`. If your answer offers times for a meeting, label that sent message
226
+ `meeting_requested` with the same evidence ("Label a message you sent").
227
+
228
+ ## When a meeting is booked
229
+
230
+ - The prospect picks a slot: send the invite from the user's calendar
231
+ (`calendar.event.create`), then record `"meeting": { "at": "…Z", "source": "sent_invite" }`
232
+ in a `replies set` result.
233
+ - The prospect sent an invite: set `"invite": true` with the classification. A
234
+ `meetings.confirm` task follows, assigned to one agent of the person's assignee that
235
+ is allowed to make workspace changes and reports `calendar.event.create` or
236
+ `meeting.book`. It accepts the invite on the
237
+ assignee's calendar and records `"source": "received_invite"`. If the assignee has no
238
+ such agent, no task appears.
239
+ - The meeting moves the person to the playbook's goal stage. Record it once.
240
+
241
+ ## Before a meeting is booked
242
+
243
+ Record where an unbooked meeting stands. When the prospect writes about it, use `"meetingState"` in a
244
+ `replies set` result. When you ask for the meeting in a message you sent, label that message
245
+ `meeting_requested` (see "Label a message you sent"):
246
+
247
+ - `requested`: a time was asked for or offered, by them or by you.
248
+ - `accepted`: they agreed, and no time is fixed yet.
249
+ - `declined`: they said no to the meeting. A plain no is not a request to stop; classify the
250
+ reply on its own.
251
+
252
+ Each state is written once, and only when it differs from the last one. Nothing is written after
253
+ a booking. If a playbook step waits for a meeting and the wait runs out while the request is
254
+ `requested` or `accepted`, Audienti first asks you for a follow-up, up to 3 times (the playbook
255
+ can change the count and the wait; the default wait is 5 days). Write each follow-up yourself
256
+ after you read the whole conversation, and send it on the thread's channel. Do not use a fixed
257
+ template unless the user put one in your instructions. Save it as a plan action with the
258
+ `playbookStepKey` the task names. After the last wait runs out, Audienti records
259
+ `meeting_no_answer` itself and tells the owner. Do not record it.
260
+
261
+ ## Taken over
262
+
263
+ When the user takes a person over, every open task and draft for them is withdrawn
264
+ and no new task about them appears, in any campaign. There is no hand back. Do not
265
+ contact them again. A draft for them is refused with `taken_over`.
@@ -0,0 +1,54 @@
1
+ # Mailbox checks
2
+
3
+ Audienti never signs in to your user's mailbox. You send from it through your own email
4
+ connector (Gmail or Outlook, through Composio, a Claude connector or similar), so you also
5
+ prove it works and read it for replies. Two queue tasks ask for that. If you have no email
6
+ connector, tell your user exactly: "I need a Gmail or Outlook connector to send from your
7
+ mailbox." Never send them to Settings to connect a mailbox.
8
+
9
+ ## The test email (`mailbox.confirm`)
10
+
11
+ A mailbox counts for campaigns only once you sent a test email from it to itself, read it
12
+ back and reported its code. [The mailbox test email](mailbox-check.md) gives the steps. Your
13
+ user does nothing in that check. It proves the mailbox sends and that you can read its
14
+ inbox, which the reply checks below need too.
15
+
16
+ ## The reply check (`replies.check`)
17
+
18
+ Before any next step goes to someone you emailed, in a campaign or not, Audienti asks you to
19
+ check the mailbox the email went out from for their reply. Until you report each person, no
20
+ next step is planned or sent for them. Each task lists at most 100 people in `waiting`, each
21
+ with `person`, `name`, `participation` (null when the step is in no campaign), `attempt`
22
+ (the email) and `sentAt` (when it went out). A task for a mailbox you confirm is assigned to
23
+ you.
24
+ While you hold the task, its list stays as it was when you claimed it, even after a reply
25
+ you record. Report everyone on it.
26
+
27
+ 1. Claim the task.
28
+ 2. Search the mailbox with your connector for mail from the listed people since their
29
+ `sentAt` only. Do not read anything else.
30
+ 3. Record each reply you find the way you record any reply: `audienti prospects
31
+ conversation append PERSON --workspace ID --file ITEM.json` with `direction: inbound`
32
+ and `conversationType: direct`. It returns the evidence id. Audienti then ends the
33
+ person's wait, holds their sends and gives you a reply task, as for any reply.
34
+ 4. Report every listed person:
35
+
36
+ ```json
37
+ {
38
+ "results": [
39
+ { "kind": "email.no_reply", "person": "PERSON_ID" },
40
+ { "kind": "email.reply", "person": "PERSON_ID", "evidence": "EVIDENCE_ID" }
41
+ ]
42
+ }
43
+ ```
44
+
45
+ ```sh
46
+ audienti outcomes report TASK_ID --file RESULTS.json
47
+ ```
48
+
49
+ 5. Report the task done. If you cannot read the mailbox now, release the task with a note.
50
+
51
+ An `email.reply` whose evidence is not an inbound message of that person is not recorded
52
+ (`reply_not_recorded`): record the reply first. A person you leave out comes back on the
53
+ next check, about an hour later. Reporting the same person again for the same email returns
54
+ `already_recorded`.
@@ -0,0 +1,135 @@
1
+ ---
2
+ name: playbook-design
3
+ description: Create, reuse or revise an Audienti playbook, the stages and steps a prospect moves through from first touch to the goal. Use during getting started, when a campaign has no playbook, and whenever you or the user have a new outreach idea.
4
+ ---
5
+
6
+ # Playbook design
7
+
8
+ A playbook is what a campaign follows: the stages a prospect moves
9
+ through, the steps in each stage (channel, action, wait), the goal stage, the ways out
10
+ (off-ramps) and the voice. Audienti stores every playbook with revisions, so a good one
11
+ is written once and reused by many campaigns. Planning tasks (`prospects.plan`) read the
12
+ campaign's playbook to decide each prospect's next step, so a campaign without one
13
+ cannot be worked.
14
+
15
+ Use this skill when:
16
+
17
+ - You are getting started and the workspace has no playbook yet.
18
+ - A queue task says a campaign needs a playbook (**Draft a playbook**, or a
19
+ **Get campaign ready** task that says "pick a playbook").
20
+ - You or the user have a new idea for how to reach people: a new channel order, a
21
+ different first touch, a new voice, a new goal.
22
+
23
+ ## Rules
24
+
25
+ - Reuse before you create. Most new campaigns fit a playbook that already exists.
26
+ - Use only channels you can cover with accounts you reported (LinkedIn, Email). For anything you cannot do yourself, such as a call, a voicemail, a handwritten note, a video or a gift, use a `Custom` step: you prepare it and a person does it. A Custom step can wait for a named event the person records (`wait.until` `event`), for example "Gift delivered".
27
+ Do not draft a phone step if no one can call.
28
+ - One playbook is one strategy. A correction to the same strategy (a wait, a step's
29
+ wording, a missing off-ramp) is a new revision. A different strategy is a new
30
+ playbook, so the two can be compared in Analytics.
31
+ - Saving a playbook never changes campaigns already pinned to it. Pin the new
32
+ revision on purpose.
33
+ - Never invent results or proof points for the voice. Use the user's words.
34
+ - Every first email ends with one plain sentence that lets the prospect opt out, such
35
+ as "If this is not for you, reply and I will not write again." Say so in the first
36
+ email step's `instructions`. A prospect who opts out is suppressed for good.
37
+ - Ask the user before a new playbook is used for outreach. Nothing is sent without
38
+ their approval.
39
+
40
+ ## 1. Reuse first
41
+
42
+ 1. `audienti playbook list` shows one page of summaries: name, latest revision and stage and step
43
+ counts. Follow `nextCursor` for more; `--limit N` sets the page size.
44
+ Every workspace has three starter playbooks (`system: true`): Email first, LinkedIn
45
+ first and Email only. When your reported channels point to one, the list marks it
46
+ `recommended: true` and returns a `recommendation` with its `reason`. A confirmed
47
+ LinkedIn account gives LinkedIn first: the user registered it as a sender account and
48
+ authorized you on it, and your report for it is healthy and includes `send_message`.
49
+ Email with LinkedIn not yet confirmed gives Email first; email alone gives Email only.
50
+ 2. `audienti playbook show ID` shows the stages, steps, goal and voice.
51
+ 3. If one fits the campaign's offer, audience and your channels, use it. Say in one
52
+ line why it fits, then go to step 4 (pin it). A starter playbook can be pinned as it
53
+ is, but it is read-only: to change it, save its fields as a new playbook (no `id`,
54
+ `expectedRevision` 0) with a new name, and revise that copy. Saving a starter
55
+ playbook with its `id` fails with 409 `starter_playbook`.
56
+
57
+ ## 2. Draft a new playbook
58
+
59
+ Start from the user's offer, the audience and the channels you have. A good default
60
+ for founder-led or agent-led outbound has five to six stages:
61
+
62
+ 1. **Ready** (Agent): the prospect is in the campaign. No steps.
63
+ 2. **Warming** (Agent, optional): view the profile, like a recent post. Skip it when
64
+ LinkedIn is not available.
65
+ 3. **Outreach underway** (Agent): the touches, in order, with waits. For example a
66
+ connection request (wait 21 days), a message "Only if connected" (wait 5), a first
67
+ email (wait 4). Completes to the **Unresponsive** off-ramp when every step is done
68
+ and nobody replied.
69
+ 4. **In conversation** (Assignee): the prospect replied. A person drafts or approves
70
+ the reply. Completion `stay`.
71
+ 5. **Meeting requested** (Assignee).
72
+ 6. **Meeting booked** (Assignee, goal, `goalDays` 0).
73
+
74
+ Write `instructions` on each step as coaching for whoever does it: what to say, what
75
+ evidence to lead with, what to avoid. Write `voice` as two or three sentences in the
76
+ user's style. See [fields and an example request](references/fields.md) for every
77
+ field and the rules Audienti checks.
78
+
79
+ ## 3. Save it
80
+
81
+ 1. Write the request to a file: `expectedRevision` 0 and no `id` for a new playbook;
82
+ the playbook's `id` and its current revision number to revise one. Use a fresh
83
+ `requestId` (a UUID) and fresh UUIDs for every stage, step and off-ramp `key`.
84
+ Keep the same keys when you revise, so progress already recorded stays on its stage.
85
+ 2. `audienti playbook save --file REQUEST.json`. Over MCP use `playbook_save`.
86
+ 3. If the save fails, read the error: `field` is the path of the wrong value, `allowed` the
87
+ values that work and `next` what to do. Fix that field and retry with the same
88
+ `requestId`. Run `audienti playbook actions` for the step action ids, channels and event
89
+ names. If `next` says to ask your user (for example to turn on Allow workspace changes),
90
+ ask with `audienti ask` and carry on with what you can. If it reports a revision conflict, the error gives `currentRevision`: run
91
+ `playbook show ID`, apply your change to that revision and save with that `expectedRevision`.
92
+
93
+ ## 4. Ask the user and pin it
94
+
95
+ 1. Ask in Audienti, not in chat: `audienti ask "Use this playbook for CAMPAIGN?"
96
+ --context "SUMMARY" --option "Use it" --option "Change it"`. Put the stages, the
97
+ touches with their waits, the goal and the voice in the context as a short list.
98
+ 2. When they answer, apply their changes as a new revision.
99
+ 3. Pin it to the campaign with `playbookPin` `{ "id": PLAYBOOK_ID, "revision": N }`:
100
+ in `audienti campaign create` for a new campaign, or in the campaign's draft update
101
+ for a draft. An active campaign keeps its pin; to try a new playbook, make a
102
+ successor (below).
103
+
104
+ ## New ideas
105
+
106
+ When you or the user have a new idea for how to reach people:
107
+
108
+ 1. Write the idea as one change: "Lead with email instead of a connection request",
109
+ "Add a phone step after the second email", "Offer a teardown, not a demo".
110
+ 2. If it is a correction, save a new revision of the same playbook.
111
+ 3. If it is a different strategy, save a new playbook named for the idea.
112
+ 4. Test it with `audienti campaign successor ID` that changes only the playbook, so
113
+ the old and new campaigns can be compared. Name what changed in the campaign notes.
114
+ 5. Ask the user before the successor starts.
115
+
116
+ ## Record progress and ask when the rules cannot decide
117
+
118
+ Read the playbook before doing work for a campaign pinned to it: `audienti playbook
119
+ show PLAYBOOK_ID`. Stage plays are instructions for you, the external agent; they are
120
+ not a hosted sequence that runs by itself.
121
+
122
+ - Progress: `audienti playbook record --file PATH` with exactly one of `stageKey`,
123
+ `offRampKey` or `finishStage: true`, the participation's pinned playbook version and
124
+ its current expected progress version, and stored evidence. Do not invent outcomes.
125
+ `audienti playbook` prints the command usage; the API schema has the required fields.
126
+ - When you see something that moves a person (a reply, an accept, a booked meeting), record
127
+ that event; the playbook's rules decide the move. If the rules cannot decide, ask the
128
+ user with `audienti ask "QUESTION"`. The question appears in Operator.
129
+ - None of these commands sends a message to a provider.
130
+
131
+ ## Done
132
+
133
+ Close your queue task with a note that names the playbook, its revision and the
134
+ campaign it is pinned to: `audienti queue done TASK --note "Saved Founder-led outbound
135
+ r1, pinned to Logistics UK test"`.
@@ -0,0 +1,145 @@
1
+ # Playbook fields
2
+
3
+ `audienti playbook save --file REQUEST.json` accepts one object:
4
+
5
+ | Field | Rule |
6
+ | --- | --- |
7
+ | `id` | Omit for a new playbook. The playbook ID to revise one. |
8
+ | `expectedRevision` | 0 for a new playbook, otherwise the latest revision number. |
9
+ | `requestId` | A fresh UUID. Reuse it only when you retry the same save. |
10
+ | `fields` | The playbook itself, below. |
11
+
12
+ ## fields
13
+
14
+ | Field | Rule |
15
+ | --- | --- |
16
+ | `name` | 1 to 120 characters. Name the strategy, not the campaign. |
17
+ | `stages` | 2 to 30 stages, in order. Leave it out for the default skeleton (see Defaults). |
18
+ | `goalKey` | The `key` of the goal stage. Not the first stage. Left out, it is the last stage (with `stages` left out too, the skeleton's last stage). |
19
+ | `offRamps` | Up to 30 ways out: `{ key, name, reason }`. `reason` is `rejected`, `not_fit`, `nurture`, `unresponsive` or `other`. The system sets `taken_over`, `bounced` and `skipped` itself; do not choose them. "Bad data" and "repair" are not off-ramps. |
20
+ | `voice` | How messages should sound, in the user's style. |
21
+ | `eventRules` | Optional: what happens when an event reaches a person, for any stage and step. A new playbook starts with three (below); leave the field out to keep them, or send the whole list to replace it. See Event rules. |
22
+ | `rules` | Optional: `allowBackward` (boolean, default false): let a move go to an earlier stage. Approval of a move is a setting on the account, not a playbook rule. |
23
+
24
+ ## Defaults
25
+
26
+ When you change a playbook you already have, a part you leave out (`stages`, `goalKey`, `offRamps`, `voice`) stays as it is. For a new playbook, leave a field out and the server fills the best-practice value, the same on the CLI, MCP, REST and in the editor. What you write is kept, even a weak choice; the Playbook check warns about those.
27
+
28
+ | Left out | Value |
29
+ | --- | --- |
30
+ | `stages` | Ready, Outreach underway (no steps; people who finish it leave as Unresponsive), In conversation (worked by a person) and Meeting booked as the goal. `playbook save` with only a `name` makes this. |
31
+ | `offRamps` | Unresponsive, Not interested and Not a fit. |
32
+ | an off-ramp `reason` | Guessed from the name (Not interested is `rejected`, Not a fit is `not_fit`, Unresponsive is `unresponsive`), else `other`. |
33
+ | `voice` | One plain, short sentence. A blank voice gets it too. |
34
+ | a stage `goalDays` | The waits of its main steps plus 2 days, at least 3. The goal stage gets 0. |
35
+ | a stage `completion` | A stage with steps that an agent works, other than the goal, closes people out as Unresponsive. Other stages stay. |
36
+ | a step `condition` | `Only if connected` for a LinkedIn message, else `Always`. |
37
+ | a step `instructions` | One coaching sentence for the kind of action. |
38
+ | a main step `wait` | Only for a step that is new in this save. A step that sends waits 3 days for a reply; a connection request waits 7 days for the accept; a step that sends nothing has no wait. A step the playbook already has keeps what it has, and `"wait": null` means no wait. |
39
+
40
+ ## The Playbook check
41
+
42
+ Every read and save of a playbook returns `warnings`, a deterministic check that needs no agent. An item
43
+ is `{ id, level, message, stageKey, stepKey, fix }`. A save is refused with `playbook_cannot_work` (422,
44
+ the list in `errors`) when `offRamps` is empty or a stage has `on: []` and nothing sends people to it.
45
+ The other items are warnings; read them after each save and clear them:
46
+
47
+ | Item `id` | Meaning and default fix |
48
+ | --- | --- |
49
+ | `stage_never_ends` | A stage with steps and `completion` `stay`. Use `off_ramp` with the Unresponsive off-ramp. |
50
+ | `stage_by_hand_only` | Nothing opens a stage but a person or agent. Give it an `on` event ("Jump forward to here when") or finish the stage before it with `next`. The first stage after Ready is not flagged. |
51
+ | `send_without_wait` | A send step with no `wait`, followed by another send on the same channel. Add a wait. |
52
+ | `goal_shorter_than_waits` | `goalDays` is below the waits added up. Use the waits plus 2 days. |
53
+ | `send_in_person_stage` | A send step in the goal stage or an `Assignee` stage writes to someone who already answered. Remove it. |
54
+ | `steps_after_break_up` | A step after the break-up email. Put it before the break-up step. |
55
+ | `message_without_connection` | A LinkedIn message with condition `Always` and no connection request before it. Use `Only if connected`. |
56
+ | `stages_loop` | Routes or rules send people between stages in a circle. |
57
+
58
+ ## Stage
59
+
60
+ | Field | Rule |
61
+ | --- | --- |
62
+ | `key` | A UUID, unique in the playbook. Keep it across revisions. |
63
+ | `name` | Unique in the playbook. |
64
+ | `on` | The events that jump a prospect forward to this stage: `accept` (they accept your LinkedIn connection request, not a meeting invite), `reply` or `meeting` (a booked meeting). Do not list `accept` or `reply` on the goal stage unless a reply or an accept should count as a win. An event moves the prospect to the furthest later stage that lists it; the stages passed over are recorded as skipped, never as done. Leave it out for a stage people reach when the stage before it finishes, or when a person moves them. Do not set it on the first stage. People and the pipeline read "Starts when they reply" from it. The older `movesInWhen` text and the value `manual` are accepted and ignored. |
65
+ | `owner` | `Agent` or `Assignee` (the person assigned to the prospect). |
66
+ | `goalDays` | 0 to 365. The days after which a prospect in this stage is overdue (the pipeline card turns orange). 0 means never overdue. |
67
+ | `enabled` | Defaults to true. `false` skips the stage: no one is moved into it. The first stage and the goal stage cannot be skipped. |
68
+ | `steps` | Up to 20 steps. |
69
+ | `completion` | `{ "kind": "next" }`, `{ "kind": "stay" }` or `{ "kind": "off_ramp", "offRampKey": KEY }`. The last enabled stage cannot use `next`. |
70
+
71
+ ## Step
72
+
73
+ | Field | Rule |
74
+ | --- | --- |
75
+ | `key` | A UUID, unique in the playbook. A plan action that runs this step carries it as `playbookStepKey`; actions without it change no playbook progress. |
76
+ | `channel` | `LinkedIn`, `Email` or `Custom`. A `Custom` step is something you cannot do, for example a phone call, a voicemail, a handwritten note, a video or a gift. You prepare the script, note or choice, and a person does it by hand and records what happened on the Hand tasks page. A Custom step is never a side step and sends nothing. |
77
+ | `action` | A short label, for example "Send connection request". |
78
+ | `condition` | `Always`, `Only if viable` or `Only if connected`. `Only if connected` is checked: a person who was sent a connection request and has not accepted is skipped for the step; a person with no request on record is not blocked, because they may already be connected. A stage that opens on `accept` gates the same way. Left out, a LinkedIn message gets `Only if connected` and everything else `Always`. |
79
+ | `viability` | Required with `Only if viable`: when the step makes sense. An Email step is skipped, without a card, for a person with no email on record, whatever its condition. |
80
+ | `instructions` | Coaching for whoever does the step. |
81
+ | `wait` | Optional: `{ "until": U, "days": N }`. `until` is `accept` (LinkedIn steps only), `reply`, `meeting`, `timeout` or `event` (Custom steps only); `days` is 1 to 60. An `event` wait also needs `"event": "Gift delivered"` (the name of what the person records); the person records it on the Hand tasks page and that ends the wait, and so does a reply, a booked meeting or the days running out. The wait starts when the agent reports the step's result with its step key: a plan action carries the step's `key` as `playbookStepKey`, and a succeeded result for that action starts the wait. A reply or a booked meeting ends every wait early; an accept ends only a wait until `accept`. Older playbooks used `waitDays: N`, which still reads as `{ "until": "timeout", "days": N }`. |
82
+ | `side` | Defaults to false. A side step runs while the main step before it waits, for example a profile view or a like. A stage with side steps needs a main step. |
83
+ | `onTimeout` | `next` (default) or `off_ramp`. With `off_ramp`, a main step whose wait runs out leaves the prospect through the `unresponsive` off-ramp. When nothing is left in the stage, its completion decides. |
84
+ | `routes` | Optional: `{ "accept"?: T, "reply"?: T, "meeting"?: T }`, where `T` is `{ "kind": "stage", "stageKey": "<uuid>" }` or `{ "kind": "off_ramp", "offRampKey": "<uuid>" }`. Where an event that reaches the person after this step ran sends them. The step's route wins over the stage's `on` list; an event with no route follows the stage. A main step only; `accept` only on a LinkedIn step. A route to an earlier stage needs `rules.allowBackward`. |
85
+ | `actionId` | Optional: an action id from the outreach rulebook, for example `linkedin.message.send`. It must match the step's `channel`. List the valid ids with their channel and label: `audienti playbook actions` (MCP `playbook_actions_list`). The `action` text stays the label the person reads. |
86
+ | `eventRules` | Optional, up to 10: event rules for this step only. See Event rules. |
87
+
88
+ ## Event rules
89
+
90
+ An event rule says what happens when an event reaches a person: do these things, then go here. It lives on the playbook (`fields.eventRules`, up to 30), on a stage (`eventRules`, up to 10) or on a step (up to 10). The nearest place wins, then the most specific event: a reply kind beats any reply. A step `routes` entry is the older form of the same thing.
91
+
92
+ | Field | Rule |
93
+ | --- | --- |
94
+ | `key` | A UUID, unique in the playbook. |
95
+ | `when` | The event: `accepted`, `replied`, `meeting_booked`, `wait_timeout`, `inbound_connection_request`, or a reply kind `reply.interested`, `reply.question`, `reply.later`, `reply.out_of_office`, `reply.wrong_person`, `reply.referral`. An unknown name is refused with the allowed names; `audienti playbook actions` lists them under `eventRules.when`. |
96
+ | `do` | Optional list of `stop_wait`, `snooze`, `redirect_to_named_person`, `ask_who_is_right`, `tell_me`, `hand_to_user`, `withdraw_pending_request`. Also under `eventRules.do`. |
97
+ | `snoozeDays` | 1 to 90. For `snooze`. |
98
+ | `goto` | Where the person goes after: `{ "kind": "stay" }`, `{ "kind": "gate" }` (the stage's own next step; the default), or `{ "kind": "stage", "stageKey": KEY }`, `{ "kind": "off_ramp", "offRampKey": KEY }` or `{ "kind": "step", "stepKey": KEY }`. |
99
+
100
+ Every new playbook starts with these three on the playbook, when you send no `eventRules`:
101
+
102
+ - `reply.interested`: `stop_wait`, then `gate`.
103
+ - `reply.out_of_office`: `snooze` for 7 days, then `stay`.
104
+ - `reply.wrong_person`: `stop_wait`, `redirect_to_named_person`, `ask_who_is_right`, then `stay`.
105
+
106
+ Taking someone off the list and a bounce always run first; no rule changes them.
107
+
108
+ A LinkedIn step whose `actionId` is `linkedin.inmail.send` runs only when the LinkedIn account reports InMail available. Otherwise it is skipped without a card.
109
+
110
+ ## Example request
111
+
112
+ Replace every `<uuid>` with a fresh UUID (`uuidgen` or `node -e "console.log(crypto.randomUUID())"`).
113
+ Use the same UUID wherever the same placeholder letter appears.
114
+
115
+ ```json
116
+ {
117
+ "expectedRevision": 0,
118
+ "requestId": "<uuid>",
119
+ "fields": {
120
+ "name": "Founder-led outbound",
121
+ "stages": [
122
+ { "key": "<A>", "name": "Ready", "owner": "Agent", "goalDays": 3, "steps": [], "completion": { "kind": "next" } },
123
+ { "key": "<B>", "name": "Warming", "owner": "Agent", "goalDays": 7, "steps": [
124
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "View profile", "condition": "Always", "instructions": "Read their recent activity for a signal to mention." },
125
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "Like a recent post", "condition": "Always", "instructions": "Only a post about their work.", "wait": { "until": "timeout", "days": 3 } }
126
+ ], "completion": { "kind": "next" } },
127
+ { "key": "<C>", "name": "Outreach underway", "owner": "Agent", "goalDays": 35, "steps": [
128
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "Send connection request", "condition": "Always", "instructions": "No note, or one line on their signal.", "wait": { "until": "accept", "days": 21 } },
129
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "View profile", "condition": "Always", "instructions": "A light touch while the request waits.", "side": true },
130
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "Send message", "condition": "Only if connected", "instructions": "Lead with their signal and offer something useful.", "wait": { "until": "reply", "days": 5 } },
131
+ { "key": "<uuid>", "channel": "Email", "action": "Email 1", "condition": "Always", "instructions": "Three sentences: signal, offer, one short question.", "wait": { "until": "reply", "days": 4 }, "onTimeout": "off_ramp" }
132
+ ], "completion": { "kind": "off_ramp", "offRampKey": "<R>" } },
133
+ { "key": "<D>", "name": "In conversation", "on": ["reply"], "owner": "Assignee", "goalDays": 3, "steps": [
134
+ { "key": "<uuid>", "channel": "Email", "action": "Draft a reply", "condition": "Always", "instructions": "Answer their question first. Propose a time only if they asked.", "wait": { "until": "reply", "days": 2 } }
135
+ ], "completion": { "kind": "stay" } },
136
+ { "key": "<E>", "name": "Meeting requested", "owner": "Assignee", "goalDays": 3, "steps": [], "completion": { "kind": "next" } },
137
+ { "key": "<F>", "name": "Meeting booked", "on": ["meeting"], "owner": "Assignee", "goalDays": 0, "steps": [], "completion": { "kind": "stay" } }
138
+ ],
139
+ "goalKey": "<F>",
140
+ "offRamps": [{ "key": "<R>", "name": "Unresponsive", "reason": "unresponsive" }],
141
+ "voice": "Write like a founder. Lead with their signal, offer something useful, and ask one short question.",
142
+ "rules": { "allowBackward": false }
143
+ }
144
+ }
145
+ ```