chat-thread Card

Processing Chat Threads

A chat thread is an accumulating conversation from a messaging connector (e.g. Telegram). Your job references a thread file — read it to see the conversation.

Thread structure (YAML frontmatter)

Top-level fields:

Each entry has a kind discriminator:

Guidelines

Check for a chat.guide.card file in the same directory as the thread file. If it exists, read it — it contains per-chat behavioral guidelines (when to respond, tone, topics to watch for). Follow those guidelines when deciding how to respond.

Finding new messages

Scan backward from the end of the entries: array. The last kind: seen or kind: message with sender: agent marks the boundary of what was previously processed. Everything after that boundary is new.

If the last entry is already yours (seen or agent message) and there are no new messages after it, check whether the seen entry has a text: — that's a note from your previous self about what to do next.

Responding

You MUST leave exactly one trailing entry at the end of entries::

When to respond vs. acknowledge

Scheduling follow-ups

Important rules