context_pack
Assemble a token-budgeted, relevance-ranked context brief from the shared blackboard for a given task, using semantic relevance, recency, and namespace affinity.
Instructions
Assemble a token-budgeted, relevance-ranked context brief from the shared blackboard for a given task. Use this INSTEAD of blackboard_list + many blackboard_read calls: it returns only the entries most relevant to your task, ranked by semantic/lexical relevance, recency (half-life decay), and namespace affinity, assembled position-aware (strongest items first and last) under a hard token budget. Read-only — never modifies the blackboard. Returns {ok:true, text, used_tokens, budget_tokens, utilization, included:[{key,score,tokens}], excluded:[{key,reason}]}. The text field is ready to use as working context. Entries past their TTL are excluded automatically.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| task | Yes | The task or question driving relevance ranking (e.g. "diagnose the failing payment webhook") | |
| agent_id | Yes | The agent requesting the pack (used for scoped access checks and audit) | |
| max_items | No | Optional hard cap on the number of included entries (0 = unlimited) | |
| scope_tags | No | Optional comma-separated scope tags for namespace affinity (e.g. "task,analytics") | |
| budget_tokens | No | Hard token budget for the returned context text (default 2000) |