You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
1.**Build the Template**: Click "Build version". This will process your
299
-
template updates. After it finishes building successfully:
300
-
1.**Activate the Template**: Click "Promote Version" on the new version to make
301
-
it the active template version.
302
-
1.**Create a Task**: Click "Create Task".
303
-
1. Once your workspace is running, navigate to the **Tasks** tab in the upper
304
-
left hand corner. Type in a message or coding request like "Help me write a
305
-
HelloWorld application in Python". Click **Run Task** to start the task
306
-
1. The task will open VS Code with Claude Code running in the left sidebar. You
307
-
are now successfully using Coder Tasks with Claude Code!
247
+
Claude Code within a given Workspace. Tasks become available when the Template for a Workspace has the `coder_ai_task` resource and `coder_parameter` named `AI Prompt` defined in its source code.
248
+
In other words, any existing template can become a Task template by adding in that
249
+
resource and parameter.
250
+
251
+
Coder maintains the [Tasks on Docker](https://registry.coder.com/templates/coder-labs/tasks-docker?_gl=1*19yewmn*_gcl_au*MTc0MzUwMTQ2NC4xNzU2MzA3MDkxLjk3NTM3MjgyNy4xNzU3Njg2NDY2LjE3NTc2ODc0Mzc.*_ga*NzUxMDI1NjIxLjE3NTYzMDcwOTE.*_ga_FTQQJCDWDM*czE3NTc3MDg4MDkkbzQ1JGcxJHQxNzU3NzA4ODE4JGo1MSRsMCRoMA..) template which has Anthropic's Claude Code agent built in with a sample application. Let's try using this template by pulling it from Coder's Registry of public templates, and pushing it to your local server:
252
+
253
+
1.**Push the Template to your Coder Deployment**:
254
+
1. In the upper right hand corner, click **Use this template**
255
+
1. Open a terminal on your machine
256
+
1. Ensure your CLI is authenticated with your Coder deployment by [logging in](https://coder.com/docs/reference/cli/login)
257
+
1. Create an [API Key with Anthropic](https://console.anthropic.com/)
258
+
1. Head to the [Tasks on Docker](https://registry.coder.com/templates/coder-labs/tasks-docker?_gl=1*19yewmn*_gcl_au*MTc0MzUwMTQ2NC4xNzU2MzA3MDkxLjk3NTM3MjgyNy4xNzU3Njg2NDY2LjE3NTc2ODc0Mzc.*_ga*NzUxMDI1NjIxLjE3NTYzMDcwOTE.*_ga_FTQQJCDWDM*czE3NTc3MDg4MDkkbzQ1JGcxJHQxNzU3NzA4ODE4JGo1MSRsMCRoMA..) template
259
+
1. Clone the Coder Registry repo to your local machine
260
+
```hcl
261
+
git clone https://github.com/coder/registry.git
262
+
```
263
+
1. Switch to the template directory
264
+
```hcl
265
+
cd registry/registry/coder-labs/templates/tasks-docker
266
+
```
267
+
1. Push the template to your Coder deployment. Note: this command differs from the registry since we're defining the Anthropic API Key as an environment variable
1. In your Coder Deployment, click **Workspaces** in the upper left hand corner
273
+
1. Click **New workspace** and choose **tasks-docker**
274
+
1. Fill in the Workspace name. Add in an AI Prompt for Claude Code like "Make the background yellow". Click **Create workspace**
275
+
1.**See Tasks in action**
276
+
1. Once your workspace is running, click **View tasks** with your workspace. This will bring you to the Tasks view where you can see Claude Code (left panel), preview the sample application, and interact with the code in code-server. You might need to wait for Claude Code to finish changing the background color of the application.
277
+

278
+
navigate to the **Tasks** tab in the upper
279
+
left hand corner
280
+
1. Try typing in a new request to Claude Code: "make the background red"
281
+
1. Let's exit out of this specific Task view, so we can see all the running tasks
282
+
1. You can start a new task by prompting in the "Prompt your AI agent to start a task" box. You can select which template to run this from, so tasks-docker here, and that will spin up a new Workspace
283
+
284
+
Congratulation! You now have a Coder Task running. This demo has shown you how to spin up a task, and prompt Claude Code to change parts of your application. Learn more specifics about Coder Tasks [here](https://coder.com/docs/ai-coder/tasks).
0 commit comments