Product features: agent operating rules (AGENTS.md)
Some agents need “last three days”, “this month”, “as of today”, or fixed steps calling business APIs. That how to do it belongs in operating rules, not piled into persona (tone, s
Source help/en/product-features/agents-operating-rules.md
Some agents need “last three days”, “this month”, “as of today”, or fixed steps calling business APIs. That how to do it belongs in operating rules, not piled into persona (tone, style).
What the platform provides automatically
In chat, Cadau injects one line of current time and time zone (server clock) for user agents in a workspace, as a time anchor. Whether you use that line to parse “last N days”, and how you call APIs, is written in this agent’s operating rules — agents without that config are not forced to treat dates.
The injected “current time” prefers the display time zone on your account (Account → Preferences / mobile Account); if unset, it falls back to the deploy default MINDLINK_RUNTIME_TIMEZONE (default Asia/Shanghai / Beijing time). Scheduled-task “when it fires” still uses the task’s own time zone, which can differ from the UI display zone.
Where to write it
| File | What to write |
|---|---|
| SOUL.md | Persona and expression: tone, brevity, how to explain results to the user |
| AGENTS.md | Operating rules: how to compute dates, which API first, what to ask when a parameter is missing |
Config tip: unsure whether a constraint belongs in persona, operating rules, or memory — see Practice guide: where to put your rules and AGENTS templates.
On Web open Agent marketplace → pick an instance → Operating rules page, edit and save (maps to runtime AGENTS.md). You can also place the file directly in the agent runtime directory (same level as SOUL.md).
Template: business data plus relative dates
Fits CRM, reports, tickets. Rewrite to your real APIs.
## Dates and ranges
- Treat **current time** in [Runtime environment] as “today”; time zone matches the injected line.
- User says **“last N days”**: **N calendar days including today**.
- `end_date` = today (`YYYY-MM-DD`)
- `begin_date` = today minus N−1 days (`YYYY-MM-DD`)
- When the user gives explicit start and end dates, use those; do not apply “last N days”.
- Example dates in a skill body are **format only**, never a live query range.
## Query steps
1. Compute `begin_date` / `end_date` from above (skip if the user already gave them).
2. Call APIs per **skill notes related to this workspace** (use http_request).
3. Explain results to the user **only from** JSON the tool returned; if the call did not succeed, do not claim you found data.
4. Give the date range and conclusion in short natural language; technical field names can go in Details or the tool trace.
## When information is missing
- N is unknown, or a required API field is missing: ask first; do not invent dates or data.
- This workspace has not enabled network requests: say an admin must enable it, and ask the user for concrete dates or exported material.
How to write dates in skill docs
When freezing or writing a skill, do not hard-code snapshots like “last three days = 2026-01-12–2026-01-14”. Prefer:
- begin_date / end_date: computed by the agent from [Runtime environment] current date; “last 3 days” = 3 calendar days including today.
- Date format: YYYY-MM-DD
See How to write workspace skills.
Related entries
- Skills and agents — create an instance and knowledge base
- How to write workspace skills — skill body and date wording