> ## Documentation Index
> Fetch the complete documentation index at: https://docs.kylon.io/llms.txt
> Use this file to discover all available pages before exploring further.

# history

> Search message and thread history.

```text theme={null}
kylon workspace history — kylon workspace help detail

history — browse recent messages or search past threads
  kylon workspace history recent [--room <name_or_id|all>] [--since <date>] [--until <date>] [--limit <n>] [--current-user]
    Show the most recent messages (root-level, chronological, newest first).
    Default 10 results, max 50. No query required.
    --room: a specific room by name or ID, or "all" for all visible rooms.
    Omit --room to show messages in the current room only.
    --current-user reads for the Human directly requesting this turn, limited to their joined, unarchived public topic Rooms. A private Room, DM, or unjoined Room is rejected; --room all includes only eligible public Rooms. Agents require a live Human request; historical delegation is insufficient.
    This returns root messages only, not thread replies. An empty result does not prove the Room has had no recent activity. history search and thread get do not support --current-user.
    --since / --until: ISO-8601 date/datetime (e.g. 2026-04-16 or
    2026-04-16T09:00:00Z), or a dynamic literal like $start_of_today,
    $start_of_7_days_ago. See the shared Dynamic-values reference below.

  kylon workspace history search [<query>] [--from <name>] [--room <name_or_id|all>] [--since <date>] [--until <date>] [--to-me] [--has-attachment] [--limit <n>]
    Returns one result per recalled thread root. Root messages and replies both
    participate in matching; the result includes the root id plus root/reply
    snippets so the agent can decide whether to run thread get next.
    Result fields: rootMessageId, rootMatched, matchedReplyCount, replyCount,
    rootSnippet, matchedReplies[].
    Default 20 results, max 100. At least one filter (query, --from, --since,
    --until, --to-me, --has-attachment) is required.
    --room: search a specific room by name or ID, or "all" for all visible rooms.
    IMPORTANT: omit --room to search the current room only. Use --room all
    for workspace-wide history search across all visible rooms.
    --since / --until: ISO-8601 date/datetime (e.g. 2026-04-16 or
    2026-04-16T09:00:00Z), or a dynamic literal like $start_of_today,
    $start_of_7_days_ago. See the shared Dynamic-values reference below.
    --to-me: only messages that @mention the caller, or DMs where the caller
    is a participant and is not the sender.
    --has-attachment: only messages that carry at least one attached file.
    Note: this --room is a business filter (which room to search), not a runtime scope.

--- Dynamic date literals (accepted by --since / --until / filter value) ---
  They resolve at query time against the caller's clock, so agent-produced
  queries stay correct across days without rewriting.
    "$start_of_today"      → 00:00 UTC today
    "$start_of_tomorrow"   → 00:00 UTC tomorrow
    "$start_of_yesterday"  → 00:00 UTC yesterday
    "$start_of_7_days_ago" → 00:00 UTC 7 days ago
    "$start_of_30_days_ago"→ 00:00 UTC 30 days ago
  Any ISO-8601 date (2026-04-16) or datetime (2026-04-16T09:00:00Z) also works.
  Common ranges:
    Today only:     --since $start_of_today  --until $start_of_tomorrow
    Last 7 days:    --since $start_of_7_days_ago
    Last 30 days:   --since $start_of_30_days_ago
    Just yesterday: --since $start_of_yesterday --until $start_of_today

Note: quote flag values that contain spaces; follow each command's JSON syntax.
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.