Skip to main content

Learn by Example

Practical examples and tutorials to help you build autonomous agent workflows with Radium. Filter by category and difficulty to find exactly what you need.

Showing 8 of 8 examples

intermediate15-20 min

Multi-Agent Code Review Workflow

Orchestrate multiple agents to analyze, review, and improve code. Demonstrates DAG workflows, agent coordination, and error handling with automatic retries.

orchestrationcode-reviewmulti-agentdag
Example Code
# workflow.toml
[[agents]]
id = "analyzer"
model = "claude-3-sonnet"

[[agents]]
id = "reviewer"
model = "gpt-4"

[workflow]
steps = [
  { agent = "analyzer", input = "task.code" },
  { agent = "reviewer", depends_on = ["analyzer"] }
]
beginner10 min

Self-Hosted AI with Ollama

Run agents completely locally using Ollama. No API keys required - perfect for privacy-sensitive applications or offline development. Supports CodeLlama, Mistral, and more.

ollamaself-hostedprivacylocal
Example Code
# agents/local-coder.toml
[agent]
id = "local-coder"
name = "Local Code Assistant"

[model]
provider = "ollama"
model = "codellama:34b"
base_url = "http://localhost:11434"
intermediate20 min

Cost-Optimized Agent Selection

Automatically select the most cost-effective model for each task. Uses policy-driven orchestration to balance cost, speed, and quality based on your requirements.

cost-optimizationpolicyorchestration
Example Code
[orchestration]
policy = "cost-optimized"
max_cost_per_task = 0.50

[agent_selection]
prefer_local = true
fallback_strategy = "cheapest-cloud"

[models.preference]
fast_tasks = ["gpt-3.5-turbo", "claude-haiku"]
complex_tasks = ["gpt-4", "claude-sonnet"]
advanced30 min

Autonomous Debugging Agent

Enable agents to autonomously debug failing tests. Demonstrates YOLO mode, bounded autonomy, and intelligent error recovery with minimal human intervention.

autonomousdebuggingyolo-modetesting
Example Code
[execution]
mode = "autonomous"
require_approval = false
max_iterations = 10
budget = 5.00

[oversight]
vibe_check_frequency = "every-iteration"
on_anomaly = "pause-and-notify"
intermediate25 min

CI/CD Pipeline Integration

Integrate Radium agents into your CI/CD pipeline. Automate code reviews, documentation generation, and test creation as part of your build process.

ci-cdgithub-actionsautomation
Example Code
# .github/workflows/ai-review.yml
- name: Run AI Code Review
  run: |
    radium-cli chat code-reviewer \
      "Review PR #${{ github.event.number }} \
      --mode autonomous \
      --max-cost 2.00
advanced45 min

Building Custom Extensions

Create custom tools and integrations for your agents. This example shows how to build a GitHub extension that lets agents search issues, create PRs, and manage repositories.

extensionsrustdevelopmentgithub
Example Code
use radium_core::Extension;

#[derive(Extension)]
pub struct GitHubExtension {
    api_key: String,
}

impl GitHubExtension {
    fn search_issues(&self, query: &str) -> Result<Vec<Issue>> {
        // Implementation
    }
}
beginner15 min

Custom Agent Personas

Define custom personas to shape agent behavior and expertise. This example creates a security-focused reviewer with specific knowledge domains and communication style.

personascustomizationconfiguration
Example Code
# personas/security-expert.toml
[persona]
id = "security-expert"
expertise = ["security", "owasp", "cryptography"]
style = "thorough"
tone = "professional"

[prompts]
system = """
You are a cybersecurity expert specializing in
application security and the OWASP Top 10...
"""
advanced40 min

ETL Data Pipeline Orchestration

Build intelligent ETL pipelines with AI-powered data validation and transformation. Agents can detect anomalies, suggest optimizations, and handle errors autonomously.

etldata-engineeringorchestrationvalidation
Example Code
[[workflow.steps]]
id = "extract"
agent = "data-extractor"

[[workflow.steps]]
id = "validate"
agent = "data-validator"
depends_on = ["extract"]

[[workflow.steps]]
id = "transform"
agent = "data-transformer"
depends_on = ["validate"]
parallel = ["quality-check"]

Ready to Build?

Install Radium and start building your own autonomous agent workflows. Check out our comprehensive documentation for detailed guides and API references.