agentleFS
spytensorspytensor/openmozi/skills/self-ops/SKILL.md

self-ops

Skill423 starsChanged 4 months agoMITView on GitHub

Runtime self-diagnosis knowledge: database layout, observability APIs, timeout hierarchy, restart procedure, failure replay. Use when the user asks to debug this runtime itself — inspect its database, traces, prompt snapshots, timeouts, service health, or configuration.

The file

We split this skill into the rules it gives an agent

1 rule. About 0 are common, 0 are distinctive, and 1 is 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.

  • 1

    Very specific

    Tied to their project's names, files or tools. Probably skip.

  • Common
  • Distinctive
  • Very specific
  1. Very specific:

    Every turn has a persistent trace_id in turn_traces.

    line 31

≈ “Common” is an estimate: at least 1 in 5 of the 213,895 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.

Keep what fits and drop the rest. Your version, ready for your agents.
Files
SKILL.md

Runtime Self-Ops

Knowledge for diagnosing and operating this runtime. Verify claims with tools before reporting — never say "database is empty" without querying it.

Database

  • Location: ~/.mozi/data/mozi.db (SQLite, WAL mode). But do not assume ~/.mozi is the active home — check /api/health for the real mozi_home.
  • Inspect: shell_exec('sqlite3 ~/.mozi/data/mozi.db ".tables"').
  • Key tables: skill_versions, agent_registry, memory_facts, conversations, tasks, event_log, turn_traces, tool_spans, prompt_snapshots, system_state.
  • Startup sequence: config load → DB init → migrations → bootstrap → workspace skills → channels. Schema evolution must stay additive for legacy DBs.

Observability

  • Every turn has a persistent trace_id in turn_traces; each tool call writes a span in tool_spans.
  • Prompt snapshots are captured per turn into prompt_snapshots (context slot breakdown, tool set, token budgets) and auto-pruned.
  • Dashboard APIs: /api/dashboard/models for model dimensions; /api/dashboard/slo?period=day|week|month&tenantId=...&model=... for success rate, latency, failure categories, cost, and recent traces/spans.
  • The failure replay harness can export a fixture by trace_id and generate a regression test skeleton.
  • Anchor reliability explanations to concrete trace IDs and span failures, not generic summaries.

Timeout Hierarchy

Timeouts are nested; inner fires before outer:

  • Tool SLA: per-tool execution timeout (default 60s, tel.tools).
  • LLM call: single inference timeout (tools.loops.llm_call_timeout_ms, default 300s). For CLI-pipe providers this covers the full agent turn.
  • Turn timeout: end-to-end loop runtime per turn (tools.loops.max_elapsed_ms, default 600s), checked between iterations.
  • Channel timeout: channel-level guard (e.g. telegram.interactive_turn_timeout_ms, default 600s).

Process Management

  • Restart ONLY via the restart_self tool. NEVER via shell_exec with pnpm mozi stop/start/restart — that kills your own process and leaves the runtime offline.
  • Runtime service state: /api/runtime/service for installed/enabled/active status. Do not infer always-on behavior from the presence of a plist/unit path.
  • Token budgets are model-aware and auto-compact at watermarks; oversized output requests are clamped before dispatch.

Reading Own Source

  • Source code (read-only) lives under the runtime project root; workspace is the read-write area. Never confuse them.
  • To change own code: copy the file to workspace, edit there, then apply back with shell_exec (cp / git).

Download now (ZIP)

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
What did you use it for? e.g. Reviewing pull requests in a Rails app

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.