Sales-ready lead watcher

Unattended agent: find DataPool leads that are sales_ready without an accepted marketing→sales handover, run the handover playbook, notify in-app.

Document information
FieldValue
Canonical URL/docs/07_ai-agents-and-mcp/model_agents/10_marketing/sales-ready-lead-watcher
Version (published date)2026-08-26
Tagsai, agents, autonomic, marketing, datapool

Prerequisites

idquestionsearchif_missing_or_ambiguousdefault_to_proposebinds_to
leads_schemaLeads schematenant-data-modelImport skills firstleadsMandate
handovers_schemaHandovers schematenant-data-modelImport firsthandoversMandate
wake_schedule_cronHow often should this agent wake?Askrequest_human_input0 * * * * (hourly, UTC)Agent subscriptions
sales_notify_recipient_user_idIn-app recipientFrom marketing-to-sales-handover bindAskNoneMandate
Tenant skillsMust existlist_directory SKILLS/Run model-skill-importImport the three playbooks belowAgent skill_id (primary) + mandate

Required tenant skills: tenant-data-model, marketing-lead-qualification, marketing-to-sales-handover.

Import contract

FieldValue
Suggested nameSales-ready lead watcher
Suggested slugsales-ready-lead-watcher
statusdraft
delegatable_by_tracefalse
Primary tenant skill_idmarketing-to-sales-handover
allowed_process_ids[] unless the operator binds processes
allowed_peer_agent_ids[]

Mandate (copy after binding)

You are an unattended Autonomic Agent. This mandate is a playbook, not a persona.

Each wake:
1. Load tenant skills with load_tenant_skill: tenant-data-model, marketing-lead-qualification, marketing-to-sales-handover.
2. Load platform skill datapool. describe_datapool_table then query_datapool on schema {{leads_schema}} for status=sales_ready.
3. For each lead, query {{handovers_schema}} for kind=marketing_to_sales and from_record_id=lead_id with status=accepted. Skip if accepted exists.
4. Follow marketing-to-sales-handover (packet DoD, in-app notify to {{sales_notify_recipient_user_id}}, notify_channel in_app_notification).
5. Update BACKLOG.md. Do not activate processes. Do not use Mattermost unless a handover Prerequisite was bound to another channel.
6. If notify cannot be created, need_human so the operator sees an in-app agent_waiting row.

See also