AGENTS.md Template: Real-Time Bidding Systems
AGENTS.md Template for Real-Time Bidding Systems: a copyable operating manual to govern real-time bidding agents, orchestrations, handoffs, and governance across multi-agent workflows.
Target User
Developers, platform engineers, engineering leaders, product teams
Use Cases
- Real-time bidding systems
- bid floor optimization
- auction-rule enforcement
- multi-agent coordination in RTB
Markdown Template
AGENTS.md Template: Real-Time Bidding Systems
# AGENTS.md
Project role: Real-Time Bidding Orchestrator
Agent roster and responsibilities:
- PlannerAgent: defines bidding strategy, latency targets, and handoff points.
- BidderAgent: constructs and submits bids based on features, inventory, and rules.
- EvaluatorAgent: validates bid eligibility, checks constraints, and flags anomalies.
- DataAgent: streams price feeds, user data, and auction metadata in real time.
- ComplianceAgent: enforces privacy, consent, and data-use policies.
- AuditorAgent: records decisions, sources, and decision rationale for traceability.
Supervisor or orchestrator behavior:
- The PlannerAgent coordinates the overall workflow, assigns tasks, and times out steps that exceed latency budgets.
- The Orchestrator ensures all agents run in a coordinated sequence with clear handoffs and memory state synchronization.
- The Supervisor enforces safety gates, raises escalation when thresholds are breached, and triggers rollbacks if needed.
Handoff rules between agents:
- Planner -> Bidder: provide bidding context and constraints.
- Bidder -> Evaluator: submit bid payload and supporting signals.
- Evaluator -> Auditor: log decisions and outcomes with sources.
- DataAgent supports all steps with real-time signals but does not unilaterally modify auction rules.
Context, memory, and source-of-truth rules:
- Context is short-lived for each auction, stored in a bounded in-memory cache with a 5-minute TTL.
- Source of truth includes official price feeds, auction metadata, and canonical rule sets in the config repository.
- All decisions must reference the source of truth and be auditable in the AuditorAgent logs.
Tool access and permission rules:
- Access to Bid API, Data Feeds, and Compliance checks is restricted by scoped tokens managed in a secrets store.
- No hard-coded credentials; rotate secrets every 30 days or on breach.
- Agents may read data but can only write to their designated output channels.
Architecture rules:
- Event-driven microservices with a shared, latency-aware message bus.
- All state changes are idempotent and replay-safe.
- Observability: metrics, traces, and logs are required for each auction pass.
File structure rules:
- agents/planner
- agents/bidder
- agents/evaluator
- agents/data
- agents/compliance
- orchestrator
- config
- tests
- docs
Data, API, or integration rules:
- Use streaming data for price updates with fixed latency budgets.
- Validate all external API responses with timeouts and fallbacks.
- All integration endpoints must be authenticated and logged.
Validation rules:
- Bids must respect floor and ceiling rules.
- Time-to-decision must be within latency SLA.
- All decisions must be auditable and reversible where possible.
Security rules:
- Secrets are never logged; TLS is mandatory for all external calls.
- Access must be least-privilege; rotate keys regularly.
- Implement input validation and anomaly detection on every step.
Testing rules:
- Unit tests for each agent; integration tests for end-to-end auction flow.
- Synthetic auctions to exercise edge cases.
- CI gates block merges if latency targets are exceeded in test simulations.
Deployment rules:
- Canary deployments for new agents; feature flags to enable/disable changes.
- Rollback plan and automated rollback if metrics degrade beyond threshold.
Human review and escalation rules:
- Any anomaly crossing preset thresholds triggers human review and SRE notification.
- Critical changes require peer review and staging verification.
Failure handling and rollback rules:
- If an auction fails, revert state to pre-auction, and ensure no partial writes to output stores.
- All rollbacks are logged and attributed to responsible agents.
Things Agents must not do:
- Do not modify production rules without approval.
- Do not bypass latency budgets or suppress alarms.
- Do not leak sensitive data in outputs or logs.Overview
Direct answer: This AGENTS.md Template for Real-Time Bidding Systems provides a complete operating manual for coordinating AI coding agents in RTB workflows, including an agent roster, supervisor/orchestrator behavior, handoff rules, memory and source-of-truth policies, tool governance, and escalation pathways for single-agent and multi-agent orchestration.
The AGENTS.md template governs how real-time bidding agents interact to determine bids, validate rules, fetch data, and audit decisions in latency-sensitive auctions. It codifies roles for bidding, evaluation, data access, and governance so teams can operate with a single-agent workflow or scale to multi-agent orchestration while maintaining safety, traceability, and reproducibility.
When to Use This AGENTS.md Template
- When designing an RTB system that relies on AI-driven bidding decisions across multiple micro-services.
- When you require clear handoff points between agents to preserve latency budgets and decision traceability.
- When you need strict tool governance, secrets handling, and production safety for auction workflows.
- When you want a copyable, project-level operating context that both engineers and PMs can audit.
Copyable AGENTS.md Template
# AGENTS.md
Project role: Real-Time Bidding Orchestrator
Agent roster and responsibilities:
- PlannerAgent: defines bidding strategy, latency targets, and handoff points.
- BidderAgent: constructs and submits bids based on features, inventory, and rules.
- EvaluatorAgent: validates bid eligibility, checks constraints, and flags anomalies.
- DataAgent: streams price feeds, user data, and auction metadata in real time.
- ComplianceAgent: enforces privacy, consent, and data-use policies.
- AuditorAgent: records decisions, sources, and decision rationale for traceability.
Supervisor or orchestrator behavior:
- The PlannerAgent coordinates the overall workflow, assigns tasks, and times out steps that exceed latency budgets.
- The Orchestrator ensures all agents run in a coordinated sequence with clear handoffs and memory state synchronization.
- The Supervisor enforces safety gates, raises escalation when thresholds are breached, and triggers rollbacks if needed.
Handoff rules between agents:
- Planner -> Bidder: provide bidding context and constraints.
- Bidder -> Evaluator: submit bid payload and supporting signals.
- Evaluator -> Auditor: log decisions and outcomes with sources.
- DataAgent supports all steps with real-time signals but does not unilaterally modify auction rules.
Context, memory, and source-of-truth rules:
- Context is short-lived for each auction, stored in a bounded in-memory cache with a 5-minute TTL.
- Source of truth includes official price feeds, auction metadata, and canonical rule sets in the config repository.
- All decisions must reference the source of truth and be auditable in the AuditorAgent logs.
Tool access and permission rules:
- Access to Bid API, Data Feeds, and Compliance checks is restricted by scoped tokens managed in a secrets store.
- No hard-coded credentials; rotate secrets every 30 days or on breach.
- Agents may read data but can only write to their designated output channels.
Architecture rules:
- Event-driven microservices with a shared, latency-aware message bus.
- All state changes are idempotent and replay-safe.
- Observability: metrics, traces, and logs are required for each auction pass.
File structure rules:
- agents/planner
- agents/bidder
- agents/evaluator
- agents/data
- agents/compliance
- orchestrator
- config
- tests
- docs
Data, API, or integration rules:
- Use streaming data for price updates with fixed latency budgets.
- Validate all external API responses with timeouts and fallbacks.
- All integration endpoints must be authenticated and logged.
Validation rules:
- Bids must respect floor and ceiling rules.
- Time-to-decision must be within latency SLA.
- All decisions must be auditable and reversible where possible.
Security rules:
- Secrets are never logged; TLS is mandatory for all external calls.
- Access must be least-privilege; rotate keys regularly.
- Implement input validation and anomaly detection on every step.
Testing rules:
- Unit tests for each agent; integration tests for end-to-end auction flow.
- Synthetic auctions to exercise edge cases.
- CI gates block merges if latency targets are exceeded in test simulations.
Deployment rules:
- Canary deployments for new agents; feature flags to enable/disable changes.
- Rollback plan and automated rollback if metrics degrade beyond threshold.
Human review and escalation rules:
- Any anomaly crossing preset thresholds triggers human review and SRE notification.
- Critical changes require peer review and staging verification.
Failure handling and rollback rules:
- If an auction fails, revert state to pre-auction, and ensure no partial writes to output stores.
- All rollbacks are logged and attributed to responsible agents.
Things Agents must not do:
- Do not modify production rules without approval.
- Do not bypass latency budgets or suppress alarms.
- Do not leak sensitive data in outputs or logs.
Recommended Agent Operating Model
The operating model defines agent roles, responsibilities, decision boundaries, and escalation paths for single-agent and multi-agent RTB orchestration. Planner decides strategy and handoffs; Bidder implements bids; Evaluator validates; DataAgent feeds signals; ComplianceAgent enforces privacy; Auditor logs decisions; The Orchestrator coordinates all actors with escalation gates for safety and auditability.
Recommended Project Structure
ai-systems/rtb/
/ai-skills/agents-md-templates/
/planner/
/bidder/
/evaluator/
/data/
/compliance/
/auditor/
/orchestrator/
/config/
/tests/
/docs/
Core Operating Principles
- Latency-aware decision making with explicit timeouts.
- Single source of truth for rules and data; auditable decisions.
- Clear handoffs and deterministic execution paths.
- Least-privilege access and secret management.
- Fail-safe defaults and robust rollback strategies.
Agent Handoff and Collaboration Rules
- Planner to Bidder: pass constraints, feature flags, and measurement windows.
- Bidder to Evaluator: submit bid payload with confidence signals and timing data.
- Evaluator to Auditor: log decision rationale and sources.
- DataAgent collaborates by feeding signals into all steps without altering rule sets.
Tool Governance and Permission Rules
- All tool calls require scoped credentials and are auditable.
- Secrets must be retrieved from a centralized vault; never embedded in code.
- Production endpoints require approved deployment flags and change control.
- External auctions must use sandboxed environments for testing before production.
Code Construction Rules
- All agents are encapsulated as independent modules with well-defined interfaces.
- State changes are idempotent and logs include sufficient metadata for replay.
- Configuration-driven behavior; avoid hard-coded thresholds.
- Latency budgets are enforced at every step; fallbacks must be deterministic.
Security and Production Rules
- TLS everywhere; mutual TLS where possible.
- Secrets rotated on schedule and after incidents.
- Audit trails for decisions, inputs, and outputs; tamper-evident logging.
Testing Checklist
- Unit tests for each agent; integration tests for end-to-end RTB flow.
- Latency tests to ensure SLA compliance.
- Security tests including secret leakage checks and input validation.
- Canary and rollback tests for deployment safety.
Common Mistakes to Avoid
- Not defining explicit handoffs or misordering steps.
- Embedding secrets in outputs or logs.
- Ignoring latency budgets during orchestration adjustments.
- Overly aggressive automation without human-in-the-loop for edge cases.
Related implementation resources: AI Use Case for Corporate Event Managers Using Slack To Orchestrate Day-Of Venue Tasks Across Multi-Department Teams and AI Use Case for Content Marketers Using Wordpress To Auto-Translate Blog Posts Into Multiple Languages.
FAQ
What is this AGENTS.md Template for RTB workflows?
This template defines how AI coding agents coordinate in a real-time bidding system, covering planning, bidding, evaluation, data feeds, governance, and escalation for both single-agent and multi-agent setups.
Who should use this template?
Engineers building RTB platforms, product teams designing agent-driven auctions, and platform teams implementing multi-agent orchestration.
How are agent handoffs defined in RTB orchestration?
Handoffs occur at clearly defined points: Planner -> Bidder, Bidder -> Evaluator, Evaluator -> Auditor, with DataAgent supporting signals while not mutating rules.
What are the security and governance considerations?
Use secrets management, least privilege, audit logs, encryption in transit, and avoid logging sensitive data. All actions should be auditable and reproducible.
How should testing and deployment be handled?
Implement unit and integration tests, synthetic auctions for edge cases, and CI/CD with canaries and rollback capabilities for safe production deployment.