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:
- What current context did Palace select?
- What supports that context?
- What should the agent distrust or verify?
- What is the safest next probe or action?
Trust States
| State | Meaning | Safe agent behavior |
|---|---|---|
source_backed | Active 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_memory | A reviewed memory exists without full source-record support. | Use as curated context, not as proof equivalent to a source-backed record. |
generated_unpromoted | A 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_source | The supporting source is stale, failed, deleted, or superseded. | Do not follow it for operational decisions until current support replaces it. |
source_missing | Palace cannot show usable source support for the memory. | Ask a follow-up question or find a better source. |
policy_limited | Relevant context exists, but the caller cannot expand its private details. | Request an authorized summary instead of bypassing the policy boundary. |
unknown | Palace cannot classify the trust state yet. | Treat it as untrusted startup context. |
After Wakeup
Palace also ships bounded post-wakeup governance:
- decision-claim support can show the source evidence attached to a claim;
- stale-source invalidation can mark claim support that should no longer drive an answer;
- operator review can promote, reject, mark stale, or demote supported decision claims;
- answer audit can expose the support state behind decision-claim answers;
- Control Tower can summarize source-trust health for wakeup context.
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
- Getting started for local setup and auth boundaries.
- MCP quickstart for local stdio and OAuth-secured remote MCP.
- Memory contract for canonical entries, strict recall, retention, and reflection boundaries.
- Project status for the current shipped surface and evaluation caveats.