> ## Documentation Index
> Fetch the complete documentation index at: https://www.usenotra.com/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# OpenCode and coding agents

> Use writer-0.1 in OpenCode with a provider config, let a coding agent add it to your app with the Connect agent prompt, and point agents at llms.txt.

## OpenCode

Add writer-0.1 as a provider in `opencode.json`, set `NOTRA_LABS_API_KEY` in your environment, then pick `notra-labs/writer-0.1` in `/models`:

```json opencode.json theme={"system"}
{
  "$schema": "https://opencode.ai/config.json",
  "providers": {
    "notra-labs": {
      "name": "Notra Labs",
      "env": [
        "NOTRA_LABS_API_KEY"
      ],
      "package": "@opencode/ai/providers/openai-compatible",
      "settings": {
        "baseURL": "https://platform.usenotra.com/v1"
      },
      "models": {
        "writer-0.1": {
          "name": "writer-0.1",
          "capabilities": {
            "tools": true,
            "input": [
              "text"
            ],
            "output": [
              "text"
            ]
          },
          "limit": {
            "context": 262144,
            "input": 262144,
            "output": 32768
          }
        }
      }
    }
  }
}
```

The config gives OpenCode the full context and output limits; the gateway applies those limits to JSON and streamed responses alike.

OpenCode compacts the conversation history before it fills the context window. In a project where you need to keep the entire history up to the API's limit, set `"compaction": { "auto": false }` in that project's configuration.

## Reply after a tool call

After reading a tool result, writer-0.1 may call another tool even when it has enough information to answer. In OpenCode, end the prompt with an explicit instruction such as "After you read the file, reply in chat with the changelog."

If your own client knows the tool work is done, send the full conversation and tool results with `tool_choice: "none"` on the final request. This works with Chat Completions and Responses. Leave tools available on turns that may need another call.

## Add writer-0.1 to your app with an agent

In the console, click **Connect agent** and copy the prompt. Paste it into Claude Code, Cursor, OpenCode or another coding agent. It tells the agent to read the API reference for agents, use the OpenAI SDK with the base URL, the model and the `NOTRA_LABS_API_KEY` environment variable, retry `model_starting`, and add one example call you can run.

## Docs for agents

* [https://platform.usenotra.com/llms.txt](https://platform.usenotra.com/llms.txt) has the whole Platform API in one Markdown file: quickstart, models, parameters, errors, cold starts and rate limits. Point agents here first.
* [https://platform.usenotra.com/openapi.json](https://platform.usenotra.com/openapi.json) is the OpenAPI 3.1 document, for SDK generators and API clients.
* Every page of these docs is also available as Markdown: add `.md` to its URL, or use the menu at the top of the page to copy it or open it in ChatGPT, Claude or Cursor.

## AI SDK and models.json

[usenotra.com/models.json](https://www.usenotra.com/models.json) lists writer-0.1 with its limits and prices in the models.dev provider format, for tools that read model metadata from there. For the AI SDK, use `@ai-sdk/openai-compatible` as in the [quickstart](https://www.usenotra.com/docs/platform/quickstart.md).


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.