End-to-End Tutorial
Learn Hydra by building and deploying your first workflow in 15 minutes.
What You'll Build
By the end of this tutorial, you will have:
- Created a Hydra account
- Forked a workflow from the Marketplace
- Connected it to your IDE (Claude Code, Cursor, or Codex CLI)
- Executed the workflow on real code
- Created and published your own workflow
Prerequisites
New to these tools? Read the Prerequisites Guide first for detailed setup instructions and explanations of what each tool does.
- A Hydra account (sign up here (opens in a new tab))
- One of these IDEs installed and working:
- Claude Code - Install via
npm install -g @anthropic-ai/claude-code(docs (opens in a new tab)) - Cursor - Download from cursor.sh (opens in a new tab)
- Codex CLI - Install via
npm install -g @openai/codex(docs (opens in a new tab))
- Claude Code - Install via
- A code project to test on (any language)
Part 1: Getting Started with Hydra
Create Your Account
- Go to hydra.opiusai.com (opens in a new tab)
- Click "Get Started" in the top right
- Sign up with GitHub (recommended) or email
- Complete your profile
GitHub sign-up gives you access to import repositories directly into workflows.
Explore the Dashboard
After signing in, you'll land on your Dashboard. Here you can see:
- My Workflows - Workflows you've created or forked
- My Subscriptions - Workflows you're subscribed to for updates
New accounts start with an empty dashboard. Let's add some workflows!
Browse the Marketplace
-
Click "Marketplace" in the navigation
-
You'll see community-published workflows organized by category:
- Development - Bug fixes, refactoring
- Testing - Test generation, coverage
- DevOps - CI/CD, deployment
- Documentation - API docs, READMEs
-
Use the search bar to find workflows, or filter by category
Part 2: Fork Your First Workflow
Recommended for Beginners: The Bug Fix Workflow is the best starting point because it:
- Has a simple 3-step structure (analyze → fix → test)
- Works on any codebase
- Shows clear before/after results
- Teaches the core workflow pattern
Find a Workflow
For this tutorial, we'll use the "Bug Fix Workflow":
- In the Marketplace, search for "Bug Fix"
- Click on the "Bug Fix Workflow" card
- Review the workflow details:
- Intent - What the workflow accomplishes
- Steps - The sequence of actions
- Manifest - The underlying JSON specification
Fork the Workflow
- Click the "Fork" button
- Give your fork a name (e.g., "My Bug Fix Workflow")
- Click "Create Fork"
Your fork is now in My Workflows on your dashboard!
Forking creates your own copy that you can customize. The original workflow remains unchanged.
Review the Manifest
Click on your forked workflow to open the Visual Builder. The manifest looks like this:
{
"$schema": "https://hydra.opiusai.com/schemas/workflow/v1.0.json",
"manifest_version": "1.0",
"name": "Bug Fix Workflow",
"intent": "Identify, analyze, and fix a reported bug with tests",
"steps": [
{
"id": "analyze",
"name": "Analyze the bug",
"action": "analyze_code",
"agent": "bug_analyzer",
"parameters": {
"focus": "root cause identification"
}
},
{
"id": "fix",
"name": "Implement the fix",
"action": "edit_file",
"depends_on": ["analyze"]
},
{
"id": "test",
"name": "Write tests",
"action": "generate_tests",
"depends_on": ["fix"]
}
]
}Each step has:
id- Unique identifiername- Human-readable nameaction- What the AI should dodepends_on- Steps that must complete first
Part 3: Connect Your IDE
Now let's connect Hydra to your IDE using the Model Context Protocol (MCP).
What is MCP? MCP is an open protocol that lets AI assistants connect to external tools. Think of it like a "plugin system" for AI - it allows Claude Code, Cursor, and other tools to access Hydra's workflows. Your IDE connects to Hydra's MCP server, which serves your workflow definitions.
Claude Code Setup
Step 1: Deploy your workflow
- In the Hydra Dashboard, open your forked workflow
- Click Deploy
- Select Claude Code as the target adapter
- Copy the MCP endpoint URL from the deployment details
Step 2: Configure Claude Code
Create or edit ~/.claude/settings.json:
{
"mcpServers": {
"hydra": {
"url": "YOUR_MCP_ENDPOINT_URL"
}
}
}Replace YOUR_MCP_ENDPOINT_URL with the endpoint from your deployment.
Step 3: Restart Claude Code
Close and reopen Claude Code. You should see "Hydra" listed in your available tools.
Step 4: Verify connection
In Claude Code, type:
List my Hydra workflowsYou should see your forked Bug Fix Workflow!
Verification Checklist
If your setup is working correctly, you should be able to:
- List your Hydra workflows from your IDE
- See the "Bug Fix Workflow" you forked earlier
If you don't see your workflows, check the Troubleshooting Guide.
Part 4: Execute Your Workflow
Open Your Project
Navigate to a project with a bug you want to fix (or create a simple test file):
// buggy.js - A file with an obvious bug
function calculateTotal(items) {
let total = 0;
for (let i = 0; i <= items.length; i++) { // Bug: <= should be <
total += items[i].price;
}
return total;
}Run the Workflow
In Claude Code, describe the bug:
Run my Bug Fix Workflow on buggy.js.
The calculateTotal function throws an error when processing arrays.Claude will:
- Analyze - Read the file and identify the off-by-one error
- Fix - Suggest changing
<=to< - Test - Generate a test file to verify the fix
Review the Results
The workflow will:
- Output an analysis explaining the bug
- Show the proposed fix (inline or as a diff)
- Generate test code to prevent regression
Congratulations! You've executed your first Hydra workflow.
Part 5: Create Your Own Workflow
Now let's create a custom workflow from scratch.
Open the Builder
- Go to your Dashboard
- Click "New Workflow"
- Choose "Start from Scratch"
Define the Workflow
Let's create a simple code documentation workflow:
- Name: "Document Code"
- Intent: "Add JSDoc comments to functions and classes"
Add Steps
Click "Add Step" for each:
Step 1: Analyze
- ID:
scan - Name:
Scan for undocumented code - Action:
analyze_code - Parameters:
{ "focus": "functions and classes without documentation" }
Step 2: Document
- ID:
document - Name:
Add documentation - Action:
edit_files - Depends On:
scan - Parameters:
{ "focus": "JSDoc/docstring format" }
Save and Test
- Click "Save"
- Click "Test" to try it on sample code
- When satisfied, click "Publish" to share on the Marketplace
Next Steps
You've learned the fundamentals of Hydra! Here's where to go next:
Troubleshooting
"Workflow not found" error
- Verify you're signed in to the correct Hydra account
- Check your MCP endpoint URL is correct
- Restart your IDE after configuration changes
IDE not connecting
- Ensure your firewall allows connections to
*.execute-api.us-west-2.amazonaws.com - Check that MCP is enabled in your IDE settings
- Verify your MCP endpoint URL is correct (from Dashboard → Deployments)
Workflow steps not executing in order
- Check
depends_onarrays in your manifest - Ensure no circular dependencies exist
- Review the execution plan in the Builder
For more help, see the Troubleshooting Guide or contact us at support@opiusai.com.