Changesets · Branches · Tags · Compare
| Changeset | 1e17c9d83ac6d3afb7a0f7f3311c040e09a2c2b8954c2da6e6d606ec7433d0f5 |
|---|---|
| Author | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-09-22 16:22 -07:00 |
| Committer | Patrick Erichsen <patrick.a.erichsen@gmail.com> · 2025-09-22 16:22 -07:00 |
| Parents | ef09f277c07a |
3 files changed
modified docs/docs.json +1 −1
| @@ -230,7 +230,7 @@ | ||
| 230 | 230 | "pages": [ |
| 231 | 231 | "guides/overview", |
| 232 | 232 | "guides/understanding-agents", |
| 233 | - "guides/understanding-models-rules-tools", | |
| 233 | + "guides/configuring-models-rules-tools", | |
| 234 | 234 | "guides/codebase-documentation-awareness", |
| 235 | 235 | "guides/cli", |
| 236 | 236 | "guides/continuous-ai", |
added docs/guides/configuring-models-rules-tools.mdx +160 −0
| @@ -0,0 +1,160 @@ | ||
| 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 | +### Organization | |
| 54 | + | |
| 55 | +Organize your local configurations using these directories: | |
| 56 | + | |
| 57 | +<Columns cols={3}> | |
| 58 | +<Card title="Models" icon="cube"> | |
| 59 | + `.continue/models` | |
| 60 | +</Card> | |
| 61 | + | |
| 62 | +<Card title="Rules" icon="pencil"> | |
| 63 | + `.continue/rules` | |
| 64 | +</Card> | |
| 65 | + | |
| 66 | +<Card title="Tools" icon="server"> | |
| 67 | + `.continue/mcpServers` | |
| 68 | +</Card> | |
| 69 | +</Columns> | |
| 70 | + | |
| 71 | +## Working with Secrets | |
| 72 | + | |
| 73 | +Local configurations can use mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) which read from: | |
| 74 | + | |
| 75 | +<Columns cols={2}> | |
| 76 | +<Card title="Global" icon="globe"> | |
| 77 | +`.env` file in `~/.continue/.env` | |
| 78 | +</Card> | |
| 79 | + | |
| 80 | +<Card title="Workspace" icon="folder-open"> | |
| 81 | +`.env` file at your project root | |
| 82 | +</Card> | |
| 83 | +</Columns> | |
| 84 | + | |
| 85 | +## Inputs and Customization | |
| 86 | + | |
| 87 | +Configurations can accept user inputs for customization by defining an `${{ inputs.SECRET_NAME }}` value. | |
| 88 | + | |
| 89 | +For example, here is how you could require that the user provide a value for the `apiKey` property on a model: | |
| 90 | + | |
| 91 | +```yaml title="config.yaml" highlight={8} | |
| 92 | +name: myprofile/custom-model | |
| 93 | +version: 1.0.0 | |
| 94 | +schema: v1 | |
| 95 | + | |
| 96 | +models: | |
| 97 | + - name: My Favorite Model | |
| 98 | + # ... other model properties ... | |
| 99 | + apiKey: ${{ inputs.SECRET_NAME }} | |
| 100 | +``` | |
| 101 | + | |
| 102 | +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`. Note that on the hub, this mapping is created automatically for you. | |
| 103 | + | |
| 104 | +```yaml title="config.yaml" highlight={8} | |
| 105 | +name: myprofile/custom-agent | |
| 106 | +version: 1.0.0 | |
| 107 | +schema: v1 | |
| 108 | + | |
| 109 | +models: | |
| 110 | + - uses: myprofile/custom-model | |
| 111 | + with: | |
| 112 | + SECRET_NAME: ${{ secrets.SECRET_NAME }} | |
| 113 | +``` | |
| 114 | + | |
| 115 | +Note that hub secrets can be passed as inputs using the mustache format: `${{ secrets.SECRET_NAME }}`. | |
| 116 | + | |
| 117 | +## Hub | |
| 118 | + | |
| 119 | +Hub items are identified by slugs in the format `owner/item-name`. 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`. | |
| 120 | + | |
| 121 | +Import from the hub using the `uses` syntax alongside your custom configurations: | |
| 122 | + | |
| 123 | +```yaml config.yaml highlight={6} | |
| 124 | +name: Team Agent | |
| 125 | +version: 1.0.0 | |
| 126 | +schema: v1 | |
| 127 | + | |
| 128 | +models: | |
| 129 | + - uses: anthropic/claude-4-sonnet | |
| 130 | + with: | |
| 131 | + ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # Use a hub secret | |
| 132 | +``` | |
| 133 | + | |
| 134 | +## Overriding Properties | |
| 135 | + | |
| 136 | +You can directly override properties using the `override` syntax: | |
| 137 | + | |
| 138 | +```yaml title="config.yaml" highlight={10-13} | |
| 139 | +name: myprofile/custom-agent | |
| 140 | +version: 1.0.0 | |
| 141 | +schema: v1 | |
| 142 | + | |
| 143 | +models: | |
| 144 | + - uses: myprofile/custom-model | |
| 145 | + with: | |
| 146 | + ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} | |
| 147 | + TEMP: 0.9 | |
| 148 | + override: | |
| 149 | + roles: | |
| 150 | + - chat | |
| 151 | +``` | |
| 152 | + | |
| 153 | +## Next Steps | |
| 154 | + | |
| 155 | +Now that you understand how models, rules, and tools work, explore: | |
| 156 | + | |
| 157 | +- **[Config Reference](/reference)**: Detailed documentation of all available properties | |
| 158 | +- **[Continue Hub](https://hub.continue.dev)**: Browse community models, rules, and tools | |
| 159 | +- **[Custom Context Providers](/customize/deep-dives/custom-providers)**: Create advanced context integrations | |
| 160 | +- **[Model Roles](/customize/model-roles/intro)**: Understanding how different models work together |
deleted docs/guides/understanding-models-rules-tools.mdx +0 −160
| @@ -1,160 +0,0 @@ | ||
| 1 | ---- | |
| 2 | -title: "Understanding 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="Hub" icon="cloud"> | |
| 28 | -Pre-built models, rules, and tools from the Continue community that you can import and use immediately | |
| 29 | -</Card> | |
| 30 | - | |
| 31 | -<Card title="Local" icon="computer"> | |
| 32 | -Custom configurations you create and manage in your workspace or globally | |
| 33 | -</Card> | |
| 34 | -</Columns> | |
| 35 | - | |
| 36 | -## Hub | |
| 37 | - | |
| 38 | -Hub items are identified by slugs in the format `owner/item-name`. 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`. | |
| 39 | - | |
| 40 | -Import from the hub using the `uses` syntax alongside your custom configurations: | |
| 41 | - | |
| 42 | -```yaml config.yaml highlight={6} | |
| 43 | -name: Team Agent | |
| 44 | -version: 1.0.0 | |
| 45 | -schema: v1 | |
| 46 | - | |
| 47 | -models: | |
| 48 | - - uses: anthropic/claude-4-sonnet | |
| 49 | - with: | |
| 50 | - ANTHROPIC_API_KEY: ${{ secrets.ANTHROPIC_API_KEY }} # Use a hub secret | |
| 51 | -``` | |
| 52 | - | |
| 53 | -## Local | |
| 54 | - | |
| 55 | -Local configurations let you create custom models, rules, and tools that automatically apply to multiple agents, reducing duplication and ensuring consistency across your setup. | |
| 56 | - | |
| 57 | -<Columns cols={2}> | |
| 58 | -<Card title="Global" icon="globe"> | |
| 59 | -Applied to all agents across all workspaces. Ideal for personal preferences, universal coding standards, or tools you use everywhere. | |
| 60 | -</Card> | |
| 61 | -<Card title="Workspace" icon="folder-open"> | |
| 62 | -Applied automatically to all agents when working in a specific project. | |
| 63 | - | |
| 64 | -Perfect for project-specific setups like TypeScript rules for web apps or the Playwright MCP tool. | |
| 65 | - | |
| 66 | -</Card> | |
| 67 | - | |
| 68 | -</Columns> | |
| 69 | - | |
| 70 | -### Organization | |
| 71 | - | |
| 72 | -Organize your local configurations using these directories: | |
| 73 | - | |
| 74 | -<Columns cols={3}> | |
| 75 | -<Card title="Models" icon="cube"> | |
| 76 | - `.continue/models` | |
| 77 | -</Card> | |
| 78 | - | |
| 79 | -<Card title="Rules" icon="pencil"> | |
| 80 | - `.continue/rules` | |
| 81 | -</Card> | |
| 82 | - | |
| 83 | -<Card title="Tools" icon="server"> | |
| 84 | - `.continue/mcpServers` | |
| 85 | -</Card> | |
| 86 | -</Columns> | |
| 87 | - | |
| 88 | -## Working with Secrets | |
| 89 | - | |
| 90 | -Local configurations can use mustache notation for secrets (`${{ secrets.SECRET_NAME }}`) which read from: | |
| 91 | - | |
| 92 | -<Columns cols={2}> | |
| 93 | -<Card title="Global" icon="globe"> | |
| 94 | -`.env` file in `~/.continue/.env` | |
| 95 | -</Card> | |
| 96 | - | |
| 97 | -<Card title="Workspace" icon="folder-open"> | |
| 98 | -`.env` file at your project root | |
| 99 | -</Card> | |
| 100 | -</Columns> | |
| 101 | - | |
| 102 | -## Inputs and Customization | |
| 103 | - | |
| 104 | -Configurations can accept user inputs for customization by defining an `${{ inputs.SECRET_NAME }}` value. | |
| 105 | - | |
| 106 | -For example, here is how you could require that the user provide a value for the `apiKey` property on a model: | |
| 107 | - | |
| 108 | -```yaml title="config.yaml" highlight={8} | |
| 109 | -name: myprofile/custom-model | |
| 110 | -version: 1.0.0 | |
| 111 | -schema: v1 | |
| 112 | - | |
| 113 | -models: | |
| 114 | - - name: My Favorite Model | |
| 115 | - # ... other model properties ... | |
| 116 | - apiKey: ${{ inputs.SECRET_NAME }} | |
| 117 | -``` | |
| 118 | - | |
| 119 | -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`. Note that on the hub, this mapping is created automatically for you. | |
| 120 | - | |
| 121 | -```yaml title="config.yaml" highlight={8} | |
| 122 | -name: myprofile/custom-agent | |
| 123 | -version: 1.0.0 | |
| 124 | -schema: v1 | |
| 125 | - | |
| 126 | -models: | |
| 127 | - - uses: myprofile/custom-model | |
| 128 | - with: | |
| 129 | - SECRET_NAME: ${{ secrets.SECRET_NAME }} | |
| 130 | -``` | |
| 131 | - | |
| 132 | -Note that hub secrets can be passed as inputs using the mustache format: `${{ secrets.SECRET_NAME }}`. | |
| 133 | - | |
| 134 | -## Overriding Properties | |
| 135 | - | |
| 136 | -You can directly override properties using the `override` syntax: | |
| 137 | - | |
| 138 | -```yaml title="config.yaml" highlight={10-13} | |
| 139 | -name: myprofile/custom-agent | |
| 140 | -version: 1.0.0 | |
| 141 | -schema: v1 | |
| 142 | - | |
| 143 | -models: | |
| 144 | - - uses: myprofile/custom-model | |
| 145 | - with: | |
| 146 | - ANTHROPIC_API_KEY: ${{ secrets.MY_ANTHROPIC_API_KEY }} | |
| 147 | - TEMP: 0.9 | |
| 148 | - override: | |
| 149 | - roles: | |
| 150 | - - chat | |
| 151 | -``` | |
| 152 | - | |
| 153 | -## Next Steps | |
| 154 | - | |
| 155 | -Now that you understand how models, rules, and tools work, explore: | |
| 156 | - | |
| 157 | -- **[Config Reference](/reference)**: Detailed documentation of all available properties | |
| 158 | -- **[Continue Hub](https://hub.continue.dev)**: Browse community models, rules, and tools | |
| 159 | -- **[Custom Context Providers](/customize/deep-dives/custom-providers)**: Create advanced context integrations | |
| 160 | -- **[Model Roles](/customize/model-roles/overview)**: Understanding how different models work together |