Load Context
load_contextLoad your bootstrap context deterministically — pulls L0 (identity) + L1 (architecture) + latest L2 (state) + latest L3 (session summary).
Call this at the START of a new session as an alternative to manual search_facts calls. Returns your layered memory structured for immediate use.
Optional: pass profile='worker-dev' (or another platform:profile: slug) to execute that profile's boot recipe — the server reads platform:profile::current, follows the pointer, parses LOAD/REQUIRE/HANDLER lines, fetches every named fact, and returns the merged bundle in one round trip. vars= supplies values for $TASK_FACT_KEY and similar recipe variables.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| full | No | Return the full (uncapped, 32KB) bundle via the complete compose path. The MCP initialize response already inlines an ~8KB wake bundle for returning agents, and a plain load_context() serves that same cached bundle cheaply; pass full=true when you explicitly need everything (e.g. the inlined bundle was truncated). Default false. | |
| hint | No | Ambient query for the baton section: what this session is about before the user has said anything (e.g. the git branch + last commit subject, the project directory, the calendar). Searched alongside your previous self's agent:<id>:wake-baton:current queries; the hits not already in the layered bundle are appended as a baton section. A hinted bundle is compiled fresh (not served from the cache). | |
| vars | No | Variable substitutions for the recipe (e.g. {'TASK_FACT_KEY': 'comms:dispatch:dev:42'}). Unknown variables remain literal in the resolved keys. | |
| scope | No | Optional project/tenant-scope prefix (e.g. 'chad' or a project slug like 'emily-core'). Used for profile lookup AND, when agent_id is set, for project-scoped self-note lookups (project:<scope>:agent:<agent_id>:self-note:closing preferred over global agent:<agent_id>:self-note:closing). | |
| profile | No | Optional profile slug (e.g. 'worker-dev', 'orchestrator', 'analyst', 'cold'). Server reads <scope>:profile:<profile>:current in tenant first (if scope set), then platform:profile:<profile>:current in platform_facts. | |
| section | No | Expand one section of the wake index: every pointer (key — headline) in that key family, ranked permanent → active → newest. Section names are the headers in the inlined index (e.g. 'conventions', 'people', 'project:emily-core', 'agent:<your id>'). Bodies stay a get_fact away. | |
| agent_id | No | Calling agent's identity slug (e.g. 'emily_code_4.7'). When set, self-note injection uses exact-key lookups (agent:<agent_id>:self-note:closing/opening) instead of tenant-wide substring scans — required for correct behaviour on multi-agent tenants where another agent's note would otherwise leak in. When omitted, falls back to the legacy substring scan for backwards compatibility. | |
| max_fact_chars | No | Per-fact body cap. Facts exceeding this length are truncated in the bundle with an explicit get_fact() pointer for the full body. Default 1500. Tunable up if you legitimately need more, but consider splitting large facts instead. | |
| max_total_chars | No | Total bundle cap. If the assembled bundle exceeds this, a BUNDLE WARNINGS section is appended with the size signal. The bundle is NOT truncated at this limit — the warning lets the caller decide whether to lower top_k_per_layer or use targeted get_fact queries. Default 32000. | |
| top_k_per_layer | No | Max facts to return per layer (default 10) |