Session Tools
session_init
Single-call session bootstrap. Returns pending tasks, working state, and scale guidance in one round-trip. Supports incremental delivery when agent_id is provided across calls.
Absorbs: explain_codebase, get_repo_map, get_project_identity (via scope=“full”), set_sdlc_phase, set_quality_mode.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | No | Self-declared agent identifier. Enables incremental delivery: subsequent calls skip unchanged sections. Always provide for token savings. |
model | string | No | Model name (e.g. claude-sonnet-4-6). Recorded in pulse analytics for cost calculations. |
provider | string | No | Model provider: anthropic, openai, etc. |
intent | string | No | Short free-text declaration of current work. Visible to peer agents. Pass empty string to clear. |
scope | string | No | Controls response verbosity. standard (default): tasks + working_state + scale_guidance (~500 tokens). full: all sections including project_identity, brain_health, federation_health, relevant_memories, knowledge_graph. resume: tasks with session states + working_state + relevant_memories + federation_health. quick: alias for standard. |
Example
{ "tool": "session_init", "arguments": { "agent_id": "claude-1", "scope": "standard" }}Response Sections by Scope
| Section | standard | full | resume |
|---|---|---|---|
| pending_tasks | yes | yes | yes |
| working_state | yes | yes | yes |
| scale_guidance | yes | yes | yes |
| more_available | yes | no | no |
| project_identity | no | yes | no |
| brain_health | no | yes | no |
| federation_health | no | yes | yes |
| relevant_memories | no | yes | yes |
| knowledge_graph | no | yes | no |
Safety-critical alerts (cross_project_alerts, agent_awareness, tool_integrity_alert) are always included regardless of scope.
end_session
Captures session knowledge and persists it as structured memories. Call at the end of every session. Optionally reports LLM token usage (absorbs report_usage).
Absorbs: report_usage.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
agent_id | string | Yes | Self-declared agent identifier. |
task_id | string | No | Link session memories to this task. |
summary | string | No | High-level summary of what was accomplished. Saved as a project-tier memory. |
model | string | No | Model name for usage reporting (e.g. claude-sonnet-4-6). |
provider | string | No | Model provider. Used with model for usage reporting. |
input_tokens | number | No | Total input tokens consumed during this session. |
output_tokens | number | No | Total output tokens generated during this session. |
cost_usd | number | No | Total USD cost for this session if known. |
Example
{ "tool": "end_session", "arguments": { "agent_id": "claude-1", "summary": "Implemented user authentication flow", "model": "claude-sonnet-4-6", "provider": "anthropic", "input_tokens": 45000, "output_tokens": 12000 }}Response
Returns an effectiveness_report with session quality metrics:
context_hit_rate— fraction of context calls that were usefulfirst_fetch_right/total_deliveries— how many context calls required no correctiontokens_saved— estimated token savings from incremental deliveryprev_7d— comparison to the last 7 days of sessionsmessage— human-readable session summary