Using prebuilt templates and creating custom message workflows
Prerequisite: Ensure you’ve completed the Quickstart and have your API keys configured.
The Cloud Coding API offers two powerful approaches to automate your development workflow:
Ready-to-use templates for common development tasks. Perfect for quick automation without configuration.
Script your AI agent’s exact behavior with custom conversation flows, tool selection, and workflow control.
The fastest way to get started is with our prebuilt templates. These are battle-tested workflows for common development tasks.
Template ID: a2ef2e64-40e2-4c6a-99fc-767e3a30a963
This template breaks down complex tasks into manageable steps by first creating a detailed plan, then executing it systematically.
Category | Use Cases | Examples |
---|---|---|
Planning & Analysis | Code review, architecture planning | Plan & Execute, Code Audit |
Feature Development | Adding new functionality | Component Creation, API Development |
Code Quality | Testing, documentation, refactoring | Test Generation, Doc Writing |
DevOps & Deployment | CI/CD, containerization | Docker Setup, Pipeline Creation |
Browse all available templates in the Templates Library or use our Plan and Execute template for most complex tasks.
When you need complete control over the AI agent’s behavior, custom messages let you script exact workflows.
Each message in the messages
array supports these fields:
Field | Type | Required | Description |
---|---|---|---|
content | string | ✅ Yes | The instruction/prompt for the AI agent |
tools | string/array | ❌ No | Available tools: "all" or specific tool names |
continueConversation | boolean | ❌ No | Continue previous conversation context |
workingDir | string | ❌ No | Custom working directory for this message |
Perfect for focused development tasks:
Chain related tasks with conversation continuity:
Control exactly which tools are used:
Critical Limitation: You cannot change workingDir
and use continueConversation: true
in the same request. Each directory change requires a separate API call with a fresh conversation.
Work across different parts of your repository using separate API calls:
You can control which tools the AI agent uses:
Tool Category | Examples | Use Cases |
---|---|---|
File Operations | Read , Edit , Write , MultiEdit | Code modification and creation |
Navigation | LS , Glob , Grep | Project exploration and search |
Execution | Bash | Running tests, builds, commands |
Planning | Task | Breaking down complex work |
External | WebFetch , WebSearch | Research and documentation |
All Tools | "all" | Full capabilities (recommended) |
The workingDir
field allows you to focus the AI agent on specific parts of your repository:
Important Limitation: When changing the workingDir
, you cannot use continueConversation: true
. Each directory change requires starting a fresh conversation. The AI agent gets mounted to the specified directory and cannot maintain context across different working directories.
Common Use Cases:
Correct Usage Pattern:
The API returns Server-Sent Events (SSE) with these event types:
{"auth": "Authenticated Successfully!"}
Recommended: Start with the Plan and Execute template (a2ef2e64-40e2-4c6a-99fc-767e3a30a963
) for complex tasks.
a2ef2e64-40e2-4c6a-99fc-767e3a30a963
for your first complex taskParameter | Description | Example |
---|---|---|
repo_url | GitHub repository URL | "https://github.com/user/repo" |
github_token | GitHub access token | "ghp_xxxxxxxxxxxx" |
branch | Target branch | "main" or "feature/new-component" |
haiku | Model selection | true (fast) or false (powerful) |
"haiku": true
): Fast, cost-effective for simple tasks"haiku": false
): More powerful for complex reasoning and large codebasesStart with the Plan and Execute template (a2ef2e64-40e2-4c6a-99fc-767e3a30a963
) for your first complex task. It breaks down work into manageable steps automatically.
Using prebuilt templates and creating custom message workflows
Prerequisite: Ensure you’ve completed the Quickstart and have your API keys configured.
The Cloud Coding API offers two powerful approaches to automate your development workflow:
Ready-to-use templates for common development tasks. Perfect for quick automation without configuration.
Script your AI agent’s exact behavior with custom conversation flows, tool selection, and workflow control.
The fastest way to get started is with our prebuilt templates. These are battle-tested workflows for common development tasks.
Template ID: a2ef2e64-40e2-4c6a-99fc-767e3a30a963
This template breaks down complex tasks into manageable steps by first creating a detailed plan, then executing it systematically.
Category | Use Cases | Examples |
---|---|---|
Planning & Analysis | Code review, architecture planning | Plan & Execute, Code Audit |
Feature Development | Adding new functionality | Component Creation, API Development |
Code Quality | Testing, documentation, refactoring | Test Generation, Doc Writing |
DevOps & Deployment | CI/CD, containerization | Docker Setup, Pipeline Creation |
Browse all available templates in the Templates Library or use our Plan and Execute template for most complex tasks.
When you need complete control over the AI agent’s behavior, custom messages let you script exact workflows.
Each message in the messages
array supports these fields:
Field | Type | Required | Description |
---|---|---|---|
content | string | ✅ Yes | The instruction/prompt for the AI agent |
tools | string/array | ❌ No | Available tools: "all" or specific tool names |
continueConversation | boolean | ❌ No | Continue previous conversation context |
workingDir | string | ❌ No | Custom working directory for this message |
Perfect for focused development tasks:
Chain related tasks with conversation continuity:
Control exactly which tools are used:
Critical Limitation: You cannot change workingDir
and use continueConversation: true
in the same request. Each directory change requires a separate API call with a fresh conversation.
Work across different parts of your repository using separate API calls:
You can control which tools the AI agent uses:
Tool Category | Examples | Use Cases |
---|---|---|
File Operations | Read , Edit , Write , MultiEdit | Code modification and creation |
Navigation | LS , Glob , Grep | Project exploration and search |
Execution | Bash | Running tests, builds, commands |
Planning | Task | Breaking down complex work |
External | WebFetch , WebSearch | Research and documentation |
All Tools | "all" | Full capabilities (recommended) |
The workingDir
field allows you to focus the AI agent on specific parts of your repository:
Important Limitation: When changing the workingDir
, you cannot use continueConversation: true
. Each directory change requires starting a fresh conversation. The AI agent gets mounted to the specified directory and cannot maintain context across different working directories.
Common Use Cases:
Correct Usage Pattern:
The API returns Server-Sent Events (SSE) with these event types:
{"auth": "Authenticated Successfully!"}
Recommended: Start with the Plan and Execute template (a2ef2e64-40e2-4c6a-99fc-767e3a30a963
) for complex tasks.
a2ef2e64-40e2-4c6a-99fc-767e3a30a963
for your first complex taskParameter | Description | Example |
---|---|---|
repo_url | GitHub repository URL | "https://github.com/user/repo" |
github_token | GitHub access token | "ghp_xxxxxxxxxxxx" |
branch | Target branch | "main" or "feature/new-component" |
haiku | Model selection | true (fast) or false (powerful) |
"haiku": true
): Fast, cost-effective for simple tasks"haiku": false
): More powerful for complex reasoning and large codebasesStart with the Plan and Execute template (a2ef2e64-40e2-4c6a-99fc-767e3a30a963
) for your first complex task. It breaks down work into manageable steps automatically.