Elffuss BraidHub

kikocis/continue public

main · 1.7 KiBRawPermalink
1---
2title: "How to Create a Block"
3sidebarTitle: "Create a Block"
4description: "Learn how to create and remix reusable blocks in Continue Hub for sharing configuration components like models, prompts, and tools with customizable inputs and template variables"
5---
6
7## How to Remix a Block
8
9You should remix a block if you want to use it after some modifications.
10
11By clicking the “remix” button, you’ll be taken to the “Create a remix” page.
12
13![Remix block button](/images/hub/blocks/images/block-remix-button-913beb80672662855acc7013561c78d0.png)
14
15Once here, you’ll be able to 1) edit YAML configuration for the block and 2) change name, description, icon, etc. Clicking “Create block” will make this block available for use in an agent.
16
17## How to Create a Block from Scratch
18
19To create a block from scratch, you will need to click “New block” in the top bar.
20
21![New block button](/images/hub/blocks/images/block-new-button-03d90f6cc9be774c52bdfc4baa5d634e.png)
22
23After filling out information on the block, you will want to create a block following the `config.yaml` [reference documentation](/reference). Refer to examples of blocks on [hub.continue.dev](https://hub.continue.dev/explore/models) and visit the [YAML Reference](/reference#complete-yaml-config-example) docs for more details.
24
25![New block page](/images/hub/blocks/images/block-new-page-2d7faf71739d0f062d555b5d7257fb56.png)
26
27### Block Inputs
28
29Blocks can receive values, including secrets, as inputs through templating. For values that the user of the block needs to set, you can use template variables (e.g. `${{ inputs.API_KEY}}`). Then, the user can set `API_KEY: ${{ secrets.MY_API_KEY }}` in the `with` clause of their agent.