Source-Backed Wakeup For Agent Teams

Source basis: Palace of Truth docs/source-backed-wakeup-demo.md, backend/app/mcp_server.py, backend/app/services/source_trust_summary.py, and the public source/claim workflow, reviewed through commit 62b4328 on July 9, 2026.

Palace gives a fresh agent bounded startup context with trust labels, stale-source warnings, policy boundaries, and safe follow-up probes before it plans or acts. This is the primary Palace trust story: durable memory is useful, but agents also need to know which context is supported, generated, stale, missing, or intentionally hidden.

The Startup Contract

Use get_wakeup_context for one compact startup package. Then use palace_search or retrieve_agent_memory for a specific follow-up question.

{
  "agent_scope_key": "codex",
  "workspace_key": "palaceoftruth",
  "session_key": "review-session"
}

The response is designed to help an agent answer four questions:

  1. What current context did Palace select?
  2. What supports that context?
  3. What should the agent distrust or verify?
  4. What is the safest next probe or action?

Trust States

StateMeaningSafe agent behavior
source_backedActive source records and chunks support the context.Use as the strongest startup context, while checking whether the task needs a newer or narrower source.
curated_memoryA reviewed memory exists without full source-record support.Use as curated context, not as proof equivalent to a source-backed record.
generated_unpromotedA synthesis, diary, wakeup brief, reflection, or other generated artifact has not been promoted.Treat it as a hypothesis and verify it against source-backed evidence.
stale_sourceThe supporting source is stale, failed, deleted, or superseded.Do not follow it for operational decisions until current support replaces it.
source_missingPalace cannot show usable source support for the memory.Ask a follow-up question or find a better source.
policy_limitedRelevant context exists, but the caller cannot expand its private details.Request an authorized summary instead of bypassing the policy boundary.
unknownPalace cannot classify the trust state yet.Treat it as untrusted startup context.

After Wakeup

Palace also ships bounded post-wakeup governance:

These features make trust inspectable. They do not guarantee that every generated answer is source-backed or that every downstream artifact is automatically invalidated when a source changes.

Privacy And Scope Boundary

Wakeup context is intentionally compact. It should return titles, summaries, trust labels, warning codes, provenance identifiers, and safe probes—not raw private chunks, secrets, production content, or unauthorized cross-agent memory.

Agent, workspace, session, and tenant-shared scopes remain distinct. Cross-agent retrieval is deny-by-default unless a server-authorized delegated policy allows specific scopes. A policy-limited result is a boundary to respect, not an invitation to broaden the query.

Reflection Is Not Automatic Truth

Semantic reflection is opt-in and disabled by default. It creates generated_unpromoted curation candidates with source IDs, digests, and conflict metadata. Candidates do not enter canonical semantic recall or outrank source-backed memory until an operator reviews and promotes them through an allowed workflow.

Try The Sanitized Demo

From the public Palace repository:

python3 scripts/demo_source_backed_wakeup.py

The demo uses sanitized fixture data. It does not connect to Palace, read secrets, use production content, or mutate a database.

Next Steps