Tier 3 agent lifecycle — ratatoskr.tier3 module + CLI #15
Closed
opened 2026-05-24 20:21:19 -07:00 by vh
·
1 comment
No Branch/Tag Specified
main
diag/r30-gap-injection-harness
diag/r30-phi0-step-response
diag/r29-pad-series
graphify-tooling
v0.22.3
v0.22.2
v0.22.1
v0.22.0
v0.21.20
v0.21.19
v0.21.18
v0.21.17
v0.21.16
v0.21.15
v0.21.14
v0.21.13
v0.21.12
v0.21.11
v0.21.10
v0.21.9
v0.21.8
v0.21.7
v0.21.6
v0.21.5
v0.21.4
v0.21.3
v0.21.2
v0.21.1
v0.21.0
v0.20.17
v0.20.16
v0.20.15
v0.20.14
v0.20.13
v0.20.12
v0.20.11
v0.20.10
v0.20.9
v0.20.8
v0.20.7
v0.20.6
v0.20.5
v0.20.4
v0.20.3
v0.20.2
v0.20.1
v0.20.0
v0.19.9
v0.19.8
v0.19.7
v0.19.6
v0.19.5
v0.19.4
v0.19.3
v0.19.2
v0.19.1
v0.19.0
v0.18.11
v0.18.10
v0.18.9
v0.18.8
v0.18.7
v0.18.6
v0.18.5
v0.18.4
v0.18.3
v0.18.2
v0.18.1
v0.18.0
v0.17.17
v0.17.16
v0.17.15
v0.17.14
v0.17.13
v0.17.12
v0.17.11
v0.17.10
v0.17.9
v0.17.8
v0.17.7
v0.17.6
v0.17.5
v0.17.4
v0.17.3
v0.17.2
v0.17.1
v0.17.0
v0.16.1
v0.16.0
v0.15.1
v0.15.0
v0.14.2
v0.14.1
v0.14.0
v0.13.0
v0.12.0
v0.11.0
v0.10.0
v0.9.0
v0.8.2
v0.8.1
v0.8.0
v0.7.1
v0.7.0
v0.6.5
v0.6.4
v0.6.3
v0.6.2
v0.6.1
v0.6.0
v0.5.1
v0.5.0
v0.4.1
v0.4.0
v0.3.0
v0.2.1
v0.2.0
v0.1.0
Labels
Clear labels
blocked-needs-contract
blocked-needs-dependency
bug
cli
documentation
duplicate
enhancement
invalid
needs-architect-decision
needs-info
needs-triage
observability
ready-for-agent
sse-client
task
tui
wontfix
Sleipnir refuses dispatch — issue-scoped contract missing
Sleipnir holds dispatch — INV-029 dependency-aware gate
Something is not working
Command-line surface (--send, --new, --session, etc.)
Docs / contract / spec work
Duplicate of another issue
New feature or improvement
Not a real issue
Escalated for a design call
More info required from reporter
Newly filed, not yet sorted
Log-pane / debug-surface work (persona, admin events, Bifrost, tools)
Gates AFK dispatch via Sleipnir (applied by /sleipnir-preflight)
SSE consumer module (src/ratatoskr/sse_client.py)
Implementation task
Textual app shell + presenters
Accepted as not-fixing
Milestone
No items
No Milestone
Projects
Clear projects
No projects
Notifications
Due Date
No due date set.
Dependencies
No dependencies set.
Reference: vh/ratatoskr#15
Reference in New Issue
Block a user
Blocking a user prevents them from interacting with repositories, such as opening or commenting on pull requests or issues. Learn more about blocking a user.
Problem
Worldtree Phase 2.0 ships Tier 3 — consumer-defined agents owned by the caller's
user_id, addressed as<user_id>:<agent_name>. The lifecycle endpoints are:POST/agents/defineDELETE/agents/<user_id>:<agent_name>PATCH/agents/<user_id>:<agent_name>system_promptand/ormodel.Ratatoskr's picker already handles Tier 3 agents generically per issue #8 (they appear in
GET /agentsif defined; the picker shows them like any other). What's missing: lifecycle management. Without a way to define / patch / delete Tier 3 agents from ratatoskr, the only Tier 3 flow operators can exercise is "use whatever Tier 3 agents already exist on the server" — which doesn't help observe how Tier 3 agents are HANDLED by the API.Live verification against personal Worldtree (v0.16.2):
Tier 3 is live; ratatoskr needs to expose it.
Solution
New module
src/ratatoskr/tier3.pyfollowing the same caller-owned-AsyncClient posture asratatoskr.sessions:Errors mirror
ratatoskr.sessionspatterns — exceptions with[:1024]body truncation:Tier3QuotaExceeded— 429agent_quota_exceeded(50-agent cap per Heimdall key).Tier3UserIdUnsupported— 403tier3_user_id_unsupported(non-slug user_id).Tier3FieldNotMutable— 422field_not_mutableon PATCH with an immutable key.Tier3LayerDeferred— 422layer_deferredifpersona/motivational/valence/memorycarry non-null.Tier3AgentNotFound— 404 (delete on non-existent / patch on non-existent).SessionApiFailed(reused from sessions) — other non-2xx responses.CLI entry point:
python -m ratatoskr.tier3 <subcommand>:Auth via the same env vars as the main ratatoskr CLI (
WORLDTREE_API_URL,WORLDTREE_API_KEY). No new flags; shareUSER_AGENTfromratatoskr.cli.Out of scope (this issue)
agent_quota_exceededbecomes a frequent pain.null. If a future Phase enables them, amend this module.agents.cascade_deleteevent visibility.:in id show with their full id like any other.Acceptance
docs/contracts/issues/15.contract.md(new module) drift-checks clean.uv run ruff check src/ tests/clean.python -m ratatoskr.tier3 define --name smoke-1 --system-prompt "..." --model qwen3.6-35-a3b→ 201 with agent_idratatoskr:smoke-1ratatoskr --new --agent ratatoskr:smoke-1→ picker fetches GET /agents (the new tier-3 agent should appear in the list), or--new --agent ratatoskr:smoke-1directly creates a sessionpython -m ratatoskr.tier3 delete ratatoskr:smoke-1→ 204Dependencies
ratatoskr.tui) — landed; picker already accepts colon-containing agent_ids.--end-user-id) — landed; Tier 3 session-create requiresend_user_id(same as lofn).docs/conversation-api-spec.md(v0.19.0 pin). No spec-pin refresh needed for this issue.Closed — shipped. ratatoskr.tier3 module + CLI implemented; tier3.py exposes define/patch/delete subcommands following the caller-owned-AsyncClient posture. Actively used to manage the Sindra Tier 3 agent (model migration + FORM ASSUMPTION patches). Tests in test_tier3.py + test_local_agents.py.