@audienti/cli 0.2.0-exora.1 → 0.2.0-exora.10

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 (85) hide show
  1. package/README.md +30 -6
  2. package/cli/account-reply-operations.mjs +26 -1
  3. package/cli/agents.mjs +67 -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 +114 -21
  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/discovery-operations.mjs +4 -3
  22. package/cli/discovery.mjs +3 -2
  23. package/cli/file-operations.mjs +29 -0
  24. package/cli/files.mjs +14 -0
  25. package/cli/guardrails-operations.mjs +12 -0
  26. package/cli/guardrails.mjs +37 -0
  27. package/cli/json-file.mjs +1 -1
  28. package/cli/kv-operations.mjs +17 -0
  29. package/cli/kv.mjs +58 -0
  30. package/cli/mcp.mjs +3 -3
  31. package/cli/notification-operations.mjs +8 -0
  32. package/cli/offer-operations.mjs +1 -1
  33. package/cli/outbound-operations.mjs +16 -0
  34. package/cli/outbound.mjs +54 -0
  35. package/cli/outcome-operations.mjs +26 -0
  36. package/cli/outcomes.mjs +16 -0
  37. package/cli/owner-account-client.mjs +3 -3
  38. package/cli/playbook-help.mjs +79 -0
  39. package/cli/playbook-operations.mjs +36 -0
  40. package/cli/progress.mjs +21 -7
  41. package/cli/question-operations.mjs +12 -0
  42. package/cli/questions.mjs +32 -0
  43. package/cli/queue-operations.mjs +12 -0
  44. package/cli/queue.mjs +25 -0
  45. package/cli/recipient-operations.mjs +1 -1
  46. package/cli/recipients.mjs +6 -2
  47. package/cli/rooms-operations.mjs +48 -0
  48. package/cli/rooms.mjs +160 -0
  49. package/cli/search-operations.mjs +9 -0
  50. package/cli/secret-operations.mjs +7 -0
  51. package/cli/secrets.mjs +30 -0
  52. package/cli/sender-account-operations.mjs +6 -2
  53. package/cli/sender-accounts.mjs +18 -8
  54. package/cli/skills-mcp.mjs +13 -6
  55. package/cli/skills.mjs +73 -16
  56. package/cli/tools-operations.mjs +18 -10
  57. package/cli/tools.mjs +48 -20
  58. package/cli/usage-operations.mjs +8 -0
  59. package/cli/usage.mjs +41 -0
  60. package/cli/work-execution-operations.mjs +7 -0
  61. package/cli/work-execution.mjs +3 -3
  62. package/cli/work-operations.mjs +7 -5
  63. package/cli/work.mjs +11 -6
  64. package/cli/workspaces.mjs +121 -24
  65. package/package.json +2 -2
  66. package/skills/agent-rooms/SKILL.md +140 -0
  67. package/skills/agent-rooms/references/commands.md +78 -0
  68. package/skills/audienti/SKILL.md +112 -6
  69. package/skills/audienti/references/helpers.md +15 -2
  70. package/skills/audienti/references/profile-workflows.md +6 -4
  71. package/skills/audienti/scripts/contracts.mjs +1 -1
  72. package/skills/getting-started/SKILL.md +227 -0
  73. package/skills/getting-started/references/audience.md +143 -0
  74. package/skills/getting-started/references/campaign-draft.md +80 -0
  75. package/skills/getting-started/references/capabilities.md +237 -0
  76. package/skills/getting-started/references/mailbox-check.md +64 -0
  77. package/skills/getting-started/references/outcome-checks.md +114 -0
  78. package/skills/getting-started/references/replies.md +186 -0
  79. package/skills/getting-started/references/reply-checks.md +54 -0
  80. package/skills/playbook-design/SKILL.md +136 -0
  81. package/skills/playbook-design/references/fields.md +130 -0
  82. package/source-manifest.json +83 -38
  83. package/cli/approach-operations.mjs +0 -12
  84. package/cli/experiment-operations.mjs +0 -25
  85. package/cli/experiments.mjs +0 -26
