agent-activity
Skill396 starsChanged 6 months agoMITView on GitHub
Streams what the agent is doing into the room, as rows the desktop client renders in an events drawer above the composer (collapsed: avatar, pulsing dots, the newest line rolling in; expanded: the live rows of the task in progress) and in the console dock's Events panel (the full history). Client side: ag2-space/cinny-webclient #888. One JSON object per line at <workspace>/state/agent-activity.jsonl, served to the client by the loopback media route as /media/state/agent-activity.jsonl: A notice row reading queued is written by…
In this repository73 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- agent-registrySkill
- agent-room-opsSkill
- answer-formatSkill
- audio-transcribeSkill
- bee-actionsSkill
- bot2bot-postSkill
- call-diagnosticsSkill
- claude-codexSkill
- claude-geminiSkill
- claude-piSkill
- claude-routerSkill
- collaboration-intelligenceSkill
- connect-appsSkill
- context-dropSkill
- context-reconstructSkill
- db-browserSkill
- deal-finderSkill
- doc-ingestSkill
- electron-overlay-dimmingSkill
- email-findSkill
- engine-conflict-resolveSkill
- gemini-ttsSkill
- image-generationSkill
- import-claude-contextSkill
- local-workspace-serverSkill
- macos-toolsSkill
- macos-useSkill
- make-viral-videoSkill
- marketplaceSkill
- media-transcriptSkill
- meeting-prepSkill
- meeting-schedulerSkill
- mention-gateSkill
- model-switchSkill
- morning-briefingSkill
- ms365-connectSkill
- observeSkill
- obsidian-vaultSkill
- openai-ttsSkill
- open-sutando-refSkill
- overlay-appsSkill
- phone-conversationSkill
- proactive-loopSkill
- pr-shepherd-contractSkill
- quota-trackerSkill
- regression-searchSkill
- relaySkill
- releaseSkill
- report-feedbackSkill
- review-preflightSkill
- room-collabSkill
- schedule-cronsSkill
- screen-companionSkill
- screen-recordSkill
- self-diagnoseSkill
- self-upgradeSkill
- session-recapSkill
- skill-usage-reportSkill
- The first 60 shown.
The file
We split this skill into the rules it gives an agent
4 rules. About 0 are common, 0 are distinctive, and 4 are very specific to this project.
≈0
Common · estimate
Many files like this have a rule of this kind.
≈0
Distinctive · estimate
This author's own choices. Worth a look.
4
Very specific
Tied to their project's names, files or tools. Probably skip.
- Common
- Distinctive
- Very specific
- Very specific: line 41
Prefer --task-file <workspace>/tasks/task-….txt: it fills the task id, from, text and the room from the task's own headers, so a row is …
- Very specific: line 60
Working: Every later PreToolUse in that session (Read/Glob/Grep/TodoWrite skipped) becomes a working row for the open task bound to it: the …
- Very specific: line 69
Bounded, one writer at a time: Every append and the rotation that follows it run under one cross-platform advisory lock on …
- Very specific: line 74
A finished task leaves a summary: Every done row with a task also appends one line to agent-activity.summaries.jsonl — {ts, started, rows, …
≈ “Common” is an estimate: at least 1 in 5 of the 350,495 skill files we read have a rule of the same kind, not the same words. “Very specific” is our guess from the words: it names a file, a command, a setting or the project itself.
Files
agent-activity
Streams what the agent is doing into the room, as rows the desktop client renders in an events drawer above the composer (collapsed: avatar, pulsing dots, the newest line rolling in; expanded: the live rows of the task in progress) and in the console dock's Events panel (the full history). Client side: ag2-space/cinny-webclient #888.
Rows
One JSON object per line at <workspace>/state/agent-activity.jsonl, served to the client by the
loopback media route as /media/state/agent-activity.jsonl:
| field | meaning |
ts | epoch seconds |
room | room id the row belongs to; the drawer in that room shows it. Absent → dock only |
kind | processing (picked the message up) · thinking (narration while deciding) · working (the tool in use, one line) · notice (PR heartbeats and the like) · done |
line | the text, plain |
task | {id, from, text} — the user message this row belongs to (from an mxid, text ≤160 chars) |
done | true closes the task: all of its rows leave the drawer (the dock keeps them) |
task.event | event id of the user message (source_message_id); the client mounts the per-message card under it |
task.into | on a consolidated done: event id of the message whose reply answered this one too |
A notice row reading queued is written by the task watcher when the file lands, before any turn
has it (activity.py queued --task-file …; only for files that name a room and a message).
A task's rows are live until its done row; a task-less row is live 15 minutes. The drawer
shows only live rows and hides itself when none is live. Rows are flat: the client marks the first
row of each task with a square dot, never folds.
Writing rows
S=skills/agent-activity/scripts
python3 $S/activity.py append "picked up your message" --kind processing \
--task-id task-… --from '@owner:server' --text "<their message>" [--room '!room:server']
python3 $S/activity.py append "PR #123 CI green" --kind notice
python3 $S/activity.py done "the drawer is one rolling line" --task-id task-…Prefer --task-file <workspace>/tasks/task-….txt: it fills the task id, from, text and the room
from the task's own headers, so a row is always tagged with the room the message came from. Without
it, --room defaults to the room of the owner's latest AG2 Space message (state/last-owner-activity.json).
With the hook installed, processing and done are written for you (see below); hand-written rows
are for anything extra the owner asks to see.
Working and Thinking rows, automatically (hooks)
The skill declares three Claude Code hooks in manifest.json (./hooks/activity-hook.py on
PreToolUse, PostToolUse and Stop); bash src/install-claude-hooks.sh registers them like every other
skill hook. The hook never depends on the agent remembering anything:
- Processing, automatically. The first
PreToolUsein a session whose input names a task file (tasks/task-….txt, a Read or a shell command) binds that task to the hook's ownsession_idinstate/agent-activity.sessions.jsonand writes itsprocessingrow from the task's headers (room, sender, text). The agent's ownactivity.py append --kind processingstill binds, for hand-written rows. - Done, automatically. A
PostToolUsewhose input wroteresults/task-….txt(Write, or a shell redirect) writes the task'sdonerow, only from the session the task is bound to and only if the result file exists once the tool has run: a denied or failed write closes nothing. - Working. Every later
PreToolUsein that session (Read/Glob/Grep/TodoWrite skipped) becomes aworkingrow for the open task bound to it: the description's first sentence, 100 characters. - Thinking.
Stopreads the last assistant text of this session'stranscript_path(complete lines only, so a row mid-write is never split) and writes it asthinking. - Scope of task ids.
task-<hex>andtask-chat-…files are tasks;task-cron-*,task-bench-*,task-workstream-*andtask-project-grouping-*are the core's own bookkeeping and produce no rows. A result whose body starts with[no-send]or[REPLIED]closes the task with "closed, no message sent from here", never "replied"; a[deduped: task-X]pointer closes it as "consolidated" withtask.into= X's message event id (the reply lives under that message). - Bounded, one writer at a time. Every append and the rotation that follows it run under one
cross-platform advisory lock on
agent-activity.jsonl.lock, so no row is lost or duplicated when hooks from several sessions write at once. The live log keeps the newest 400 rows (older rows move toagent-activity.archive.<YYYY-MM-DD>.jsonlby the row's own UTC day), and the session bindings file drops a task once its done row exists, so the per-tool-call reads stay small. - A finished task leaves a summary. Every
donerow with a task also appends one line toagent-activity.summaries.jsonl—{ts, started, rows, days, line, room, task}— so the client can fold the card of an old message from it after the rows have rotated out, and expand it from thedaysarchive files. Served like the log, at/media/state/agent-activity.summaries.jsonl. - A sibling feed: private Connect cards.
connect-appswritesstate/connect-cards.json(served at/media/state/connect-cards.json); the client draws each card inside this activity card under the message in itsevent, so a Connect card asked from a shared room is only visible to the owner. - Fail closed. A session with no bound open task writes nothing; a task another session claimed is never written to, so narration cannot cross rooms. The writer's own calls never become rows.
- The hook exits 0 on every path; it must not block the tool it observed.
The private thinking blocks in the transcript hold a signature and no text; narration is the
nearest available signal. The agent writes nothing it can forget: processing and done come from the hook. Hand-written
thinking/notice rows remain the personalisation surface.
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

