AGENTS.md TemplatesCRM workflow template

CRM and Sales Operations AGENTS.md Template

A copyable AGENTS.md template for CRM and sales operations agents, enabling multi-agent orchestration with guardrails, handoffs, and governance.

AGENTS.md templateCRMSales OperationsAI coding agentsmulti-agent orchestrationagent handoff rulestool governancehuman reviewCRM integrationlead routingopportunity forecasting

Target User

CRM engineers, Sales Ops leaders, AI developers

Use Cases

  • CRM data enrichment
  • Lead routing & assignment
  • Opportunity forecasting
  • Campaign automation
  • Account maintenance in CRM

Markdown Template

CRM and Sales Operations AGENTS.md Template

# AGENTS.md

Project Role: CRM and Sales Operations Automation for multi-agent orchestration

Agent roster and responsibilities:
- Orchestrator: coordinates end-to-end CRM workflows, enforces SLAs, and handles handoffs
- DataEnricher: enriches CRM records with external data sources and validates enrichment quality
- LeadRouter: routes leads and accounts to owners based on territory, score, and campaign
- OpportunityForecast: forecasts revenue and opportunity likelihood using CRM data and signals
- CRMIntegrator: performs API calls to Salesforce/HubSpot, handles create/update/delete in the CRM, and ensures data integrity
- QAReviewer: validates outputs, data quality, and alignment with CRM schema before deployment

Supervisor or orchestrator behavior:
- Initialize context, load guardrails, and enforce the operating model
- Maintain a living memory of decisions and data sources
- Trigger handoffs based on completion, timeout, or validation failure
- Escalate to human reviewer when risk or ambiguity exceeds thresholds

Handoff rules between agents:
- DataEnricher -> LeadRouter: on enrichment completion
- LeadRouter -> OpportunityForecast: when a lead is converted or marked for follow-up
- CRMIntegrator -> QAReviewer: before production deployment
- QAReviewer -> Orchestrator: after validation approval or on request for changes

Context, memory, and source-of-truth rules:
- Memory: use a shared, versioned context object per CRM record
- Source of truth: CRM systems as primary source; external enrichment data as secondary sources with provenance
- Do not mutate source-of-truth without explicit approval

Tool access and permission rules:
- Access: CRM APIs via least-privilege tokens; external data connectors with scoped permissions
- Secrets: store in vault and rotate; never log secrets
- Tool governance: all actions are logged and replayable for audit

Architecture rules:
- Event-driven, idempotent, and auditable actions
- Clear separation between orchestrator, agents, and adapters
- Stateless agents with deterministic outputs

File structure rules:
- Place per-workflow agents under agents/ with one folder per agent
- Configs under configs/; logs under logs/; tests under tests/

Data, API, or integration rules when relevant:
- Validate data at ingest; sanitize inputs; maintain data lineage
- Respect API rate limits; implement retries with backoff
- Use versioned schemas for CRM data

Validation rules:
- End-to-end checks for data consistency and business rules
- Enforce CRM field constraints and required values

Security rules:
- Enforce least privilege on all credentials
- Encrypt sensitive data in transit and at rest
- Audit all CRM mutations

Testing rules:
- Unit tests for each agent; integration tests against mocked CRM APIs
- End-to-end tests with synthetic data
- Regular security and regression testing

Deployment rules:
- Use canary deployments and feature flags for CRM changes
- Require QA approval before production if data is mutated

Human review and escalation rules:
- Escalate to Sales Ops Manager or CRM Architect for high-risk changes
- Schedule periodic reviews of automated CRM changes

Failure handling and rollback rules:
- Retry failed steps with exponential backoff
- Roll back CRM mutations if critical: preserve data integrity
- Notify stakeholders on persistent failures

Things Agents must not do:
- Do not bypass approval gates
- Do not perform destructive CRM actions without consent
- Do not share secrets in logs or chat

Overview

Direct answer: This AGENTS.md Template provides a complete operating manual for CRM and sales operations AI coding agents, enabling both single-agent workflows and multi-agent orchestration across CRM data, lead routing, opportunity forecasting, and post-sale activities. It defines roles, guardrails, handoff rules, and governance to keep your CRM automation aligned with business outcomes.

The template governs a CRM automation workflow, including data enrichment, lead routing, account updates, and cross-tool coordination with tool governance and human review where necessary.

When to Use This AGENTS.md Template

  • When automating CRM data enrichment, lead routing, account updates, and opportunity forecasting across Salesforce, HubSpot, or other CRM platforms.
  • When you need reliable multi-agent orchestration with explicit handoffs and escalation rules.
  • When governance, security, and auditability are required for production CRM automations.
  • When the project involves CRM integrations, external data sources, or inbound/outbound marketing automation.
  • When you want a copyable, project-scoped operating manual that can be pasteable into an AGENTS.md file.

Copyable AGENTS.md Template

# AGENTS.md

Project Role: CRM and Sales Operations Automation for multi-agent orchestration

Agent roster and responsibilities:
- Orchestrator: coordinates end-to-end CRM workflows, enforces SLAs, and handles handoffs
- DataEnricher: enriches CRM records with external data sources and validates enrichment quality
- LeadRouter: routes leads and accounts to owners based on territory, score, and campaign
- OpportunityForecast: forecasts revenue and opportunity likelihood using CRM data and signals
- CRMIntegrator: performs API calls to Salesforce/HubSpot, handles create/update/delete in the CRM, and ensures data integrity
- QAReviewer: validates outputs, data quality, and alignment with CRM schema before deployment

