Skip to content

docs: the system agent and app agents as main has them - #269

Merged
ymote merged 3 commits into
mainfrom
docs/agent-architecture-refresh
Oct 2, 2026
Merged

ymote merged 3 commits into
mainfrom
docs/agent-architecture-refresh

Conversation

@ymote

@ymote ymote commented Oct 2, 2026 •

Copy link
Copy Markdown
Contributor

Docs only. I read everything from the code at f52620c5, which pins octos ae230ce0. Each file's English and Chinese versions carry the same content.

Changes, and why

README.md / README.zh-CN.md

AGENTS.md

  • New "Where things live" rows: the system chat and agents.rs; agent_apps and host_tools; approvals; glance and l0-chat; an app agent's tools.json.
  • The host services row now includes calendar, news and model.
  • The app-peers row now has a real test command.
  • Every new check command was run (results below).

Crate READMEs

  • ai-host:
    • The model service and the octos host service for script apps are now covered: card.<app id>, the gate, the declared names (src/contained.rs).
    • Removed: "broker omits / does not set generic_tools" (broker.rs:1721 sets them).
    • Toolbox: the App Hub pin already includes mobile: native-feeling frame pacing on the phone #26, but the code keeps the os.* gate. toolbox-peers is on by default on the phone.
  • app-peers:
    • The person's share_history lane is on main, no longer "in progress".
    • Script-app peers are covered.
    • The namespace id is the broker id (app/card.os.mail/…, FNV tag).
    • The approvals routing is corrected.
  • kernel (en/zh):
    • The consumers are the system chat, every app-peers broker and AppCard. Removed: the stale "Rinx mini-app host uses rinx-mini-… sessions" paragraph.
    • The toolbox and cross-app grants are not wired outside tests.
    • agents.* host tools are covered.
    • Host tools need no peer token (octos#2657).
  • toolbox:
    • Removed "The shells do not link it yet".
    • The pin has octos-research, so no override is needed. The test count is 83, the dossier template is added, and the fixture count is 23.
    • "How an app agent uses it" now matches peer::catalog.
  • crates/l0-chat/README.md (new): ownership, roles, limits, storage, responders, tests.
  • apps/README (en/zh) and apps/AGENTS.md:
    • Calendar (row, status, calendar service section).
    • Mail's mail.notify, contacts.rs and secrets folder.
    • An "App agents" section on declaring an agent, running it, its tools and its cards.
    • Layout, packing step, and the test table.
  • apps/mail plan: the status line, which said "not started", now lists what feat(mail): email action card MVP on the desktop (fake data) #261/L0 in-card chat (sys.chat) host side; AI-written text in the mail card #263/Mail and Calendar agents put cards on the glance screen; assistant pane and glance panel polish #267 landed.

Checks run

  • cargo test --locked -p octosense-l0-chat passed (8); its clippy is clean.
  • -p octosense-mail-service -p octosense-calendar-service -p octosense-news-service -p octosense-llm-service passed.
  • -p octosense-app-peers --features octos-core,ws passed.
  • -p octosense-ai-host --features octos-core,llm passed.
  • -p octosense-kernel passed.
  • -p octosense-toolbox passed (83).
  • From phone/: cargo test --locked --features mobile-apps -p octosense-shell with each of system_chat (63), host_tools (60), approvals (58) and glance (31) passed.
  • From rom/: python3 -m unittest tests.test_no_local_paths is OK, and the tools/ unittests are OK. Every relative link resolves.
  • Not run: tools/ci-local.sh.
  • Unverified (marked as such in the docs): the "Trying it" desktop recipe for app agents.

Overlaps with open PRs

Inconsistencies in the code (not fixed here)

Second commit: the person talks to an app's agent directly

  • New README section (English and Chinese) "Talking to an app's agent yourself": the shell's "Ask " panel for every app with an agent (crates/shell/src/app_chat/), opened from the bar's button, Shift+F8 or the menu row "Ask this app's agent"; a card's in-card chat; the app's own UI. It covers consent, both lanes labelled, Send running in parallel with the system agent's lane, where questions go, and close/reopen.
  • Stop: the panel's Stop stops only the person's own turn (interrupt_agent_lane). A running system agent turn has its own "Stop the system agent's task". The approval and question sheets' "Stop 's agent" stops both lanes (approvals::stop_agent). The README had said every Stop ends both lanes.
  • Phone: the pane is drawn as a full-screen sheet, but no touch control opens it on main yet. All callers of ask_focused_app are the desktop bar, the menu row and Shift+F8.
  • The two-lanes PNG still said "Two lanes: in progress" and "app UI or its cards". The Mermaid diagram is now shown inline and the PNG is removed.
  • apps/README (English and Chinese): the same in short.

Checks: python3 -m unittest discover -s tools -p 'test_*.py' (90 OK), rom/tests/test_no_local_paths OK, and every relative link and anchor in the four edited files resolves.

Third commit: the README's drawings, redrawn (gpt-image-2)

Drawing What changed
agents-processes.png Adds the "Ask " panel, the person's turns from it and from in-card chat to the broker, and the app host services (mail, calendar, news) that the relay sends app tools to and that publish glance cards. The Mermaid text version gains the same nodes.
agents-two-lanes.png Back, without the "Two lanes: in progress" badge. The person's arrow is now labelled "the shell's Ask panel, a card's chat or the app's own UI".
agents-tool-call.png Checks inside each branch and the confirm: app hand-off through the router, as in the Mermaid. The example is calendar.remove_event (destructive, confirm: host) instead of mail.send, which no app has.
agents-card-flow.png (new) The system agent → Mail's agent → mail.notify → glance card → in-card chat sequence. Its Mermaid is now a collapsed text version, like the others.

Every label was checked against the Mermaid and the code. One processes draft had wrong arrows and was redrawn. The images are quantized to 128 colours, about 460 KB each.

🤖 Generated with Claude Code

ymote and others added 3 commits October 1, 2026 21:39
…r, News agents; glance cards; sys.chat)

