diff --git a/docs/docs.json b/docs/docs.json index 88cea7782..eb2a250c8 100644 --- a/docs/docs.json +++ b/docs/docs.json @@ -56,8 +56,12 @@ }, { "group": "Agents", - "icon": "cloud", - "pages": ["hub/agents/intro"] + "icon": "robot", + "pages": [ + "hub/agents/intro", + "hub/agents/overview", + "hub/agents/create-and-edit" + ] }, "hub/sharing", "hub/source-control" diff --git a/docs/hub/agents/create-and-edit.mdx b/docs/hub/agents/create-and-edit.mdx new file mode 100644 index 000000000..938c1c525 --- /dev/null +++ b/docs/hub/agents/create-and-edit.mdx @@ -0,0 +1,386 @@ +--- +title: "Create and Edit Agents" +description: "Build custom AI workflows with prompts, rules, and tools through the Continue Hub interface" +sidebarTitle: "Create & Edit" +--- + + + You can only create and edit Agents through Mission Control in the Continue Hub web interface. + This ensures proper validation, versioning, and team collaboration features. + + +## Creating an Agent + + + + From the Continue Hub top navigation bar, select **"+"** โ†’ **"New Agent"**. + + This opens the **Create an Agent (beta)** form with all required fields. + + + + Configure your agent with the following fields: + + | Field | What to Enter | Example | + |-------|---------------|---------| + | **Name** | Display name shown in the Hub | `Open PR with Fix` | + | **Prompt** | First instruction the agent receives | `Open a GitHub PR to fix the specified issue.` | + | **Description** | What the agent does | `Creates a pull request and includes AI-generated summaries.` | + | **Tools (MCPs)** | Select built-in or custom MCPs | `GitHub, PostHog, Supabase` | + | **Rules** | Add any organizational rules | `continuedev/gh-pr-commit-workflow, continuedev/summarization` | + | **Model** | Choose a default LLM | `Claude Sonnet 3.5` | + | **Owner + Slug** | Determines namespace | `my-org/github-pr-agent` | + | **Visibility** | Access level | `Public, Organization, or Private` | + + + **Tip**: Start with a simple prompt and add complexity through rules and tools. The prompt should be a clear, single instruction that defines the agent's primary goal. + + + + + As you fill in the fields, the right-hand panel shows a live preview of your agent's YAML configuration: + + ```yaml + name: Open PR with Fix + description: Open a GitHub PR to fix the specified issue + tools: built_in + rules: + - continuedev/gh-pr-commit-workflow + - continuedev/summarization + model: Claude Sonnet 3.5 + visibility: public + ``` + + This preview helps you verify the configuration before creating the agent. + + + + Click **"Create Agent"** to save and publish it. + + Your agent is immediately available to run in: + - Mission Control web interface + - TUI mode: `cn --agent your-org/your-agent-name` + - Headless mode: `cn --agent your-org/your-agent-name "prompt" --auto` + + + +## Editing an Agent + +You can edit any agent you own or that belongs to your organization. + + + + From the **Agents** page or Mission Control view, click your agent's name, then select **"Edit Agent"**. + + + + You can modify any of these components: + + + + **Refine task behavior** + + ``` + # Before + Fix the bug in the authentication system + + # After + Fix the authentication bug by: + 1. Identifying the root cause + 2. Implementing a secure solution + 3. Adding appropriate tests + 4. Opening a PR with detailed explanation + ``` + + + + **Enforce team standards** + + Add or remove organizational rules: + - `continuedev/security-first` - Always scan for vulnerabilities + - `continuedev/test-coverage` - Require tests for new code + - `my-org/style-guide` - Follow company coding standards + + + + **Connect additional systems** + + - Add GitHub MCP for repository operations + - Include Sentry MCP for error monitoring + - Connect Supabase MCP for database operations + - Use custom MCPs for internal tools + + + + **Adjust behavior and access** + + - **Model**: Switch between Claude, GPT-4, or other supported LLMs + - **Visibility**: Control who can see and use the agent + - Public: Anyone can discover and use + - Organization: Only your team members + - Private: Only you can access + + + + + + Click **"Update Agent"** when finished. + + The updated version is instantly available to your team with automatic versioning for change tracking. + + + +## Agent Components Deep Dive + +### Writing Effective Prompts + +Your prompt is the agent's primary instruction. Follow these patterns for best results: + + + + **Good**: Clear, actionable instructions + ``` + Analyze the Sentry errors from the past 24 hours and create GitHub issues + for any critical bugs with suggested fixes and reproduction steps. + ``` + + **Avoid**: Vague or open-ended requests + ``` + Look at errors and do something about them. + ``` + + + + **Good**: Include relevant context and constraints + ``` + Review the React components in src/components/ for accessibility issues. + Focus on ARIA labels, keyboard navigation, and color contrast. + Create a summary report with specific file locations and fix suggestions. + ``` + + **Avoid**: Assumptions about available context + ``` + Fix the accessibility problems. + ``` + + + + **Good**: Break complex tasks into clear steps + ``` + For the user authentication refactor: + 1. Audit current auth implementation for security issues + 2. Design improved architecture with proper session management + 3. Create migration plan with backwards compatibility + 4. Open PR with implementation and comprehensive tests + ``` + + **Avoid**: Complex tasks without structure + ``` + Refactor the authentication system to be better. + ``` + + + +### Choosing Rules + +Rules enforce consistent behavior across all agent runs. Popular rule categories: + +| Rule Type | Purpose | Example | +|-----------|---------|---------| +| **Code Quality** | Maintain standards | `continuedev/test-coverage`, `continuedev/code-review-checklist` | +| **Security** | Apply security practices | `continuedev/security-first`, `continuedev/vulnerability-scanning` | +| **Team Workflow** | Follow processes | `continuedev/pr-template`, `continuedev/commit-conventions` | +| **Custom** | Organization-specific | `my-org/deployment-rules`, `my-org/documentation-standards` | + +### Selecting Tools (MCPs) + +MCPs provide agents with external system access: + + + + - **GitHub MCP**: Repository operations, PRs, issues + - **GitLab MCP**: Similar to GitHub for GitLab users + - **Linear MCP**: Issue tracking and project management + + + + - **PostHog MCP**: User analytics and feature flags + - **Sentry MCP**: Error tracking and performance monitoring + - **DataDog MCP**: Infrastructure and application monitoring + + + + - **Snyk MCP**: Vulnerability scanning and dependency analysis + - **SonarQube MCP**: Code quality and security analysis + - **Aqua MCP**: Container security scanning + + + + - **Supabase MCP**: Database operations and schema management + - **dlt MCP**: Data pipeline development and monitoring + - **Terraform MCP**: Infrastructure as code management + + + +## Testing Your Agent + +Before deploying agents for team use, test thoroughly: + + + + Use TUI mode to interact with your agent: + + ```bash + cn --agent your-org/new-agent + # Chat interactively to test behavior + # Verify tool integrations work correctly + # Check that rules are applied properly + ``` + + + + Test with various scenarios: + + ```bash + # Test with minimal input + cn --agent your-org/new-agent "Fix authentication" + + # Test with detailed context + cn --agent your-org/new-agent "Fix the authentication timeout issue in src/auth/session.js affecting mobile users" + + # Test error handling + cn --agent your-org/new-agent "Invalid request that should fail gracefully" + ``` + + + + Verify production requirements: + + - [ ] Agent completes tasks without manual intervention + - [ ] Error handling is robust and informative + - [ ] Output format meets team expectations + - [ ] Security and permissions are properly configured + - [ ] Performance is acceptable for intended use cases + + + +## Example Agent Configurations + +Here are proven agent patterns you can adapt: + + + + ```yaml + name: Weekly Security Scan + description: Runs comprehensive security analysis and creates remediation PRs + prompt: | + Run a complete security scan including: + 1. Snyk dependency analysis + 2. Code vulnerability scanning + 3. Container image security check + 4. Create GitHub issues for critical findings with fix suggestions + tools: + - snyk-mcp + - github-mcp + rules: + - continuedev/security-first + - my-org/vulnerability-reporting + model: Claude Sonnet 3.5 + visibility: organization + ``` + + + + ```yaml + name: API Documentation Update + description: Generates and updates API documentation from code changes + prompt: | + Analyze recent API changes and update documentation: + 1. Scan for new or modified endpoints + 2. Generate OpenAPI specifications + 3. Update README and integration guides + 4. Create PR with comprehensive docs + tools: + - github-mcp + - openapi-mcp + rules: + - continuedev/documentation-standards + - my-org/api-guidelines + model: GPT-4 + visibility: organization + ``` + + + + ```yaml + name: Performance Regression Detector + description: Monitors performance metrics and alerts on regressions + prompt: | + Analyze recent performance data: + 1. Check Core Web Vitals trends + 2. Identify performance regressions + 3. Correlate with recent deployments + 4. Create detailed performance report with recommendations + tools: + - netlify-mcp + - datadog-mcp + - github-mcp + rules: + - continuedev/performance-monitoring + - my-org/sla-requirements + model: Claude Sonnet 3.5 + visibility: private + ``` + + + +## Best Practices + + + + Begin with basic prompts and single tools. Add complexity gradually as you learn what works for your use cases. + + + + Choose clear, specific names that indicate the agent's purpose: `security-scanner-weekly` vs `scanner`. + + + + Make incremental changes and test thoroughly. Agent versioning helps track what works. + + + + Involve your team in agent design. The best agents solve real workflow pain points. + + + +## Troubleshooting + +Common issues and solutions: + +| Problem | Solution | +|---------|----------| +| **Agent doesn't complete tasks** | Simplify the prompt, add more specific instructions, verify tool permissions | +| **Tools aren't working** | Check MCP configuration, verify API keys and permissions in Hub settings | +| **Inconsistent behavior** | Add rules to enforce consistent patterns, test with various input scenarios | +| **Performance issues** | Consider model choice, simplify complex multi-step workflows, optimize tool usage | + +## Next Steps + + + + Learn to run your agent in TUI, headless, or Mission Control modes + + + + Set up automated triggers for CI/CD and monitoring systems + + + + Explore cookbook agents for inspiration and best practices + + + + Configure team access and collaboration workflows + + \ No newline at end of file diff --git a/docs/hub/agents/intro.mdx b/docs/hub/agents/intro.mdx index 5004498d0..0689bf600 100644 --- a/docs/hub/agents/intro.mdx +++ b/docs/hub/agents/intro.mdx @@ -1,31 +1,61 @@ --- -title: "Agents Introduction" -description: "Run and manage background agents in Mission Control" -sidebarTitle: "Agents" +title: "Getting Started with Agents" +description: "Quick start guide for running AI workflows in Mission Control" +sidebarTitle: "Getting Started" --- + + Mission Control is your web interface for running and managing AI agents. Get started in minutes with pre-built workflows for security scanning, GitHub management, analytics insights, and more. + + Mission Control is in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051). -Mission Control is a way to run and manage background agents in Continue. You can use it to kick off: -- Addressing small nitpicks and bugs -- Building boilerplate-heavy features -- Investigating an issue to kickstart your work -- [Automated security scanning](../../guides/snyk-mcp-continue-cookbook) -- Running repeatable tasks with your own rules, prompts, and MCP servers -- Much more! +Use Mission Control to kick off agents for: +- **Bug fixes & code quality** - Address nitpicks and technical debt +- **Feature development** - Build boilerplate-heavy features +- **Security & compliance** - [Automated vulnerability scanning](../../guides/snyk-mcp-continue-cookbook) +- **Investigation & analysis** - Research issues to kickstart your work +- **Custom workflows** - Run repeatable tasks with your own rules and prompts -## Quickstart +## Quick Start -To kick off your first agent + + + Go to [hub.continue.dev/agents](https://hub.continue.dev/agents) and connect with your GitHub account. + + ![Mission Control Setup](/images/hub/workflows/images/workflows-setup.png) + + + + Select from pre-configured agents or create your own: + + + + `continuedev/snyk-continuous-ai-agent` + Finds vulnerabilities and creates fix PRs + + + + `continuedev/github-project-manager-agent` + Triages issues and manages workflows + + + + + + Enter a prompt and watch your agent work: + + ``` + "Fix the TypeError in api/users.ts and open a PR with tests" + ``` + + -1. Go to [hub.continue.dev/agents](https://hub.continue.dev/agents) - -![Mission Control Setup](/images/hub/workflows/images/workflows-setup.png) - -2. Connect with your GitHub account -3. Enter the prompt for your agent + + **New to agents?** Check out our [overview guide](/hub/agents/overview) to understand how agents combine prompts, rules, and tools into powerful workflows. + ## Example Workflow Tasks @@ -36,7 +66,7 @@ Here are some example tasks you can try with your agents: - "Fix the TypeError in api/users.ts where the user object might be undefined" - "Add null checks to all database query results in the services/ directory" - - "Fix all ESLint warnings in the components folder" + - "Fix all ESLint warnings in the components folder and open a PR" - "Update deprecated React lifecycle methods to hooks in legacy components" @@ -52,10 +82,10 @@ Here are some example tasks you can try with your agents: + - "Run a complete security scan and create GitHub issues for critical vulnerabilities" - "Scan the codebase for hardcoded API keys and move them to environment variables" - "Add input sanitization to all user-facing form fields" - - "Update all npm packages with known security vulnerabilities" - - "Implement rate limiting on the /api/login endpoint" + - "Update npm packages with security vulnerabilities and test compatibility" @@ -87,12 +117,74 @@ Here are some example tasks you can try with your agents: -## How to use background agents +## Ways to Run 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 agents: +Choose the method that fits your workflow: -- Practice first with the [Continue CLI](../../guides/cli) in "TUI mode". The Continue CLI is used to run agents, 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 agents 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. + + + **Web interface for interactive use** + + Perfect for: + - Exploring agent capabilities + - Reviewing outputs before action + - Team collaboration + - One-time tasks + + Access at [hub.continue.dev/agents](https://hub.continue.dev/agents) + + + + **Terminal interface for development** + + ```bash + cn --agent continuedev/github-project-manager-agent + ``` + + Perfect for: + - Local development workflows + - Testing agent behavior + - Interactive debugging + - Quick iterations + + + + **Automated execution for CI/CD** + + ```bash + cn --agent continuedev/snyk-continuous-ai-agent "Run security scan" --auto + ``` + + Perfect for: + - Scheduled workflows + - CI/CD integration + - Webhook triggers + - Background processing + + + +## Best Practices for Success + +The practice of using agents (Continuous AI) requires thoughtful setup of guardrails and habits: + + + + Begin with tasks you're confident Continue can handle, like fixing known bugs with simple solutions. + + + + Test with [Continue CLI](../../guides/cli) in TUI mode before deploying automation. + + + + Agents can run for extended periods - invest time in detailed prompts with all important context. + + + + Discuss agent usage and adjust code review habits for higher PR volumes. + + + + + **Learn More**: Explore advanced patterns and case studies on the [Continuous AI Blog](https://blog.continue.dev). + diff --git a/docs/hub/agents/overview.mdx b/docs/hub/agents/overview.mdx new file mode 100644 index 000000000..41d8e0bab --- /dev/null +++ b/docs/hub/agents/overview.mdx @@ -0,0 +1,205 @@ +--- +title: "Agents Overview" +description: "Standardized AI workflows that combine prompts, rules, and tools to complete specific, repeatable tasks" +sidebarTitle: "Overview" +--- + + + Agents are custom AI workflows that combine a prompt, rules, and tools (MCPs) to complete specific, repeatable tasks. + They live in the Continue Hub and can be executed from Mission Control (web interface), TUI mode, or headless automation. + + +## What Are Agents? + +Agents let your team standardize common workflows โ€” like opening GitHub PRs, summarizing analytics, or auditing security. Each agent includes: + +| Component | Description | Example | +|-----------|-------------|---------| +| **Prompt** | The agent's primary instruction | "Open a GitHub PR to fix the specified issue." | +| **Rules** | Standardized system behaviors | "Always summarize user context before opening PR." | +| **Tools / MCPs** | Connected integrations | GitHub, PostHog, Supabase | +| **Model** | The LLM used | Claude Sonnet 3.5 | +| **Visibility** | Access scope | Public / Organization / Private | + + + Mission Control is in beta. Please share any feedback with us in [GitHub discussions](https://github.com/continuedev/continue/discussions/8051). + + +## Ways to Run Agents + +You can run Agents in three main ways: + + + + **Interactive web interface** + + Trigger from the Continue Hub and review results in real-time. + + ```bash + # Navigate to hub.continue.dev/agents + # Click "Run Agent" on any agent + # Monitor progress and review outputs + ``` + + Perfect for: Interactive debugging, reviewing agent outputs, team collaboration + + + + **Interactive terminal mode** + + Launch from terminal for live interaction and testing. + + ```bash + cn --agent my-org/github-pr-agent + # Interactive chat interface opens + # Type your specific request + # Review and approve actions + ``` + + Perfect for: Local development, testing prompts, quick one-off tasks + + + + **Automated execution** + + Run one-off or scheduled tasks automatically without interaction. + + ```bash + cn --agent my-org/snyk-agent "Run weekly security scan" --auto + ``` + + Perfect for: CI/CD pipelines, scheduled tasks, webhook integrations + + + +## Pre-configured Agents + +Skip the setup and use battle-tested agents from our cookbook collection: + + + + `continuedev/snyk-continuous-ai-agent` + Finds vulnerabilities and opens PRs with fixes + + + + `continuedev/github-project-manager-agent` + Triages issues and manages project workflows + + + + `continuedev/posthog-continuous-ai-agent` + Analyzes user data and creates actionable tasks + + + + `continuedev/netlify-continuous-ai-agent` + Monitors Core Web Vitals and optimizes deployments + + + + `continuedev/supabase-agent` + Audits RLS security and generates migrations + + + + `continuedev/dlt-agent` + Inspects pipelines and debugs load errors + + + + + **Explore More Agents**: Browse the complete collection of pre-configured agents and MCP integration cookbooks in our [Guides Overview](/guides/overview#mcp-integration-cookbooks). + + +## Webhook Integrations + +Trigger Agents automatically through secure webhooks for CI/CD integration: + +```bash +POST /webhooks/ingest/:webhookId +{ + "payload": { "trigger": "nightly-security-scan" } +} +``` + +Perfect for connecting with: +- GitHub Actions workflows +- Monitoring alerts (Sentry, DataDog) +- Deployment pipelines +- Scheduled maintenance tasks + +## Team Collaboration + +Agents are organizational assets โ€” once created, everyone in your org can use them: + +| Role | Permissions | +|------|-------------| +| **Admin** | Create, edit, and delete Agents | +| **Member** | Run Agents and view results | +| **Viewer** | View and monitor Agent sessions | + +Each update is versioned, so your team can track changes to prompts, rules, and configurations. + +## Getting Started + + + + Start with a cookbook agent like `continuedev/github-project-manager-agent`: + + ```bash + cn --agent continuedev/github-project-manager-agent "List open issues labeled bug" + ``` + + + + Test agents locally before automation: + + ```bash + cn --agent continuedev/snyk-continuous-ai-agent + # Interactive mode - perfect for learning + ``` + + + + Ready to build custom workflows? Learn how in our [Create and Edit guide](/hub/agents/create-and-edit). + + + + Integrate with CI/CD using headless mode and webhooks for continuous workflows. + + + +## Best Practices + +The practice of using background agents, which we call Continuous AI, requires forethought to set up the right guardrails: + +- **Start Small**: Begin with tasks you're confident Continue can accomplish +- **Use Thorough Prompts**: Agents can run for extended periods, so invest in detailed instructions +- **Test Locally First**: Practice with TUI mode before deploying to production +- **Team Alignment**: Discuss agent usage and adjust code review habits for higher PR volume +- **Iterate and Improve**: Be willing to refine prompts based on results + + + Explore our [Continuous AI Blog](https://blog.continue.dev) for advanced patterns, case studies, and best practices from teams using agents in production. + + +## Next Steps + + + + Build your first custom agent with prompts, rules, and tools + + + + Browse pre-built agents for security, analytics, and more + + + + Learn to run agents from the command line + + + + Access the web interface to manage agents + + \ No newline at end of file