From f135e6e0c4bac7cc73aa900a705247bef4183e05 Mon Sep 17 00:00:00 2001 From: Dallin Romney Date: Fri, 10 Oct 2025 18:47:57 -0700 Subject: [PATCH] docs: workflow docs v2 --- docs/guides/cli.mdx | 20 + .../workflows/creating-workflow-agents.mdx | 359 +++++++++++++++++ .../hub/workflows/editing-workflow-agents.mdx | 364 ++++++++++++++++++ docs/hub/workflows/intro.mdx | 99 ++++- 4 files changed, 826 insertions(+), 16 deletions(-) create mode 100644 docs/hub/workflows/creating-workflow-agents.mdx create mode 100644 docs/hub/workflows/editing-workflow-agents.mdx diff --git a/docs/guides/cli.mdx b/docs/guides/cli.mdx index 4610d6301ef..536bbf821d7 100644 --- a/docs/guides/cli.mdx +++ b/docs/guides/cli.mdx @@ -87,6 +87,26 @@ cn --ask Bash(curl*) cn --exclude Fetch ``` +### Workflow Agents (Beta) + +You can run Continue Hub workflow agents locally using the `--workflow` flag. This is primarily used to iterate on workflows until they are reliable for use in the Hub [Agents interface](../hub/workflows/intro) + +First, [create a workflow agent](../hub/workflows/creating-workflow-agents) in the Hub. Then, you can use it with CLI: + + + + **Headless Mode**: kicks off a workflow locally in headless mode (prints the result) + ```bash + cn -p --workflow myorg/create-ticket-workflow "additional input (optional)" + ``` + + **Interactive Usage**: kicks off a workflow locally with a Terminal User Interface + ```bash + cn --workflow myorg/create-ticket-workflow "additional input (optional)" + ``` + + + ## API Key Authentication For automation in CI or other headless environments, you can use an API key to authenticate with Continue. First, obtain your personal API key [here](https://hub.continue.dev/settings/api-keys). Then, set it as the `CONTINUE_API_KEY` environment variable. You can now use `cn -p` (headless mode) without needing to log in. diff --git a/docs/hub/workflows/creating-workflow-agents.mdx b/docs/hub/workflows/creating-workflow-agents.mdx new file mode 100644 index 00000000000..c06dfbf9a3a --- /dev/null +++ b/docs/hub/workflows/creating-workflow-agents.mdx @@ -0,0 +1,359 @@ +--- +title: "Creating Workflow Agents" +description: "Learn how to create Continuous AI workflow agents in the Continue Hub" +--- + +Continue Hub allows you to create custom workflow configurations that can be reused across different repositories and shared with your team. + +## Workflow Creation Interface + +NEEDS_IMAGE + +Access the workflow creation interface by: + +1. Navigate to the [Continue Hub](https://hub.continue.dev) +2. Click "New Agent" or use the "+ New Workflow" button +3. Choose "Workflow" as the agent type + +## Workflow Configuration + +### Basic Information + + + + **Name**: Display name for your workflow (required) + - Used in the workflow selector dropdown + - Should be descriptive and concise + - Example: "Create Custom Ticket", "Fix TypeScript Errors" + + **Description**: Brief explanation of what the workflow does + - Helps team members understand the workflow's purpose + - Displayed in workflow listings and previews + + **Slug**: URL-friendly identifier (auto-generated) + - Automatically created from the workflow name + - Can be customized if needed + - Must be unique within your organization/account + + + +### Core Configuration + + + + **Prompt** (Required): The main instructions for the AI agent + - This is the core logic of your workflow + - Can include variable placeholders + - Should be specific and actionable + - Example: "Given the following user request, create a GitHub issue with proper labels and assignees" + + **Model**: Specific AI model to use + - Optional - defaults to organization/account settings + - Can specify different models for different workflows + - Choose based on task complexity and requirements + + + +### Advanced Configuration + +#### Tools Integration + + + + Configure which tools your workflow can access: + + **Built-in Tools**: + - File system operations + - Git commands + - Code analysis tools + - Web search capabilities + + **MCP Servers**: Model Context Protocol servers for extended functionality + - Format: `owner/package-name` for all tools from a server + - Format: `owner/package-name:tool-name` for specific tools + - Examples: `continuedev/filesystem`, `anthropic/mcp-server-git:commit` + + **Tool String Format**: + ```yaml + tools: "built_in, owner/mcp-server, owner/server:specific-tool" + ``` + + + +#### Rules and Context + + + + **Rules**: Predefined context and constraints + - Coding standards and style guides + - Organization-specific policies + - Security and compliance requirements + - Format: `owner/rule-name` (e.g., `myorg/typescript-standards`) + + **Rule Benefits**: + - Consistent output across workflows + - Reduced prompt engineering + - Organizational best practices enforcement + + + +### Workflow File Structure + +Workflows are stored as Markdown files with YAML frontmatter: + +```yaml +--- +name: Create Custom Ticket +description: Create a GitHub issue based on user requirements +model: claude-3-5-sonnet-20241022 +tools: built_in, continuedev/github +rules: myorg/ticket-standards, myorg/security-review +--- + +Given the following user request, create a detailed GitHub issue following these guidelines: + +1. **Title**: Create a clear, concise title +2. **Description**: Include comprehensive details +3. **Labels**: Apply appropriate labels based on content +4. **Assignees**: Suggest relevant team members +5. **Priority**: Assess and set priority level + +Always follow the organization's ticket creation standards and ensure all security considerations are addressed. +``` + +## Creation Workflow + +### Step-by-Step Process + + + + 1. **Start with the Sidebar**: Configure basic metadata and settings + 2. **Write the Prompt**: Develop clear, actionable instructions + 3. **Select Tools**: Choose appropriate tools for the task + 4. **Add Rules**: Include relevant organizational rules + 5. **Configure Model**: Select optimal AI model if needed + 6. **Preview**: Use the preview tab to see the final configuration + 7. **Test**: Run the workflow on a test repository + 8. **Publish**: Save and make available to your team + + + +### Form Interface + +NEEDS_IMAGE + +The workflow creation form provides: + + + + + **Configuration Panel**: + - Name and description fields + - Model selector with organization models + - Tools multi-select with MCP integration + - Rules multi-select with validation + - Visibility and permissions settings + + + + + + **Content Editor**: + - Tabbed interface (Markdown/Preview) + - Syntax highlighting + - Real-time preview + - Auto-sync between form fields and markdown + + + + +### Validation and Testing + + + + **Automatic Validation**: + - YAML frontmatter syntax checking + - Required field validation + - Tool reference validation + - Rule slug format verification + + **Testing Recommendations**: + - Test with the [Continue CLI](../../guides/cli) first + - Start with simple, known-working scenarios + - Validate on multiple repository types + - Get team feedback before wide deployment + + + +## Sharing and Collaboration + +### Visibility Options + + + + **Public**: Available to all Continue Hub users + - Discoverable in community workflows + - Can be forked and modified by others + - Good for open-source contributions + + **Organization**: Limited to organization members + - Shared across team members + - Maintains organizational standards + - Can include proprietary logic + + **Private**: Only accessible to you + - Personal workflows and experiments + - Can be promoted to organization later + + + +### Version Management + + + + Workflows support versioning - updates create new versions while maintaining backward compatibility for existing automations. + + + +## Best Practices + +### Prompt Design + + + + **Be Specific**: Include exact requirements and constraints + - Bad: "Fix the bugs" + - Good: "Fix TypeScript compilation errors in the src/ directory, ensuring all type annotations are correct" + + **Include Context**: Provide necessary background information + - Project structure expectations + - Coding standards to follow + - Integration requirements + + **Define Success**: Clearly state what constitutes completion + - Expected outputs + - Quality criteria + - Testing requirements + + + +### Tool Selection + + + + **Principle of Least Privilege**: Only include necessary tools + - Reduces potential for unintended actions + - Improves security posture + - Simplifies troubleshooting + + **Layer Tools Appropriately**: + - Start with built-in tools + - Add specific MCP tools as needed + - Consider tool interactions and dependencies + + + +### Organizational Guidelines + + + + **Naming Conventions**: Establish consistent naming patterns + - Use descriptive, action-oriented names + - Include context about the workflow's purpose + - Follow team/organization naming standards + + **Documentation**: Include comprehensive descriptions + - Document expected inputs and outputs + - Explain any prerequisites or setup requirements + - Provide usage examples + + **Testing Protocol**: Establish testing procedures + - Test on representative repositories + - Validate with different team members + - Monitor performance and adjust as needed + + + +## Troubleshooting + +### Common Issues + + + + + **Symptoms**: Configuration fails to save or load + + **Solutions**: + - Check YAML syntax in the preview tab + - Ensure proper indentation and structure + - Validate special characters are properly escaped + - Use the form interface to avoid syntax errors + + + + + + **Symptoms**: Tools not available during workflow execution + + **Solutions**: + - Verify MCP server slug format (`owner/package`) + - Check tool name spelling and availability + - Ensure proper permissions for MCP servers + - Test with built-in tools first + + + + + + **Symptoms**: Rule references marked as invalid + + **Solutions**: + - Verify rule exists and is accessible + - Check slug format (`owner/rule-name`) + - Ensure proper permissions to referenced rules + - Contact rule owner if access needed + + + + +## Migration and Updates + +### Updating Existing Workflows + + + + **Creating Updates**: + - Edit existing workflows to create new versions + - Previous versions remain available + - Gradual rollout possible + + **Breaking Changes**: + - Test thoroughly before deploying updates + - Communicate changes to team members + - Consider deprecation periods for major changes + + + +### Import/Export + + + + Workflows can be exported as Markdown files for version control, backup, or sharing across different Continue Hub instances. + + + +## After Creation + +Once your workflow is created, you can: + + + + **Test and Refine**: Use your workflow in the agents interface and refine based on results + + **Share with Team**: Make workflows available to organization members + + **Edit and Update**: [Modify workflows](./editing-workflow-agents) as requirements change + + **Monitor Performance**: Track usage and effectiveness over time + + diff --git a/docs/hub/workflows/editing-workflow-agents.mdx b/docs/hub/workflows/editing-workflow-agents.mdx new file mode 100644 index 00000000000..2f977f0e556 --- /dev/null +++ b/docs/hub/workflows/editing-workflow-agents.mdx @@ -0,0 +1,364 @@ +--- +title: "Editing Workflow Agents" +description: "Learn how to edit existing Continuous AI workflow agents in the Continue Hub" +--- + +Once you've created a workflow, you can easily edit and update it through the Continue Hub interface. Editing workflows allows you to refine prompts, update tools and rules, and improve functionality based on usage feedback. + +## Accessing the Edit Interface + +### From the Workflow Page + +NEEDS_IMAGE + +To edit an existing workflow: + +1. Navigate to your workflow's page at `hub.continue.dev/[owner-slug]/[package-slug]` +2. Click the **pencil icon** (edit button) in the workflow header +3. This opens the same form interface used for creating new workflows + + + + You can only edit workflows that you own or have edit permissions for within your organization. + + + +### From the Agents Interface + +You can also access workflow editing directly from the agents interface: + + + + - Select a workflow in the agents interface dropdown + - Click the external link icon next to the workflow selector + - This opens the workflow page in a new tab + - Click the pencil icon to start editing + + + +## Edit Form Interface + +NEEDS_IMAGE + +The workflow edit form is nearly identical to the new workflow creation form, with a few key differences: + +### Pre-populated Fields + + + + All fields are pre-populated with current workflow values: + + - **Name**: Current workflow name + - **Description**: Existing description + - **Prompt**: Current prompt content + - **Model**: Selected model (if any) + - **Tools**: Currently configured tools + - **Rules**: Applied rules + - **Slug**: Package identifier (read-only when editing) + + + +### Form Layout + + + + + **Configuration Panel**: + - Name and description fields + - Model selector + - Tools multi-select + - Rules multi-select + - Visibility settings (if permissions allow) + + + + + + **Content Editor**: + - Markdown/Preview tabs + - Real-time content synchronization + - Syntax highlighting + - Auto-save indicators + + + + +## Making Changes + +### Updating Basic Information + + + + **Name**: Update the display name + - Changes reflect immediately in workflow selectors + - Consider impact on team members who use this workflow + - Clear, descriptive names improve discoverability + + **Description**: Modify the workflow description + - Helps team members understand the workflow's purpose + - Displayed in workflow listings and previews + - Include any usage notes or prerequisites + + + +### Modifying the Prompt + + + + **Refinement Strategies**: + - Add more specific instructions based on usage feedback + - Include examples of desired output formats + - Clarify edge cases or special handling requirements + - Reference project-specific conventions or standards + + **Testing Approach**: + - Test prompt changes with the [Continue CLI](../../guides/cli) first + - Start with small, incremental improvements + - Validate changes against known successful use cases + + + +### Tool and Rule Configuration + + + + **Adding Tools**: + - Include new MCP servers as they become available + - Add specific tools for enhanced functionality + - Format: `owner/package` or `owner/package:tool-name` + + **Updating Rules**: + - Add organizational rules as they're created + - Remove obsolete or conflicting rules + - Ensure rule references are valid and accessible + + **Model Selection**: + - Update to newer or more appropriate models + - Consider performance vs. cost trade-offs + - Test with different models for optimal results + + + +## Version Management + +### Creating New Versions + + + + **Automatic Versioning**: Each edit creates a new version + - Previous versions remain accessible + - Existing workflow executions continue to work + - Gradual rollout to minimize disruption + + **Version Benefits**: + - Rollback capability if issues arise + - A/B testing between versions + - Team can adopt updates at their own pace + + + +### Update Process + +When you save changes: + +1. **Validation**: System validates configuration and references +2. **Version Creation**: New version is created with your changes +3. **Deployment**: Updated workflow becomes the default version +4. **Notification**: Team members see the updated workflow in their interface + + + + Significant prompt changes may affect workflow behavior. Test thoroughly and communicate changes to your team. + + + +## Collaboration and Permissions + +### Edit Permissions + + + + **Workflow Owner**: Full edit access to all aspects + + **Organization Members**: Edit access based on organization settings + - May have restrictions on visibility changes + - Tool and rule access based on organization permissions + + **Collaborators**: Limited edit access if explicitly granted + + + +### Team Considerations + + + + **Communication**: Notify team members of significant changes + - Update internal documentation + - Share reasoning for major prompt modifications + - Provide migration guidance if needed + + **Testing**: Validate changes don't break existing use cases + - Test with representative repositories + - Verify tool integrations still work + - Confirm rule applications are correct + + + +## Best Practices for Editing + +### Incremental Improvements + + + + **Small Changes**: Make incremental improvements rather than major overhauls + - Easier to identify what works and what doesn't + - Reduces risk of breaking existing functionality + - Allows for gradual learning and optimization + + **Document Changes**: Keep track of what you modify and why + - Helps with troubleshooting if issues arise + - Provides context for future improvements + - Useful for team knowledge sharing + + + +### Testing Strategy + + + + **Pre-deployment Testing**: + - Test with Continue CLI in "TUI mode" first + - Use test repositories that mirror production scenarios + - Validate against known successful workflows + + **Post-deployment Monitoring**: + - Monitor workflow execution success rates + - Gather feedback from team members + - Track performance and adjust as needed + + + +### Content Management + + + + **Markdown/Form Sync**: Changes sync between the form interface and markdown editor + - Use the form for structured configuration + - Use markdown editor for complex prompt formatting + - Preview tab shows final rendered content + + **Backup Considerations**: Previous versions serve as backups + - No need to manually backup workflow content + - Can reference previous versions for rollback + - Version history maintains change tracking + + + +## Common Edit Scenarios + +### Adding New Capabilities + + + + + **Adding MCP Tools**: Extend workflow capabilities with new tools + ```yaml + # Before + tools: "built_in, continuedev/filesystem" + + # After + tools: "built_in, continuedev/filesystem, neworg/database-tools" + ``` + + + + + + **Organizational Standards**: Apply new coding standards or policies + ```yaml + # Before + rules: "myorg/basic-standards" + + # After + rules: "myorg/basic-standards, myorg/security-2024, myorg/performance-rules" + ``` + + + + + + **Enhanced Instructions**: Add specificity based on real-world usage + ```markdown + # Before + Create a REST API endpoint for user management. + + # After + Create a REST API endpoint for user management following these requirements: + 1. Use Express.js with TypeScript + 2. Include input validation with Joi + 3. Add comprehensive error handling + 4. Include OpenAPI documentation + 5. Follow the existing authentication patterns + ``` + + + + +## Troubleshooting Edit Issues + +### Common Problems + + + + **Permission Denied**: Verify you have edit access to the workflow + - Check with workflow owner for permissions + - Ensure you're logged into the correct account + - Verify organization membership if applicable + + **Configuration Errors**: Use the preview tab to identify issues + - Check YAML syntax in frontmatter + - Validate tool and rule references + - Ensure required fields are not empty + + **Sync Problems**: If form and markdown get out of sync + - Refresh the page to reload current state + - Use one editing method at a time (form OR markdown) + - Save frequently to prevent data loss + + + +## After Editing + +### Immediate Effects + + + + **Workflow Updates**: Changes are immediately available + - New executions use the updated configuration + - Workflow appears in agents interface with new settings + - Team members see updated prompt and description + + **Testing Window**: Allow time for validation + - Monitor initial executions for issues + - Gather feedback from team members + - Be prepared to make quick fixes if needed + + + +### Long-term Monitoring + + + + **Performance Tracking**: Monitor workflow effectiveness over time + - Success rates of workflow executions + - Team adoption and usage patterns + - Feedback on result quality + + **Continuous Improvement**: Regular review and refinement + - Quarterly review of workflow performance + - Update tools and rules as new options become available + - Refine prompts based on accumulated experience + + + +Editing workflows is an ongoing process that helps you optimize AI assistance for your development workflow. Start with small improvements and gradually refine based on real-world usage and feedback. \ No newline at end of file diff --git a/docs/hub/workflows/intro.mdx b/docs/hub/workflows/intro.mdx index 1c5fd3d5b98..fa1aea6c578 100644 --- a/docs/hub/workflows/intro.mdx +++ b/docs/hub/workflows/intro.mdx @@ -1,10 +1,12 @@ --- -title: "Introduction" -description: "Run Continuous AI workflows in the background" +title: "Workflows - Intro" +description: "Run Continuous AI workflows in the background using the Continue Hub agents interface with GitHub integration and customizable prompts" --- + Workflows are in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051). + Workflows are a way to run and manage background agents in Continue. You can use them for: @@ -15,16 +17,19 @@ Workflows are a way to run and manage background agents in Continue. You can use - Running repeatable tasks with your own rules, prompts, and MCP servers - Much more! -## Quickstart +## Getting Started -To run your first workflow +To run your first workflow: 1. Go to [hub.continue.dev/agents](https://hub.continue.dev/agents) - -![Agent Setup](/images/hub/workflows/images/workflows-setup.png) - -2. Connect with your GitHub account -3. Enter the prompt for your agent +![Workflows Github and Model setup](/images/hub/workflows/images/workflows-onboarding.png) +2. **Connect with your GitHub account** - This is required to enable repository access and branch selection +3. **Set up a model** - You can either provide an Anthropic API key, or follow the instructions to add a different model +![Workflows Interface](/images/hub/workflows/images/workflows-setup.png) +4. **Select a repository** - Choose which codebase the workflow should operate on +5. **Choose a branch** - Pick the specific branch for the workflow to work with +6. **Enter your prompt** - Describe the task you want the AI agent to accomplish +7. **Click the send button** or press enter to kick off your workflow ## Example Workflow Tasks @@ -86,12 +91,74 @@ Here are some example tasks you can try with your workflows: -## How to use background agents -The practice of using background agents, which we call Continuous AI, requires practice and forethought to set up the right guiderails and habits to fit your development workflow, much like learning to work with a larger engineering team. We are constantly sharing our learnings on the [Continuous AI Blog](https://blog.continue.dev), but these few high-level tips are a great way to quickly become successful with workflows: -- Practice first with the [Continue CLI](../../guides/cli) in "TUI mode". The same agent that powers our CLI is used for workflows, so you can easily test your prompts locally. -- Identify and begin with tasks that you are confident can be accomplished by Continue. For example, ask Continue to fix a small bug where you already know the solution is simple. -- Once you have merged a PR created by Continue, be increasingly ambitious with your tasks. By being willing to start tasks that might not succeed on the first try, you will learn about prompting best practices and limitations of current language models. -- Use thorough prompts. Workflows can run for a long time to complete their task, so it is worthwhile to invest in sharing all of the important details. -- Discuss the use of workflows with your team. Truly embracing Continuous AI likely means acknowledging that a higher volume of PRs will be created and adjusting your code review habits. +## Workflow Documentation + + + + + Build custom workflow configurations with tools, rules, and prompts + + + + + + Modify existing workflows and manage versions + + + + + + Test workflow agents locally before deploying + + + + + + Latest insights and best practices for using AI workflows + + + + +## Best Practices for Continuous AI + +The practice of using background agents, which we call Continuous AI, requires practice and forethought to set up the right guiderails and habits to fit your development workflow, much like learning to work with a larger engineering team. We are constantly sharing our learnings on the [Continuous AI Blog](https://blog.continue.dev). + + + + **Start Local**: Practice running workflows locally using the [Continue CLI](../../guides/cli) `--workflow` flag in "TUI mode". The Continue CLI is used to run workflows in the hub, so you can also test your workflow agents and prompts locally. + + **Begin Small**: Identify and begin with tasks that you are confident can be accomplished by Continue, e.g., a small bug with a simple and isolated fix. + + **Iterate and Improve**: Once you have merged a PR created by Continue, try larger tasks. By being willing to start tasks that might not succeed on the first try; you will learn about prompting best practices and limitations of current language models. + + + + + + **Be Thorough**: Workflows can run for a long time to complete their task, so it is worthwhile to invest in sharing all of the important details. + + **Provide Context**: Include information about: + - Project structure and conventions + - Expected coding standards + - Integration requirements + - Success criteria + + **Use Examples**: When possible, reference existing code patterns or provide examples of desired output. + + + + + + **Communicate with Your Team**: Truly embracing Continuous AI likely means acknowledging that a higher volume of PRs will be created and adjusting your code review habits. + + **Establish Guidelines**: Work with your team to establish: + - When to use workflows vs manual development + - Code review standards for AI-generated code + - Testing requirements for workflow outputs + - Rollback procedures if issues arise + + **Monitor and Adjust**: Regularly assess workflow effectiveness and adjust prompts, tools, and processes based on team feedback. + +