Examples
Plan Then Execute
How to use Cloud Code SDK for a two-step AI coding workflow: planning and execution.
This example demonstrates how to use the Cloud Code SDK in a two-step workflow:
- Planning phase – The AI analyzes the codebase and creates a detailed plan in a markdown file.
- Execution phase – The AI reads the plan and executes it to accomplish the user’s goal.
This approach is useful for complex tasks that benefit from high-level planning before implementation.
Example: plan_then_excecute.py
Note:
- This example uses architect mode to leverage both a planner and an editor model for the task.
- Make sure to set your
CLOUD_CODE_API_KEY
environment variable before running.