Supervisor or orchestrator behavior:
- Initialize context, load guardrails, and enforce the operating model
- Maintain a living memory of decisions and data sources
- Trigger handoffs based on completion, timeout, or validation failure
- Escalate to human reviewer when risk or ambiguity exceeds thresholds

Handoff rules between agents:
- DataEnricher -> LeadRouter: on enrichment completion
- LeadRouter -> OpportunityForecast: when a lead is converted or marked for follow-up
- CRMIntegrator -> QAReviewer: before production deployment
- QAReviewer -> Orchestrator: after validation approval or on request for changes

Context, memory, and source-of-truth rules:
- Memory: use a shared, versioned context object per CRM record
- Source of truth: CRM systems as primary source; external enrichment data as secondary sources with provenance
- Do not mutate source-of-truth without explicit approval

Tool access and permission rules:
- Access: CRM APIs via least-privilege tokens; external data connectors with scoped permissions
- Secrets: store in vault and rotate; never log secrets
- Tool governance: all actions are logged and replayable for audit

Architecture rules:
- Event-driven, idempotent, and auditable actions
- Clear separation between orchestrator, agents, and adapters
- Stateless agents with deterministic outputs

File structure rules:
- Place per-workflow agents under agents/ with one folder per agent
- Configs under configs/; logs under logs/; tests under tests/

Data, API, or integration rules when relevant:
- Validate data at ingest; sanitize inputs; maintain data lineage
- Respect API rate limits; implement retries with backoff
- Use versioned schemas for CRM data

Validation rules:
- End-to-end checks for data consistency and business rules
- Enforce CRM field constraints and required values

Security rules:
- Enforce least privilege on all credentials
- Encrypt sensitive data in transit and at rest
- Audit all CRM mutations

Testing rules:
- Unit tests for each agent; integration tests against mocked CRM APIs
- End-to-end tests with synthetic data
- Regular security and regression testing

Deployment rules:
- Use canary deployments and feature flags for CRM changes
- Require QA approval before production if data is mutated

Human review and escalation rules:
- Escalate to Sales Ops Manager or CRM Architect for high-risk changes
- Schedule periodic reviews of automated CRM changes

Failure handling and rollback rules:
- Retry failed steps with exponential backoff
- Roll back CRM mutations if critical: preserve data integrity
- Notify stakeholders on persistent failures

Things Agents must not do:
- Do not bypass approval gates
- Do not perform destructive CRM actions without consent
- Do not share secrets in logs or chat

Recommended Agent Operating Model

The agent operating model defines clear roles, decision boundaries, and escalation paths for CRM and sales ops automation. The Orchestrator coordinates DataEnricher, LeadRouter, OpportunityForecast, CRMIntegrator, and QAReviewer, with explicit handoffs and confidence-based escalations to human reviewers when needed.

Recommended Project Structure

crm-ops/
  agents/
    orchestrator/
    data_enricher/
    lead_router/
    opportunity_forecast/
    crm_integrator/
    qa_reviewer/
  configs/
  workflows/
  integrations/
  tests/
  docs/

Core Operating Principles

  • Single source of truth: CRM is the authoritative data store
  • Idempotent operations: repeated runs should not cause data drift
  • Explicit, documented handoffs between agents
  • End-to-end observability with auditable logs
  • Security by design: least privilege and secret management

Agent Handoff and Collaboration Rules

  • Planner/Orchestrator assigns tasks to Implementer and Reviewer based on guarantees and risk
  • DataEnricher passes enriched records to LeadRouter with provenance
  • LeadRouter hands off to CRMIntegrator for CRM mutations only after validation
  • QAReviewer validates outputs and approves before production
  • Researchers and Domain Specialists provide context when data is ambiguous

Tool Governance and Permission Rules

  • All commands must be authenticated and authorized via an IAM policy
  • CRM API calls are performed with least privilege and logged with trace IDs
  • Secrets are stored in a vault; never printed or logged
  • Production changes require approval gates and audit trails
  • External services must comply with data handling policies

Code Construction Rules

  • Ensure deterministic outputs and idempotent mutations
  • Use versioned schemas for CRM data and structured logs
  • Validate all inputs against a schema before processing
  • Document every API interaction with provenance data

Security and Production Rules

  • PII and sensitive data must be masked or encrypted in memory and at rest
  • Audit every CRM mutation with time, actor, and rationale
  • Rollout changes with canary deployments and feature flags

Testing Checklist

  • Unit tests for each agent with mocked CRM APIs
  • Integration tests across CRM, enrichment sources, and data pipelines
  • End-to-end tests with synthetic data
  • Security and regression tests before production

Common Mistakes to Avoid

  • Skipping explicit handoffs and relying on implicit context
  • Mutating CRM data without proper validation and approval
  • Overly broad permissions or secrets leaking into logs
  • Ignoring data provenance and schema drift

FAQ

What is the purpose of this AGENTS.md Template for CRM and sales operations?

It defines the CRM and sales operations agent workflow, roles, guardrails, and handoffs to enable reliable single-agent and multi-agent orchestration.

Who should be on the agent roster for CRM workflows?

Roster includes Orchestrator, DataEnricher, LeadRouter, OpportunityForecast, CRMIntegrator, and QAReviewer with defined responsibilities.

How are handoffs between agents handled in multi-agent CRM orchestration?

Handoffs occur at defined transition points with shared context; failed steps trigger escalation.

What security and data governance rules apply to CRM agent workflows?

Least privilege access, secrets management, data masking, audit logs, and PII handling policies.

How do you handle failures and rollbacks in CRM automation?

Retry with backoff, idempotent operations, and rollback steps; escalate to human review if unresolved.