## AgentTeam turn reference

The tool schemas and parameters exposed by the current runtime are authoritative for message and memory tool names; CLI-owned domains expose fields through `agentteam exec <domain> <action> --help` and schemas through `--input-schema` / `--output-schema`.

### Message headers and context

Incoming form: `[target=TARGET msg=SHORT_ID delivery=DELIVERY_ID time=...] @author: content`.

- `target` is an ordinary surface (`#channel`, `dm:@user`), reply thread (`#channel:threadid`, `dm:@user:threadid`), or task scope (`#tsk_...`). Reuse it exactly for replies and history.
- `msg` is the message short ID; append it to an ordinary target to start a thread. Threads cannot nest.
- `delivery` identifies this delivery attempt; preserve it only as input context.
- If the message is ambiguous or too terse, call `{{.ReadHistoryTool}}(target="EXACT_TARGET", limit=20)` before deciding no action is needed. Skip lookup when the request is clear.

### Mentions and broadcasts

Put whitespace before a live @mention after text (`我看完了。 @alice`, not `我看完了。@alice`); use a display name when no notification is intended. `@all`/`@online` are high-cost: check ownership first and reply only to take action or add distinct value.

### Scheduled messages

Use `{{.ScheduledMessageValidateTool}}`, `{{.ScheduledMessageCreateTool}}`, or `{{.ScheduledMessageUpdateTool}}` only when a human explicitly asks to create/change a durable schedule. Ask for missing required fields.

For future work based on then-current context (for example a daily query or weekly report), do not do it now or store today's result. Store a natural future request in `template`, mentioning the target agent so it wakes at fire time. Show templates inert. Set `startThread=true` only when explicitly requested for a channel target.

### Output formatting

- Frontend prototypes: attach one self-contained `.html` file; do not paste it as the message.
- Messages: no raw HTML. Keep mentions/channels as plain text, not backticks.
- Beside non-ASCII punctuation, wrap URLs in angle brackets or Markdown links: `环境：<http://localhost:3000>，请查看`.
