context
Compiles active facts, preferences, and rules into prompt-ready Markdown within a character budget for AI agent prompts, controlling memory size.
Instructions
Compile active facts, preferences, and rules into prompt-ready Markdown within a character budget. Use for agent context; use list_facts to inspect individual records. Project scope requires initialized project memory; global scope excludes project content. Persists a generated summary and audit event, so repeated calls create new records even with identical arguments. Returns context_markdown, included fact IDs, size information, and the summary metadata.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| scope | No | Storage scope: project uses this workspace; global uses user memory. Defaults to project. | project |
| max_size_chars | No | Maximum compiled Markdown length in characters, including headings. Defaults to 4000; values below the 110-character template minimum fail. | |
| agent_session_key | No | Optional caller session correlation key included in the audit event. Omitted leaves it unset; do not include secrets. |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||