{
  "access": "public",
  "type": "reference",
  "format": "markdown",
  "title": "Governor Tools Reference",
  "chunked": true,
  "url": "https://library.datagrout.ai/governor-tools",
  "summary": "Continuous cognition for MCP agents via passive enrichment and a unified status dashboard.",
  "content_markdown": "# Governor Tools\n\nContinuous cognition for MCP agents via passive enrichment and a unified status dashboard.\n\nWhen enabled, every tool call automatically enriches the Governor's Prolog fact space — no explicit fact injection needed. The Governor gains awareness from normal tool usage. Use `logic.*` tools for explicit fact management, `scheduler.*` tools for recurring tasks, and `governor.status` to see what happened since your last check.\n\n---\n\n## `governor.enable@1`\n\nStart or resume a Governor session. If one already exists, returns its current status.\n\n### Parameters\n\nNone required. The session auto-provisions at 5 credits/hour.\n\n### Example\n\n```json\n{\n  \"name\": \"data-grout@1/governor.enable@1\",\n  \"arguments\": {}\n}\n```\n\nResponse:\n\n```json\n{\n  \"status\": \"enabled\",\n  \"session_id\": 42,\n  \"agent_id\": \"governor-user-123\",\n  \"billing_rate\": \"5.0 credits/hour\",\n  \"message\": \"Governor active — percepts, symbolic reasoning, and scheduling enabled.\"\n}\n```\n\n**Cost:** 0 credits (session billing is separate at 5 credits/hour).\n\n---\n\n## `governor.status@1`\n\nDashboard view — the \"car gauges\" for your agent. Shows session uptime, active percepts, scheduled tasks, credits consumed, and token savings.\n\n### Parameters\n\nNone required.\n\n### Example\n\n```json\n{\n  \"name\": \"data-grout@1/governor.status@1\",\n  \"arguments\": {}\n}\n```\n\nResponse:\n\n```json\n{\n  \"session\": {\n    \"active\": true,\n    \"session_id\": 42,\n    \"started_at\": \"2026-03-16T10:00:00Z\",\n    \"uptime_hours\": 2.5,\n    \"credits_consumed\": 12.5,\n    \"billing_rate\": 5.0,\n    \"status\": \"active\"\n  },\n  \"percepts\": {\n    \"count\": 0,\n    \"by_type\": {},\n    \"percepts\": []\n  },\n  \"scheduled_tasks\": {\n    \"total\": 5,\n    \"by_status\": { \"active\": 3, \"completed\": 2 },\n    \"active_tasks\": [\n      {\n        \"id\": \"abc-123\",\n        \"tool\": \"quickbooks@1/get-all-invoices@1\",\n        \"schedule\": \"every day at 9am\",\n        \"status\": \"active\",\n        \"fire_count\": 12,\n        \"next_fire_at\": \"2026-03-17T09:00:00Z\"\n      }\n    ]\n  },\n  \"savings\": {\n    \"reflex_queries\": 150,\n    \"tokens_saved\": 22500000,\n    \"estimated_dollars_saved\": 337.5\n  }\n}\n```\n\n**Cost:** 0 credits.\n\n---\n\n## `governor.disable@1`\n\nEnd the Governor session. Stops billing, cleans up percepts, and returns a final billing summary.\n\n### Parameters\n\nNone required.\n\n### Example\n\n```json\n{\n  \"name\": \"data-grout@1/governor.disable@1\",\n  \"arguments\": {}\n}\n```\n\nResponse:\n\n```json\n{\n  \"status\": \"disabled\",\n  \"total_credits_charged\": 12.5,\n  \"total_hours\": 2.5,\n  \"message\": \"Governor session ended. Percepts stopped, billing finalized.\"\n}\n```\n\n**Cost:** 0 credits.\n\n---\n\n## Passive enrichment\n\nWhen a Governor session is active, the gateway automatically asserts facts after each tool call:\n\n- `tool_executed(agent_id, tool_name, timestamp, status)` — recorded for every tool call\n- `tool_result_cached(agent_id, tool_name, cache_ref, timestamp)` — when a cache_ref is produced\n\nAfter each assertion, the Governor's Reflex layer checks triggers — so event-driven tasks fire automatically based on tool activity patterns.\n\nGovernor and scheduler tools are excluded from enrichment to prevent recursion.\n\n---\n\n## Interaction model\n\nThe Governor session ties together several existing tool suites:\n\n| Need | Use |\n|------|-----|\n| Start/stop session, check dashboard | `governor.enable`, `governor.status`, `governor.disable` |\n| Store and query facts | `logic.remember`, `logic.query`, `logic.statement` |\n| Set up rules and triggers | `logic.constrain` |\n| Schedule recurring/event-driven tasks | `scheduler.create`, `scheduler.list` |\n| Passive awareness | Automatic — every tool call enriches the Governor when active |\n\n**Typical workflow:**\n\n1. Call `governor.enable` to start a session\n2. Use tools normally — the Governor observes everything\n3. Use `scheduler.create` to set up recurring or event-driven tasks\n4. Use `logic.constrain` to define trigger rules\n5. Call `governor.status` periodically to check what happened\n6. Use `logic.query` for zero-token symbolic reasoning over accumulated facts\n7. Call `governor.disable` when done\n"
}