Copilot — your in-app AI operator

Copilot is more than chat. It can read your reports + billing, draft campaigns + automations + templates, build segments from plain English, and act on your account when you give the green light. This page documents every tool it can call + how to keep it on-rails.

What can I ask?

Open the Copilot drawer (the floating button on the bottom-right, or Cmd / Ctrl + K) and type. Examples that work today:

Two-tier safety model

  1. Admin guardrails — set under Admin → AI training. Persona, on-topic scope, refusal strictness, forbidden topics, and the per-tool authorisation matrix.
  2. Per-action confirmation — every destructive tool (sends, activations, deletes) routes through an in-chat confirm card. The customer sees what's about to happen and clicks Run before anything mutates state.

Tool catalogue

Read-only intelligence

Auto-runs when the question requires actual account data. No confirmation, no destructive risk.

ToolReturns
list_recent_campaignsRecent campaigns with status + send dates.
campaign_statsOpens / clicks / bounces for a single campaign.
campaign_report_detailDeep report — delivery breakdown + top clicked URLs.
find_subscriberLookup by email.
list_listsThe customer's lists with subscriber counts.
list_templatesCustomer templates + system templates.
list_automationsAutomations with status + enrolment counts.
preview_templateSubject + plain-text snippet of a template.
billing_statusSubscription state, trial days left, next bill date.
list_invoicesRecent payments with amount + status.
plan_quota_usageSends-this-month + subscribers vs cap.
suggest_subjects5 subject-line variants from a brief.
suggest_segment_rulesNL → segment-rule JSON (preview only).
draft_campaign_bodyHTML + plain text from a brief (preview only).

Draft creation

Mutate state but never send mail / charge / contact subscribers. Result includes a URL the user can open to finish in the GUI.

ToolWhat it does
create_listNew subscriber list.
create_campaign_draftCampaign in draft status. No sends queued.
create_template_from_promptGenerated HTML template, saved to the library.
create_automation_draftAutomation row in draft. Canvas filled in the GUI.
add_subscribersBulk-add addresses to a list (up to 500/call, deduped).
create_segmentPersist a segment from a rule JSON block.

Authorised execution

Each call surfaces a ConfirmCard in chat. The user clicks Run before anything happens.

ToolWhat it does
schedule_campaignSet send_at on a draft campaign.
send_campaign_nowFlip a draft to pending so the dispatcher sends it.
pause_campaignPause an in-flight send.
update_campaign_draftPatch subject / from / body / preview on a draft.
duplicate_campaignClone a campaign into a new draft.
start_automationActivate a draft/paused automation.
pause_automationPause an active automation.
remove_subscriberUnsubscribe a single subscriber from a list.

What Copilot can NOT do in v1

Configuring the assistant — admin view

  1. Go to Admin → Settings → AI provider. Pick a provider (OpenAI / Anthropic / DeepSeek / Groq) and paste your API key.
  2. Set the Copilot's display name + tagline. Email-marketing fun picks: Postie, Sendly, Quill, Inkly, Drafty, Stamper, Mailie.
  3. Open Admin → AI training. Pick a template preset (Strict marketing-only / Friendly helper / Sales-focused / Support agent) or hand-craft the persona + guardrails.
  4. Use the right-hand Try it pane to test the persona before publishing. Inspect the composed system prompt under the System prompt tab.
  5. Toggle which tools the Copilot can use in the Tool authorisation card. Newly-shipped tools default to enabled — flip them off if your offering doesn't include that capability.
  6. Hit Publish. Future Copilot conversations site-wide use the new policy immediately.

Audit trail

Every tool execution writes a row to the activity log under copilot.tool.<name> with the customer id, arguments, optional audit payload, error (if any), and duration. Search the admin Audit log to reconstruct exactly what the AI did, when, and for whom.

Adding your own tools

Drop a file under app/Domain/Copilot/Tools/ that extends CopilotTool. The service provider auto-discovers it on the next request — no registration line required. Override destructive() + summary() for ConfirmCard support.

// app/Domain/Copilot/Tools/MyCustomTool.php
namespace App\Domain\Copilot\Tools;

use App\Models\Customer;

class MyCustomTool extends CopilotTool
{
    public function name(): string { return 'my_custom_action'; }
    public function description(): string { return 'Does the thing.'; }
    public function parameters(): array {
        return ['type' => 'object', 'properties' => [
            'thing_id' => ['type' => 'integer'],
        ], 'required' => ['thing_id']];
    }
    public function destructive(): bool { return true; }
    public function summary(array $args): string { return "Do the thing to #{$args['thing_id']}."; }
    public function run(Customer $customer, array $args): array {
        // ...
        return ['ok' => true, 'audit' => [...]];
    }
}