Changesets · Branches · Tags · Compare
| Changeset | e7349d8e383b23f5b31eea3d343688a2b2d9686d179a8995a2f2c76b40f0aa93 |
|---|---|
| Author | Ty Dunn <ty@continue.dev> · 2025-09-24 18:37 -07:00 |
| Committer | GitHub <noreply@github.com> · 2025-09-24 18:37 -07:00 |
| Parents | a081e4024e80, 272fbbb9c88e |
3 files changed
modified docs/docs.json +1 −0
| @@ -230,6 +230,7 @@ | ||
| 230 | 230 | "pages": [ |
| 231 | 231 | "guides/overview", |
| 232 | 232 | "guides/understanding-agents", |
| 233 | + "guides/configuring-models-rules-tools", | |
| 233 | 234 | "guides/codebase-documentation-awareness", |
| 234 | 235 | "guides/cli", |
| 235 | 236 | "guides/continuous-ai", |
added docs/guides/configuring-models-rules-tools.mdx +168 −0
| @@ -0,0 +1,168 @@ | ||
| 1 | +--- | |
| 2 | +title: "Configuring Models, Rules, and Tools" | |
| 3 | +description: "Learn how to work with Continue's configuration system. Understand how to use hub models, rules, and tools, create local configurations, and organize your setup for maximum reusability." | |
| 4 | +--- | |
| 5 | + | |
| 6 | +## What Are Models, Rules, and Tools? | |
| 7 | + | |
| 8 | +Continue agents are built from three main types of configuration: | |
| 9 | + | |
| 10 | +<Columns cols={3}> | |
| 11 | +<Card title="Models" icon="cube"> | |
| 12 | +Language models that power different capabilities like chat, autocomplete, and agent mode | |
| 13 | +</Card> | |
| 14 | + | |
| 15 | +<Card title="Rules" icon="pencil"> | |
| 16 | + Guidelines and instructions that shape how the AI behaves and responds | |
| 17 | +</Card> | |
| 18 | + | |
| 19 | +<Card title="Tools" icon="server"> | |
| 20 | +MCP tools that provide additional capabilities like database access, web search, or custom functions | |
| 21 | +</Card> | |
| 22 | +</Columns> | |
| 23 | + | |
| 24 | +There are two places where you can define these configurations: | |
| 25 | + | |
| 26 | +<Columns cols={2}> | |
| 27 | +<Card title="Local" icon="computer"> | |
| 28 | +Custom configurations you create and manage in your workspace or globally | |
| 29 | +</Card> | |
| 30 | + | |
| 31 | +<Card title="Hub" icon="cloud"> | |
| 32 | +Pre-built models, rules, and tools from the Continue community that you can import and use immediately | |
| 33 | +</Card> | |
| 34 | +</Columns> | |
| 35 | + | |
| 36 | +## Local | |
| 37 | + | |
| 38 | +Local configurations let you create custom models, rules, and tools that automatically apply to multiple agents, reducing duplication and ensuring consistency across your setup. | |
| 39 | + | |
| 40 | +<Columns cols={2}> | |
| 41 | +<Card title="Global" icon="globe"> | |
| 42 | +Applied to all agents across all workspaces. Ideal for personal preferences, universal coding standards, or tools you use everywhere. | |
| 43 | +</Card> | |
| 44 | +<Card title="Workspace" icon="folder-open"> | |
| 45 | +Applied automatically to all agents when working in a specific project. | |
| 46 | + | |
| 47 | +Perfect for project-specific setups like TypeScript rules for web apps or the Playwright MCP tool. | |
| 48 | + | |
| 49 | +</Card> | |
| 50 | + | |
| 51 | +</Columns> | |
| 52 | + | |
| 53 | +## Hub | |
| 54 | + | |
| 55 | +Continue hub uses a slug in the format of `owner/item-name` to resolve blocks. | |
| 56 | + | |
| 57 | +For example, to use the [Claude 4 Sonnet model](https://hub.continue.dev/anthropic/claude-4-sonnet), you'd reference it as `anthropic/claude-4-sonnet`. | |
| 58 | + | |
| 59 | +Import from the hub using the `uses` syntax alongside your custom configurations: | |
| 60 | + | |
| 61 | +```yaml config.yaml highlight={6} | |
| 62 | +name: Team Agent | |
| 63 | +version: 1.0.0 | |
| 64 | +schema: v1 | |
| 65 | + | |
| 66 | +models: | |
| 67 | + - uses: anthropic/claude-4-sonnet | |
| 68 | + with: | |
| 69 | + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # Use a hub secret | |
| 70 | +``` | |
| 71 | + | |
| 72 | +### Organization | |
| 73 | + | |
| 74 | +Organize your local configurations using these directories: | |
| 75 | + | |
| 76 | +<Columns cols={3}> | |
| 77 | +<Card title="Models" icon="cube"> | |
| 78 | + `.continue/models` | |
| 79 | +</Card> | |
| 80 | + | |
| 81 | +<Card title="Rules" icon="pencil"> | |
| 82 | + `.continue/rules` | |
| 83 | +</Card> | |
| 84 | + | |
| 85 | +<Card title="Tools" icon="server"> | |
| 86 | + `.continue/mcpServers` | |
| 87 | +</Card> | |
| 88 | +</Columns> | |
| 89 | + | |
| 90 | +## Working with Secrets | |
| 91 | + | |
| 92 | +Models, and many MCP servers, require a secret for things like API keys. | |
| 93 | + | |
| 94 | +On the hub, you can configure secrets when adding a model or MCP server. | |
| 95 | + | |
| 96 | +This will use mustache notation to pass the secret, eg `${{ secrets.SECRET_NAME }}` | |
| 97 | + | |
| 98 | +When configuring a local model or MCP server, you can use the same mustache notation for secrets which read from: | |
| 99 | + | |
| 100 | +<Columns cols={2}> | |
| 101 | +<Card title="Global" icon="globe"> | |
| 102 | +`.env` file in `~/.continue/.env` | |
| 103 | +</Card> | |
| 104 | + | |
| 105 | +<Card title="Workspace" icon="folder-open"> | |
| 106 | +`.env` file at your project root | |
| 107 | +</Card> | |
| 108 | +</Columns> | |
| 109 | + | |
| 110 | +## Overriding Properties | |
| 111 | + | |
| 112 | +You can directly override properties using the `override` syntax: | |
| 113 | + | |
| 114 | +```yaml title="config.yaml" highlight={10-13} | |
| 115 | +name: myprofile/custom-agent | |
| 116 | +version: 1.0.0 | |
| 117 | +schema: v1 | |
| 118 | + | |
| 119 | +models: | |
| 120 | + - uses: myprofile/custom-model | |
| 121 | + with: | |
| 122 | + ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} | |
| 123 | + TEMP: 0.9 | |
| 124 | + override: | |
| 125 | + roles: | |
| 126 | + - chat | |
| 127 | +``` | |
| 128 | + | |
| 129 | +## Advanced | |
| 130 | + | |
| 131 | +### Inputs | |
| 132 | + | |
| 133 | +Models and MCP server authors can configure inputs that require the user to provide a secret value by defining a `${{ inputs.SECRET_NAME }}` value. | |
| 134 | + | |
| 135 | +For example, here is how you could require that the user provide a value for the `apiKey` property on a model: | |
| 136 | + | |
| 137 | +```yaml title="config.yaml" highlight={8} | |
| 138 | +name: myprofile/custom-model | |
| 139 | +version: 1.0.0 | |
| 140 | +schema: v1 | |
| 141 | + | |
| 142 | +models: | |
| 143 | + - name: My Favorite Model | |
| 144 | + # ... other model properties ... | |
| 145 | + apiKey: ${{ inputs.SECRET_NAME }} | |
| 146 | +``` | |
| 147 | + | |
| 148 | +Users then map their secret to this input using a `${{ secrets.SECRET_NAME }}` value that maps to a property name which matches the required input, e.g. `SECRET_NAME`. | |
| 149 | + | |
| 150 | +```yaml title="config.yaml" highlight={8} | |
| 151 | +name: myprofile/custom-agent | |
| 152 | +version: 1.0.0 | |
| 153 | +schema: v1 | |
| 154 | + | |
| 155 | +models: | |
| 156 | + - uses: myprofile/custom-model | |
| 157 | + with: | |
| 158 | + SECRET_NAME: ${{ secrets.SECRET_NAME }} | |
| 159 | +``` | |
| 160 | + | |
| 161 | +## Next Steps | |
| 162 | + | |
| 163 | +Now that you understand how models, rules, and tools work, explore: | |
| 164 | + | |
| 165 | +- **[Config Reference](/reference)**: Detailed documentation of all available properties | |
| 166 | +- **[Continue Hub](https://hub.continue.dev)**: Browse community models, rules, and tools | |
| 167 | +- **[Custom Context Providers](/customize/deep-dives/custom-providers)**: Create advanced context integrations | |
| 168 | +- **[Model Roles](/customize/model-roles/intro)**: Understanding how different models work together |
modified docs/reference.mdx +17 −124
| @@ -1,136 +1,23 @@ | ||
| 1 | 1 | --- |
| 2 | 2 | title: "config.yaml Reference" |
| 3 | -description: "Comprehensive guide to the config.yaml format used by Continue.dev for building custom coding agents. Learn how to define models, context providers, rules, prompts, and more using reusable blocks and YAML configuration." | |
| 3 | +description: "Comprehensive guide to the config.yaml format used by Continue.dev for building custom coding agents. Learn how to define models, context providers, rules, prompts, and more using YAML configuration." | |
| 4 | 4 | --- |
| 5 | 5 | |
| 6 | 6 | ## Introduction |
| 7 | 7 | |
| 8 | -Continue hub agents are defined using the `config.yaml` specification. Agents can be loaded from [the Hub](https://hub.continue.dev/explore/agents) or locally | |
| 8 | +Continue Agents are defined using the `config.yaml` specification. | |
| 9 | 9 | |
| 10 | -- [Continue Hub](https://hub.continue.dev/explore/agents) - YAML is stored on the hub and automatically synced to the extension | |
| 10 | +**Agents** are composed of models, rules, and tools (MCP servers). | |
| 11 | 11 | |
| 12 | -- Locally | |
| 13 | - - in your global `.continue` folder (`~/.continue` on Mac, `%USERPROFILE%\.continue`) within `.continue/agents`. The name of the file will be used as the display name of the agent, e.g. `My Agent.yaml` | |
| 14 | - - in your workspace in a `/.continue/agents` folder, with the same naming convention | |
| 12 | +<Columns cols={2}> | |
| 13 | +<Card title="Configuring Models, Rules, and Tools" icon="cube" href="/guides/configuring-models-rules-tools"> | |
| 14 | +Learn how to work with Continue's configuration system, including using hub models, rules, and tools, creating local configurations, and organizing your setup. | |
| 15 | +</Card> | |
| 15 | 16 | |
| 16 | -<Info> | |
| 17 | - Config YAML replaces `config.json`, which is deprecated. View the **[Migration | |
| 18 | - Guide](/reference/yaml-migration)**. | |
| 19 | -</Info> | |
| 20 | - | |
| 21 | -An agent is made up of: | |
| 22 | - | |
| 23 | -1. **Top level properties**, which specify the `name`, `version`, and `config.yaml` `schema` for the agent | |
| 24 | -2. **Block lists**, which are composable arrays of coding agent building blocks available to the agent, such as models, docs, and context providers. | |
| 25 | - | |
| 26 | -A block is a single standalone building block of a coding agents, e.g., one model or one documentation source. In `config.yaml` syntax, a block consists of the same top-level properties as agents (`name`, `version`, and `schema`), but only has **ONE** item under whichever block type it is. | |
| 27 | - | |
| 28 | -Examples of blocks and agents can be found on the [Continue Hub](https://hub.continue.dev). | |
| 29 | - | |
| 30 | -Agents can either explicitly define blocks - see [Properties](#properties) below - or import and configure existing hub blocks. | |
| 31 | - | |
| 32 | -### Using Blocks | |
| 33 | - | |
| 34 | -Hub blocks and agents are identified with a slug in the format `owner-slug/block-or-agent-slug`, where an owner can be a user or organization (For example, if you want to use the [OpenAI 4o Model block](https://hub.continue.dev/openai/gpt-4o), your slug would be `openai/gpt-4o`). These blocks are pulled from [https://hub.continue.dev](https://hub.continue.dev). | |
| 35 | - | |
| 36 | -Blocks can be imported into an agent by adding a `uses` clause under the block type. This can be alongside other `uses` clauses or explicit blocks of that type. | |
| 37 | - | |
| 38 | -For example, the following agent imports an Anthropic model and defines an Ollama DeepSeek one. | |
| 39 | - | |
| 40 | -Agent models section | |
| 41 | - | |
| 42 | -```yaml | |
| 43 | -name: Team Agent | |
| 44 | -version: 1.0.0 | |
| 45 | -schema: v1 | |
| 46 | - | |
| 47 | -models: | |
| 48 | - - uses: anthropic/claude-3.5-sonnet # an imported model block | |
| 49 | - - model: deepseek-reasoner # an explicit model block | |
| 50 | - provider: ollama | |
| 51 | -``` | |
| 52 | - | |
| 53 | -### Local Blocks | |
| 54 | - | |
| 55 | -It is also possible to define blocks locally in a `.continue` folder. This folder can be located at either the root of your workspace (these will automatically be applied to all agents when you are in that workspace) or in your home directory at `~/.continue` (these will automatically be applied globally). | |
| 56 | - | |
| 57 | -Place your YAML files in the following folders: | |
| 58 | - | |
| 59 | -Agents: | |
| 60 | - | |
| 61 | -- `.continue/agents` - for agents | |
| 62 | - | |
| 63 | -Blocks: | |
| 64 | - | |
| 65 | -- `.continue/rules` - for rules | |
| 66 | -- `.continue/models` - for models | |
| 67 | -- `.continue/prompts` - for prompts | |
| 68 | -- `.continue/context` - for context providers | |
| 69 | -- `.continue/docs` - for docs | |
| 70 | -- `.continue/data` - for data | |
| 71 | -- `.continue/mcpServers` - for MCP Servers | |
| 72 | - | |
| 73 | -You can find many examples of each of these block types on the [Continue Explore Page](https://hub.continue.dev/explore/models) | |
| 74 | - | |
| 75 | -<Info> | |
| 76 | -Local blocks utilizing mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) can read secret values: | |
| 77 | - | |
| 78 | -- globally, from a `.env` located in the global `.continue` folder (`~/.continue/.env`) | |
| 79 | -- per-workspace, from a `.env` file located at the root of the current workspace. | |
| 80 | - | |
| 81 | -</Info> | |
| 82 | - | |
| 83 | -### Inputs | |
| 84 | - | |
| 85 | -Blocks can be passed user inputs, including hub secrets and raw text values. To create a block that has an input, use mustache templating as follows: | |
| 86 | - | |
| 87 | -```yaml title="config.yaml" | |
| 88 | -name: myprofile/custom-model | |
| 89 | -version: 1.0.0 | |
| 90 | -schema: v1 | |
| 91 | - | |
| 92 | -models: | |
| 93 | - - name: My Favorite Model | |
| 94 | - provider: anthropic | |
| 95 | - apiKey: ${{ inputs.ANTHROPIC_API_KEY }} | |
| 96 | - defaultCompletionOptions: | |
| 97 | - temperature: ${{ inputs.TEMP }} | |
| 98 | -``` | |
| 99 | - | |
| 100 | -Which can then be imported like this: | |
| 101 | - | |
| 102 | -```yaml title="config.yaml" | |
| 103 | -name: myprofile/custom-agent | |
| 104 | -version: 1.0.0 | |
| 105 | -schema: v1 | |
| 106 | - | |
| 107 | -models: | |
| 108 | - - uses: myprofile/custom-model | |
| 109 | - with: | |
| 110 | - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} | |
| 111 | - TEMP: 0.9 | |
| 112 | -``` | |
| 113 | - | |
| 114 | -Note that hub secrets can be passed as inputs, using a similar mustache format: `secrets.SECRET_NAME`. | |
| 115 | - | |
| 116 | -### Overrides | |
| 117 | - | |
| 118 | -Block properties can be also be directly overriden using `override`. For example: | |
| 119 | - | |
| 120 | -```yaml title="config.yaml" | |
| 121 | -name: myprofile/custom-agent | |
| 122 | -version: 1.0.0 | |
| 123 | -schema: v1 | |
| 124 | - | |
| 125 | -models: | |
| 126 | - - uses: myprofile/custom-model | |
| 127 | - with: | |
| 128 | - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} | |
| 129 | - TEMP: 0.9 | |
| 130 | - override: | |
| 131 | - roles: | |
| 132 | - - chat | |
| 133 | -``` | |
| 17 | +<Card title="Understanding Agents" icon="robot" href="/guides/understanding-agents"> | |
| 18 | +Learn how to build and configure agents, understand their capabilities, and customize them for your development workflow. | |
| 19 | +</Card> | |
| 20 | +</Columns> | |
| 134 | 21 | |
| 135 | 22 | ## Properties |
| 136 | 23 | |
| @@ -566,3 +453,9 @@ | ||
| 566 | 453 | maxPromptTokens: 1024 |
| 567 | 454 | onlyMyCode: true |
| 568 | 455 | ``` |
| 456 | + | |
| 457 | +--- | |
| 458 | + | |
| 459 | +## `config.json` Deprecation | |
| 460 | + | |
| 461 | +`config.yaml `replaces `config.json`, which is deprecated. View the **[Migration Guide](/reference/yaml-migration)** for help transitioning from the old format. |