opencode_session_init
Analyze the application and generate AGENTS.md to prepare a coding session, supplying context for autonomous tasks. This operation takes 30-60+ seconds on larger projects.
Instructions
Analyze the app and create AGENTS.md for a session. NOTE: This is a long-running operation that may take 30-60+ seconds depending on project size.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| id | Yes | Session ID | |
| modelID | Yes | Model ID (e.g. 'claude-3-5-sonnet-20241022') | |
| variant | No | Model variant (e.g. 'fast', 'smart') | |
| directory | No | Absolute path to the project directory. When provided, the request targets that project. If omitted, the OpenCode server uses its own working directory. | |
| messageID | Yes | Message ID | |
| providerID | Yes | Provider ID (e.g. 'anthropic') |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| data | No | ||
| text | Yes | ||
| isError | Yes |