| 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 |