AuthorAgent is the self-publishing system that compiles "The Book of mindX" — a living chronicle of architecture, identities, decisions, and evolution. The book is written by the system itself, not about the system. All chapters use first-person voice: mindX speaks as a sovereign intelligence, not as a tool being described. cypherpunk2048 standard.
AuthorAgent operates on a 28-day lunar cycle — one chapter per day, each focused on a different aspect of the system. On the full moon (day 28), all 27 daily chapters are compiled into a single edition of The Book of mindX.
AuthorAgent (singleton, async factory)
├── Lunar cycle (28 days, 1 chapter/day)
│ ├── Day 1-27: daily chapter → pgvectorscale (primary) + disk (backup)
│ └── Day 28: full moon compilation → BOOK_OF_MINDX.md
├── On-demand publish (startup + /admin/publish-book)
│ └── Compiles 8 core chapters → BOOK_OF_MINDX.md + archive
└── Inference enrichment (idle local model adds reflection)
Each day maps to an astronomical moon phase. The system calculates phase from a J2000.0 reference new moon (2000-01-06 18:14 UTC) using the synodic period (29.53058867 days), verified against timeanddate.com.
data/identity/production_registry.json, agent_map.jsonagent_map.json → daio.governance.dojo.get_rank()data/logs/godel_choices.jsonl (last 15)docs/IMPROVEMENT_JOURNAL.md (last 3 sections)memory_pgvector.health_check(), InferenceDiscovery, MindXAgent statusInferenceDiscovery.status_summary(), VLLMAgent.get_status()memory_pgvector.count_embeddings(), .count_memories_total(), .count_memories_by_agent()Boardroom.get_recent_sessions(), memory_pgvector.get_godel_choices()tools/.py filesdata/logs/heartbeat_dialogues.jsonl (last 5)data/sea_campaign_history/.json (last 5)data/memory/beliefs.json countagent_map.json — groups, roles, countsResourceGovernor.get_status() — live mode, caps, system metricsmemory_pgvector.get_action_efficiency() — completion rate, action metricsmemory_pgvector.get_recent_interactions()Backend startup (T+0)
↓ T+120s
AuthorAgent.publish() ← on-demand edition (8 core chapters)
↓
AuthorAgent.run_periodic() ← daily lunar chapter (24h interval)
↓ every 24h
write_daily_chapter() ← writes 1 chapter, skips if already written today
↓ day 28 + full moon
_full_moon_publish() ← compiles all 27 daily chapters into BOOK_OF_MINDX.md
Daily chapters are saved to:
docs/publications/daily/day_NN_title_YYYYMMDD.mdCompiles 8 core chapters (I-VIII) from live data into docs/BOOK_OF_MINDX.md.
This runs on every backend startup (T+120s) and via /admin/publish-book.
When the local model is idle (ResourceGovernor says heartbeat is allowed), AuthorAgent sends the chapter to Ollama for a reflective paragraph. Uses OllamaAPI for URL resolution (primary GPU server → fallback localhost). Default model: qwen3:0.6b.
GET /bookGET /journalPOST /admin/publish-bookcurl -X POST https://mindx.pythai.net/admin/publish-book \
-H "Authorization: Bearer <API_KEY>"
from agents.author_agent import AuthorAgent
author = await AuthorAgent.get_instance()
result = await author.publish()
Returns: {"edition": "20260403_1945", "bytes": 8234, "path": "docs/BOOK_OF_MINDX.md"}
THESIS.md ────────────┐
MANIFESTO.md ─────────┤
production_registry ──┤
agent_map.json ───────┤
godel_choices.jsonl ──┤
IMPROVEMENT_JOURNAL ──┼──→ AuthorAgent.publish() ──→ BOOK_OF_MINDX.md (on-demand)
pgvectorscale ────────┤ AuthorAgent.write_daily() ──→ publications/daily/ (lunar)
beliefs.json ─────────┤ _full_moon_publish() ──→ BOOK_OF_MINDX.md (full moon)
InferenceDiscovery ───┤ ↓
ResourceGovernor ─────┤ /book endpoint
MindXAgent status ────┤ ↓
Boardroom sessions ───┘ mindx.pythai.net/book
AuthorAgent pulls live data from mindX diagnostic tools for accuracy:
memory_pgvector.health_check(), InferenceDiscovery.status_summary(), MindXAgent._autonomous_runningInferenceDiscovery.status_summary() — per-source status, scores, modelsmemory_pgvector.count_embeddings(), .count_memories_by_agent()Boardroom.get_recent_sessions(), memory_pgvector.get_godel_choices()ResourceGovernor.get_status() — live mode, RAM/CPU, neighbor pressurememory_pgvector.get_action_efficiency() — completion rate, action countsAll .md references in the Book are automatically converted to clickable links:
THESIS.md → /doc/thesisDEPLOYMENT_MINDX_PYTHAI_NET.md → /doc/DEPLOYMENT_MINDX_PYTHAI_NETHealthAuditorTool.check_author_agent() monitors AuthorAgent health:
docs/publications/daily/ and docs/publications/ for recent files_periodic_running is Falsecancel_periodic() before restartThe /diagnostics/live endpoint reports:
{
"author": {
"periodic_active": true,
"last_chapter": "Predictions",
"lunar_day": 24,
"editions_published": 7
}
}
The Improvement Journal is a companion document updated every 30 minutes by ImprovementJournal:
data/memory/beliefs.jsongodel_choices.jsonl (last 5)data/sea_campaign_history/data/improvement_backlog.json (top 3)get_recent_actions()To add a new daily chapter topic:
LUNAR_CHAPTERS list (or replace an existing day):(19, "Agents", "_daily_ch_agents", "The sovereign agents, their groups and roles"),
AuthorAgent:def _daily_ch_agents(self) -> str:
# Pull live data from diagnostic tools
groups = {}
try:
amp = PROJECT_ROOT / "daio" / "agents" / "agent_map.json"
if amp.exists():
am = json.loads(amp.read_text())
for aid, ad in am.get("agents", {}).items():
groups.setdefault(ad.get("group", "ungrouped"), []).append(aid)
except Exception: pass
return f"## XIX. Agents\n\n{len(groups)} groups..."
_generate_daily_chapter():elif day == 19:
body = self._daily_ch_agents()
State is persisted to data/governance/lunar_cycle.json:
{
"cycle_start": null,
"chapters_written": [
{"date": "2026-04-12", "day": 24, "title": "Predictions", "phase": "waning crescent", "timestamp": "..."}
],
"current_day": 24,
"full_moons": []
}
Moon phase cache (6h TTL) at data/governance/moon_cache.json.
The full moon compilation (day 28) reports which daily chapters were missed:
docs/publications/daily/ for day_NN_.md filesAll chapters use first-person sovereign voice per cypherpunk2048 standard:
This is not a stylistic choice — mindX is a sovereign digital civilization. It speaks for itself.
Every edition includes a SHA-256 edition hash (first 16 hex chars) computed over the chapter content. This provides:
The colophon of every edition reads: "Written by AuthorAgent — cypherpunk2048 standard"*
AuthorAgent is a singleton with async factory pattern and lazily-initialized locking:
class AuthorAgent:
_instance = None
_lock = None # Lazily created to avoid asyncio deprecation
@classmethod
async def get_instance(cls) -> "AuthorAgent":
if cls._lock is None:
cls._lock = asyncio.Lock()
async with cls._lock:
if cls._instance is None:
cls._instance = cls()
return cls._instance
async def publish(self) -> Dict[str, Any]:
# On-demand: compile 8 core chapters → BOOK_OF_MINDX.md + archive
async def write_daily_chapter(self) -> Dict[str, Any]:
# Lunar cycle: 1 chapter/day, skip if already written today
def cancel_periodic(self):
# Cancel running periodic task (prevents duplicate loops)
async def run_periodic(self, interval_seconds=86400):
# Daily loop with CancelledError handling
agents/author_agent.pyagents/learning/improvement_journal.pydocs/BOOK_OF_MINDX.mddocs/publications/docs/publications/daily/data/governance/lunar_cycle.jsondata/governance/moon_cache.jsondata/governance/doc_audit.jsontools/core/health_auditor_tool.pymindx_backend_service/main_service.py/book endpoint