init
Start new conversation sessions by retrieving relevant context, recent decisions, and workspace information to provide AI assistants with project-specific background.
Instructions
Initialize a new conversation session and automatically retrieve relevant context. This is the FIRST tool AI assistants should call when starting a conversation. Returns: workspace info, project info, recent memory, recent decisions, relevant context, high-priority lessons, and ingest_recommendation.
The ingest_recommendation field indicates if the project needs indexing for code search:
If [INGEST_RECOMMENDED] appears, ask the user if they want to enable semantic code search
Benefits: AI-powered code understanding, dependency analysis, better context retrieval
If user agrees, run: project(action="ingest_local", path="<project_path>")
IMPORTANT: Pass the user's FIRST MESSAGE as context_hint to get semantically relevant context! Example: init(folder_path="/path/to/project", context_hint="how do I implement auth?")
This does semantic search on the first message. You only need context on subsequent messages.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| folder_path | No | Current workspace/project folder path (absolute). Use this when IDE roots are not available. | |
| workspace_id | No | Workspace to initialize context for | |
| project_id | No | Project to initialize context for | |
| session_id | No | Custom session ID (auto-generated if not provided) | |
| context_hint | No | RECOMMENDED: Pass the user's first message here for semantic search. This finds relevant context from ANY time, not just recent items. | |
| include_recent_memory | No | Include recent memory events (default: true) | |
| include_decisions | No | Include recent decisions (default: true) | |
| auto_index | No | Automatically create and index project from IDE workspace (default: true) | |
| allow_no_workspace | No | If true, allow session_init to return connected even if no workspace is resolved (workspace-level tools may not work). | |
| skip_project_creation | No | If true, skip automatic project creation/matching. Use for parent folders containing multiple projects where you want workspace-level context but no project-specific context. | |
| is_post_compact | No | Controls context restoration from recent snapshots. Defaults to true (always restores). Set to false to skip restoration. Can also be controlled via CONTEXTSTREAM_RESTORE_CONTEXT environment variable. |