README (en/zh): a "System agent and app agents" section with the system
agent's tools and host tools, which apps have an agent and their tools, and
a system agent -> app agent -> glance card -> in-card chat sequence; glance
cards and the in-card chat; the consent gate for script apps (not "off");
layout rows for crates/l0-chat, crates/toolbox, Calendar and its services.
AGENTS.md: "where things live" rows for the system chat, agent tools and the
relay, approvals, glance cards and l0-chat, app agents' tools.json, and the
calendar/news host services, each with a check that was run.
Crate READMEs: ai-host (model and octos services, toolbox gate and
features), app-peers (two lanes on main, script-app peers, namespaces,
approvals), kernel en/zh (consumers, the system agent's host tools, no
token for host tools), toolbox (shells link it, dossier, pin has
octos-research, 83 tests), a new crates/l0-chat README. apps/ README en/zh
and AGENTS.md: Calendar, the calendar service, an "App agents" section.
Mail plan: status.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The README described the person's lane only as opened by "the app's UI
or its cards", which none of the system apps does. Add what main has:

- A section "Talking to an app's agent yourself": the shell's "Ask <app>"
  panel for every app with an agent (crates/shell/src/app_chat/), opened
  from the bar, Shift+F8 or the menu row "Ask this app's agent"; a card's
  in-card chat; and the app's own UI. Consent, both lanes labelled, Send in
  parallel with the system agent's lane, the one-lane Stop and "Stop the
  system agent's task", where questions go, and close/reopen.
- The phone draws the panel as a full-screen sheet, but no touch control
  opens it on main yet.
- "The person's Stop ends both lanes" was only true of the sheets'
  "Stop <App>'s agent" (approvals::stop_agent); the panel's Stop is the
  person's own turn (interrupt_agent_lane).
- The two-lanes drawing still said "Two lanes: in progress" and "app UI or
  its cards": show the Mermaid diagram instead and drop the PNG.
- apps/README: the same, in short. English and Chinese together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
The drawings were from 2026-09-29 and no longer matched main:

- agents-processes.png: adds the "Ask <app>" panel in the shell's UI, the
  person's turns from it and from in-card chat to the broker, and the app
  host services (mail, calendar, news) the relay routes app tools to, which
  publish glance cards. The Mermaid text version gains the same nodes.
- agents-two-lanes.png: back, without the "Two lanes: in progress" badge
  (both lanes are on main) and with the person's arrow labelled "the
  shell's Ask <app> panel, a card's chat or the app's own UI".
- agents-tool-call.png: the relay's grant, schema and budget checks inside
  each branch and the confirm: app hand-off through the approval router, as
  the Mermaid has them; the example is calendar.remove_event (destructive,
  confirm: host) instead of mail.send, which no app has.
- agents-card-flow.png (new): the system agent -> Mail's agent ->
  mail.notify -> glance card -> in-card chat sequence, with its Mermaid
  moved into a text version like the others.

Drawn with gpt-image-2 and checked label by label against the Mermaid and
the code; quantized to 128 colours (about 460 KB each). English and Chinese
READMEs together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@ymote
ymote merged commit c19da8d into main Oct 2, 2026
5 checks passed
ymote added a commit that referenced this pull request Oct 2, 2026
… no chat in agents' cards)

The headless instrument run of the desktop shell showed where #269's README
was wrong, and #273 and #274 have since changed the same ground:

- Notifications (#273): a new card opens the glance panel unless a card
  window is up, and a notify card always posts a toast that opens it in its
  card window; while the panel is open, toasts stack left of it. Each card
  has a dismiss button, the panel a close button. Phone: a shade
  notification.
- Notice cards (#274): every <app>.notify fills the shell's one notice card
  (crates/shell/resources/glance/notice.card, glance_notice.rs); Mail and
  News hand notify to the shell, Photos, Maps, YouTube and Camera are
  answered by its notice service. The app-agent table gains them.
- No agent-published card has an in-card chat: the notice card and
  Calendar's event and agenda cards declare no sys.chat, so the card flow
  ends at the blackboard (steps 12-14 dropped from the sequence and its
  drawing; step 8 is "toast and glance panel (desktop), shade notification
  (phone)"). The only shipped card with a chat is the
  OCTOSENSE_GLANCE_DEMO=mail demo card, with canned replies. For the system
  apps the way in is "Ask <app>".

English and Chinese, root and apps READMEs together.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant