AGENTS.md Template for CRM System Architecture
AGENTS.md Template for CRM system architecture guiding AI coding agents in single-agent and multi-agent orchestration with governance and handoffs.
Target User
Developers, founders, product teams, and engineering leaders
Use Cases
- CRM AI automation
- CRM data ingestion and synchronization
- Lead management and customer lifecycle automation
- Cross-tool orchestration for CRM integrations
Markdown Template
AGENTS.md Template for CRM System Architecture
# AGENTS.md
Project role
- CRM System Owner: defines vision, success metrics, and governance for AI agents in the CRM
Agent roster and responsibilities
- Orchestrator: coordinates all agents, enforces handoff rules, ensures memory scope
- IngestAgent: collects data from CRM sources, normalizes and stores in memory
- IntegratorAgent: connects CRM tools and external services, handles API calls
- ArchitecturalReviewer: validates design, security, and compliance
Supervisor or orchestrator behavior
- The Orchestrator ensures prompts stay within context, triggers retries, and escalates when subjective decision is needed
Handoff rules between agents
- IngestAgent passes cleaned data to IntegratorAgent; IntegratorAgent passes results to Orchestrator for next steps
Context memory and source of truth rules
- All decisions must be traceable to data in CRM sources; memory stores last run results and references to sources
Tool access and permission rules
- Only approved APIs and credentials are allowed; secrets are fetched from a secure vault
Architecture rules
- The CRM architecture supports modular components and clear interfaces; no direct cross talk without orchestrator mediation
File structure rules
- Keep agent code in agents, data models in models, and orchestrator in orchestrator
Data, API, or integration rules when relevant
- All external calls must be authorized; rate limits and retries are enforced
Validation rules
- Validation steps run after each handoff; outcomes determine next agent actions
Security rules
- Secrets never exposed in logs; sensitive data masked in memory
Testing rules
- Include unit tests for each agent, integration tests for tool calls, and end-to-end tests for critical CRM flows
Deployment rules
- Changes undergo code review; deployment must be reversible with a rollback plan
Human review and escalation rules
- If a decision cannot be automated within policy, escalate to human reviewer
Failure handling and rollback rules
- Any failed step triggers rollback to safe state; errors are logged with context
Things Agents must not do
- Do not bypass the orchestrator; do not modify production data without approvalOverview
AGENTS.md Template for CRM System Architecture defines the operating context for AI coding agents managing CRM workflows, enabling both single-agent and multi-agent orchestration with explicit governance and handoffs. It provides a concrete, copyable manual that teams can paste into an AGENTS.md file to standardize agent behavior, decisions, and escalation paths within a CRM ecosystem.
Direct answer: This template prescribes roles, memory, tool access, and governance to ensure predictable CRM automation across data ingestion, integration, and customer interactions.
When to Use This AGENTS.md Template
- When building an AI driven CRM architecture that requires data ingestion, integration with external services, and customer-facing automation.
- When you need a formal agent roster with responsibilities and an orchestrator to manage handoffs and memory boundaries.
- When tool governance, secrets management, and production readiness are critical for CRM workflows.
- When you want a copyable, project-level operating manual for onboarding teams to standardize agent behavior.
Copyable AGENTS.md Template
# AGENTS.md
Project role
- CRM System Owner: defines vision, success metrics, and governance for AI agents in the CRM
Agent roster and responsibilities
- Orchestrator: coordinates all agents, enforces handoff rules, ensures memory scope
- IngestAgent: collects data from CRM sources, normalizes and stores in memory
- IntegratorAgent: connects CRM tools and external services, handles API calls
- ArchitecturalReviewer: validates design, security, and compliance
Supervisor or orchestrator behavior
- The Orchestrator ensures prompts stay within context, triggers retries, and escalates when subjective decision is needed
Handoff rules between agents
- IngestAgent passes cleaned data to IntegratorAgent; IntegratorAgent passes results to Orchestrator for next steps
Context memory and source of truth rules
- All decisions must be traceable to data in CRM sources; memory stores last run results and references to sources
Tool access and permission rules
- Only approved APIs and credentials are allowed; secrets are fetched from a secure vault
Architecture rules
- The CRM architecture supports modular components and clear interfaces; no direct cross talk without orchestrator mediation
File structure rules
- Keep agent code in agents, data models in models, and orchestrator in orchestrator
Data, API, or integration rules when relevant
- All external calls must be authorized; rate limits and retries are enforced
Validation rules
- Validation steps run after each handoff; outcomes determine next agent actions
Security rules
- Secrets never exposed in logs; sensitive data masked in memory
Testing rules
- Include unit tests for each agent, integration tests for tool calls, and end-to-end tests for critical CRM flows
Deployment rules
- Changes undergo code review; deployment must be reversible with a rollback plan
Human review and escalation rules
- If a decision cannot be automated within policy, escalate to human reviewer
Failure handling and rollback rules
- Any failed step triggers rollback to safe state; errors are logged with context
Things Agents must not do
- Do not bypass the orchestrator; do not modify production data without approval
Recommended Agent Operating Model
This section defines roles, responsibilities, decision boundaries, and escalation paths for CRM AI agents. It emphasizes the orchestrator as the central point of truth and decision authority for multi-agent flows, with clear handoff criteria and memory scope per CRM workflow.
Recommended Project Structure
crm-architecture/
├── agents/
│ ├── orchestrator/
│ ├── ingest/
│ ├── integrator/
│ └── reviewer/
├── models/
├── configs/
├── data/
└── tests/
Core Operating Principles
- Clear ownership and single source of truth for CRM data and agent decisions
- Idempotent actions and deterministic outputs for reproducibility
- Strict adherence to handoff rules and escalation paths
- Auditable prompts, decisions, and data lineage
- Explicit memory scope per CRM workflow
Agent Handoff and Collaboration Rules
Rules cover planner, implementer, reviewer, tester, researcher, and domain specialist agents. The planner generates the plan, implementer executes, reviewer validates, tester confirms, researcher gathers data, and domain specialists provide context for specialized CRM domains.
Tool Governance and Permission Rules
Tool rules govern command execution, file edits, API calls, secrets handling, production changes, external service usage, and approvals. All production calls require an audit trail and sign-off from the orchestrator or designated reviewer.
Code Construction Rules
Code must be modular, testable, and aligned with the CRMs data model. Avoid duplication, ensure idempotence, and include explicit input/output contracts for each agent interface.
Security and Production Rules
Security guidance for CRM data includes access controls, data minimization, encryption in transit and at rest where applicable, and masked logs. Production changes follow a reversible deploy process with rollback plans.
Testing Checklist
- Unit tests for each agent
- Integration tests for tool calls and data flows
- End-to-end tests for CRM scenarios
- Deployment validation checks
Common Mistakes to Avoid
- Do not bypass the orchestrator
- Do not use stale memory without validation
- Do not perform unsanctioned production changes
- Do not skip security and compliance reviews
Related implementation resources: AI Use Case for Property Inquiries and WhatsApp Follow Ups and AI Use Case for Sales Pipeline Reviews and Deal Risk Scoring.
FAQ
What is the purpose of this AGENTS.md Template?
Provide a copyable operating manual for CRM AI agents that enables both single-agent and multi-agent orchestration with governance.
Who should own the CRM AGENTS.md Template?
CRM System Owner, with oversight from engineering leadership to ensure policy compliance and production readiness.
How are agent handoffs managed in CRM workflows?
Handoffs are enforced by the orchestrator with clear state transfer and memory references; escalations occur if data integrity is at risk.
What tool governance applies to CRM integrations?
Only approved APIs and credentials; secrets stored in vaults; production calls require approvals and audit trails.
How do we validate changes before production?
Unit and integration tests, plus staged deployment with rollback capabilities and human review if risk is detected.