Self observe

From GML-FMGroup/openteamwork · View interactive version

Self observe is an AI agent skill from the GitHub repository GML-FMGroup/openteamwork. Observe OpenTeamwork Node health with usage, automation status, audit facts, logs, and quick diagnostics.

How to use this skill

Skill file

Self Observe Skill

Use this skill when the user asks for agent self-inspection, runtime health checks, or diagnostics such as token cost, error logs, and service status.

What To Check

  1. Token usage:
otw operations usage --json
otw operations usage --provider google --limit 50 --json
otw operations usage --provider openai --limit 50 --json
  1. Runtime status:
otw operations status --json
otw operations health --json
otw operations heartbeat status --json
otw operations cron list --json
  1. Error logs (read-only):
tail -n 200 ~/.openteamwork/logs/node.err.log
rg -n "ERROR|Error|Traceback|Exception|failed|timeout" ~/.openteamwork/logs/node.err.log ~/.openteamwork/logs/node.out.log
  1. SQLite quick verification (if sqlite3 exists):
sqlite3 ~/.openteamwork/database/token_usage.db "SELECT provider, COUNT(*) AS requests, SUM(total_tokens) AS total_tokens FROM llm_token_usage_events GROUP BY provider ORDER BY total_tokens DESC;"
sqlite3 ~/.openteamwork/database/token_usage.db "SELECT response_at, provider, model, request_tokens, response_tokens, total_tokens FROM llm_token_usage_events ORDER BY response_at_ms DESC LIMIT 20;"

Fast Path

Generate one consolidated report:

bash openppx/skills/self-observe/scripts/self_status_report.sh

Output Format

When reporting to user, include:

  1. Runtime Summary: Node/heartbeat/cron health highlights.
  2. Token Summary: total requests/tokens and provider split.
  3. Recent Errors: latest error signatures with file and timestamp.
  4. Risks: what might break soon (missing usage data, repeated failures, disconnected provider).
  5. Next Actions: concrete commands to validate/fix.

Guardrails

Use this skill with your AI agent: Open on Skill Issue to copy, download, or add to your library. Works with Claude, ChatGPT, Gemini, Cursor, Windsurf and more.