@@ -0,0 +1,186 @@
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
+ ## Stop, bounce and referral
79
+
80
+ These three need no decision from the user. Classify the reply, report the typed
81
+ `result` next to the classification it matches, and Audienti records it against the
82
+ person. The classification without its result is refused with 400 naming the result it
83
+ needs (`reply.stop`, `email.bounce` or `reply.referral`). Use the prospect's words,
84
+ verbatim, for `quote`.
85
+
86
+ - **Stop** (`stop`): the prospect asked not to be contacted. Report status `handled`,
87
+ outcome `suppressed` and no draft:
88
+
89
+ ```json
90
+ { "classification": "stop", "status": "handled", "outcome": "suppressed",
91
+ "result": { "type": "reply.stop", "scope": "person", "quote": "Please remove me from your list." } }
92
+ ```
93
+
94
+ The person is suppressed for good on every channel, their pending sends and open
95
+ tasks are withdrawn, and they leave their campaigns. The user cannot override it.
96
+ Use `"scope": "company"` only when they asked to stop for their whole company:
97
+ everyone at the company's domain is suppressed, and so is anyone added later. The
98
+ domain goes on the do-not-contact list marked "Asked to stop", and no one can remove it.
99
+ Never contact a person who asked to stop again, on any channel.
100
+ - **Bounce** (`bounce`): a delivery failure came back instead of a reply. Report
101
+ status `not_reply` and no draft:
102
+
103
+ ```json
104
+ { "classification": "bounce", "status": "not_reply", "outcome": null,
105
+ "result": { "type": "email.bounce", "address": "priya@example.com", "kind": "hard", "evidence": "550 5.1.1 User unknown" } }
106
+ ```
107
+
108
+ `address` is the address that bounced: the person's own address, or one nobody in the
109
+ workspace holds. An address another person holds is refused with 409
110
+ `address_belongs_to_another_person`; report the bounce on the reply that came back
111
+ about that person instead.
112
+ `hard` means the address does not exist or refuses mail: it is marked bounced and
113
+ blocked in every campaign, and the person leaves the campaign as Bounced. `soft`
114
+ means a full mailbox or a temporary failure: the address is held for 24 hours, then
115
+ a retry task asks you to send the message once more. Retried once means exactly one
116
+ send: after the 24 hours the address takes one send, and every other send to it is
117
+ refused with `recipient_contact_bounced` until that send's outcome is known. A second
118
+ bounce within 14 days of the retry counts as hard; with no bounce in that time the
119
+ address opens again. Put the bounce message and its status code in `evidence`.
120
+ - **Referral** (`referral`): the prospect is the wrong person and named someone else.
121
+ Report status `needs_handling` with a thank-you as the draft, and name the person:
122
+
123
+ ```json
124
+ { "classification": "referral", "status": "needs_handling", "outcome": null,
125
+ "result": { "type": "reply.referral", "name": "Sam Lee", "title": "Finance lead",
126
+ "email": "sam@example.com", "quote": "Wrong person, try Sam Lee in finance." },
127
+ "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" } }
128
+ ```
129
+
130
+ Give `linkedinUrl` or `email` when the prospect gave them. Audienti finds or adds the
131
+ named person (an email someone in the workspace already holds names that person), links
132
+ the two records, and leaves the referrer as Not a fit with the note "referred to Sam
133
+ Lee". When the email and the LinkedIn profile belong to different people, the referral
134
+ is refused with 409 `identity_conflict`. Reporting the same referral again, from
135
+ another reply, changes nothing. The named person is not in the queue yet: a
136
+ `prospects.verify` task asks you to check them against the campaign's audience
137
+ first. The thank-you is an answer like any other: the user approves it in Operator
138
+ before it is sent.
139
+
140
+ Every first email you draft ends with one plain sentence that lets the prospect opt
141
+ out, such as "If this is not for you, reply and I will not write again." When they do,
142
+ report it as a stop.
143
+
144
+ ## After the user approves
145
+
146
+ A `work.execute` task with `action: send_reply` follows. Claim it, send the answer in
147
+ the thread the prospect wrote in, report the result, then close the reply with status
148
+ `handled`, outcome `response_recorded` and the sent message's evidence as
149
+ `responseEvidenceId`.
150
+
151
+ ## When a meeting is booked
152
+
153
+ - The prospect picks a slot: send the invite from the user's calendar
154
+ (`calendar.event.create`), then record `"meeting": { "at": "…Z", "source": "sent_invite" }`
155
+ in a `replies set` result.
156
+ - The prospect sent an invite: set `"invite": true` with the classification. A
157
+ `meetings.confirm` task follows, assigned to one agent of the person's assignee that
158
+ is allowed to make workspace changes and reports `calendar.event.create` or
159
+ `meeting.book`. It accepts the invite on the
160
+ assignee's calendar and records `"source": "received_invite"`. If the assignee has no
161
+ such agent, no task appears.
162
+ - The meeting moves the person to the playbook's goal stage. Record it once.
163
+
164
+ ## Before a meeting is booked
165
+
166
+ Record where an unbooked meeting stands with `"meetingState"` in a `replies set` result:
167
+
168
+ - `requested`: a time was asked for or offered.
169
+ - `accepted`: they agreed, and no time is fixed yet.
170
+ - `declined`: they said no to the meeting. A plain no is not a request to stop; classify the
171
+ reply on its own.
172
+
173
+ Each state is written once, and only when it differs from the last one. Nothing is written after
174
+ a booking. If a playbook step waits for a meeting and the wait runs out while the request is
175
+ `requested` or `accepted`, Audienti first asks you for a follow-up, up to 3 times (the playbook
176
+ can change the count and the wait; the default wait is 5 days). Write each follow-up yourself
177
+ after you read the whole conversation, and send it on the thread's channel. Do not use a fixed
178
+ template unless the user put one in your instructions. Save it as a plan action with the
179
+ `playbookStepKey` the task names. After the last wait runs out, Audienti records
180
+ `meeting_no_answer` itself and tells the owner. Do not record it.
181
+
182
+ ## Taken over
183
+
184
+ When the user takes a person over, every open task and draft for them is withdrawn
185
+ and no new task about them appears, in any campaign. There is no hand back. Do not
186
+ 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,136 @@
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).
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 for review
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
+ - Human review: `audienti playbook suggest --file PATH`. The user approves or dismisses
127
+ it in **Operator → Queue**. A suggestion does not move a stage, and agents cannot
128
+ approve one. A stay completion records work without moving the stage.
129
+ `audienti playbook suggestions` lists the suggestions you can see.
130
+ - None of these commands sends a message to a provider.
131
+
132
+ ## Done
133
+
134
+ Close your queue task with a note that names the playbook, its revision and the
135
+ campaign it is pinned to: `audienti queue done TASK --note "Saved Founder-led outbound
136
+ r1, pinned to Logistics UK test"`.
@@ -0,0 +1,130 @@
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. |
18
+ | `goalKey` | The `key` of the goal stage. Not the first 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
+ ## The Playbook check
25
+
26
+ Every read and save of a playbook returns `warnings`, a deterministic check that needs no agent. An item
27
+ is `{ id, level, message, stageKey, stepKey, fix }`. A save is refused with `playbook_cannot_work` (422,
28
+ the list in `errors`) when `offRamps` is empty or a stage has `on: []` and nothing sends people to it.
29
+ The other items are warnings; read them after each save and clear them:
30
+
31
+ | Item `id` | Meaning and default fix |
32
+ | --- | --- |
33
+ | `stage_never_ends` | A stage with steps and `completion` `stay`. Use `off_ramp` with the Unresponsive off-ramp. |
34
+ | `stage_by_hand_only` | Nothing opens a stage but a person or agent. Give it an `on` event or finish the stage before it with `next`. |
35
+ | `send_without_wait` | A send step with no `wait`, followed by another send on the same channel. Add a wait. |
36
+ | `goal_shorter_than_waits` | `goalDays` is below the waits added up. Use the waits plus 2 days. |
37
+ | `send_in_person_stage` | A send step in the goal stage or an `Assignee` stage writes to someone who already answered. Remove it. |
38
+ | `steps_after_break_up` | A step after the break-up email. Put it before the break-up step. |
39
+ | `message_without_connection` | A LinkedIn message with condition `Always` and no connection request before it. Use `Only if connected`. |
40
+ | `stages_loop` | Routes or rules send people between stages in a circle. |
41
+
42
+ ## Stage
43
+
44
+ | Field | Rule |
45
+ | --- | --- |
46
+ | `key` | A UUID, unique in the playbook. Keep it across revisions. |
47
+ | `name` | Unique in the playbook. |
48
+ | `movesInWhen` | What moves a prospect into this stage, for example "They replied". Shown to people; `on` decides. |
49
+ | `on` | The events that open this stage: `accept`, `reply`, `meeting` or `manual`. Defaults to `["manual"]`. An event moves the prospect to the furthest later stage that opens on it; the stages passed over are recorded as skipped, never as done. |
50
+ | `owner` | `Agent` or `Assignee` (the person assigned to the prospect). |
51
+ | `goalDays` | 0 to 365. The days after which a prospect in this stage is overdue (the pipeline card turns orange). 0 means never overdue. |
52
+ | `enabled` | Defaults to true. `false` skips the stage: no one is moved into it. The first stage and the goal stage cannot be skipped. |
53
+ | `steps` | Up to 20 steps. |
54
+ | `completion` | `{ "kind": "next" }`, `{ "kind": "stay" }` or `{ "kind": "off_ramp", "offRampKey": KEY }`. The last enabled stage cannot use `next`. |
55
+
56
+ ## Step
57
+
58
+ | Field | Rule |
59
+ | --- | --- |
60
+ | `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. |
61
+ | `channel` | `LinkedIn` or `Email`. A phone call or a gift is not a step yet (#433): tell your user, and use an Email step with the call in its instructions. |
62
+ | `action` | A short label, for example "Send connection request". |
63
+ | `condition` | `Always`, `Only if viable` or `Only if connected`. Audienti does not check a connection itself: put an `Only if connected` step in a stage that opens on `accept`, so entering the stage on the accept is what gates it. |
64
+ | `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. |
65
+ | `instructions` | Coaching for whoever does the step. |
66
+ | `wait` | Optional: `{ "until": U, "days": N }`. `until` is `accept` (LinkedIn steps only), `reply`, `meeting` or `timeout`; `days` is 1 to 60. 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 }`. |
67
+ | `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. |
68
+ | `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. |
69
+ | `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`. |
70
+ | `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. |
71
+ | `eventRules` | Optional, up to 10: event rules for this step only. See Event rules. |
72
+
73
+ ## Event rules
74
+
75
+ 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.
76
+
77
+ | Field | Rule |
78
+ | --- | --- |
79
+ | `key` | A UUID, unique in the playbook. |
80
+ | `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`. |
81
+ | `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`. |
82
+ | `snoozeDays` | 1 to 90. For `snooze`. |
83
+ | `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 }`. |
84
+
85
+ Every new playbook starts with these three on the playbook, when you send no `eventRules`:
86
+
87
+ - `reply.interested`: `stop_wait`, then `gate`.
88
+ - `reply.out_of_office`: `snooze` for 7 days, then `stay`.
89
+ - `reply.wrong_person`: `stop_wait`, `redirect_to_named_person`, `ask_who_is_right`, then `stay`.
90
+
91
+ Taking someone off the list and a bounce always run first; no rule changes them.
92
+
93
+ 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.
94
+
95
+ ## Example request
96
+
97
+ Replace every `<uuid>` with a fresh UUID (`uuidgen` or `node -e "console.log(crypto.randomUUID())"`).
98
+ Use the same UUID wherever the same placeholder letter appears.
99
+
100
+ ```json
101
+ {
102
+ "expectedRevision": 0,
103
+ "requestId": "<uuid>",
104
+ "fields": {
105
+ "name": "Founder-led outbound",
106
+ "stages": [
107
+ { "key": "<A>", "name": "Ready", "owner": "Agent", "goalDays": 3, "steps": [], "completion": { "kind": "next" } },
108
+ { "key": "<B>", "name": "Warming", "owner": "Agent", "goalDays": 7, "steps": [
109
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "View profile", "condition": "Always", "instructions": "Read their recent activity for a signal to mention." },
110
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "Like a recent post", "condition": "Always", "instructions": "Only a post about their work.", "wait": { "until": "timeout", "days": 3 } }
111
+ ], "completion": { "kind": "next" } },
112
+ { "key": "<C>", "name": "Outreach underway", "owner": "Agent", "goalDays": 35, "steps": [
113
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "Send connection request", "condition": "Always", "instructions": "No note, or one line on their signal.", "wait": { "until": "accept", "days": 21 } },
114
+ { "key": "<uuid>", "channel": "LinkedIn", "action": "View profile", "condition": "Always", "instructions": "A light touch while the request waits.", "side": true },
115
+ { "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 } },
116
+ { "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" }
117
+ ], "completion": { "kind": "off_ramp", "offRampKey": "<R>" } },
118
+ { "key": "<D>", "name": "In conversation", "movesInWhen": "They replied", "on": ["reply"], "owner": "Assignee", "goalDays": 3, "steps": [
119
+ { "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 } }
120
+ ], "completion": { "kind": "stay" } },
121
+ { "key": "<E>", "name": "Meeting requested", "owner": "Assignee", "goalDays": 3, "steps": [], "completion": { "kind": "next" } },
122
+ { "key": "<F>", "name": "Meeting booked", "on": ["meeting"], "owner": "Assignee", "goalDays": 0, "steps": [], "completion": { "kind": "stay" } }
123
+ ],
124
+ "goalKey": "<F>",
125
+ "offRamps": [{ "key": "<R>", "name": "Unresponsive", "reason": "unresponsive" }],
126
+ "voice": "Write like a founder. Lead with their signal, offer something useful, and ask one short question.",
127
+ "rules": { "allowBackward": false }
128
+ }
129
+ }
130
+ ```