Skip to content

Feature: Agent definition format with per-agent model routing #23

@kienbui1995

Description

@kienbui1995

Problem

Currently mc-code doesn't support defining named agents with specific model assignments. Users who work with multiple AI models have no way to consistently route specific task types to specific models.

Use Case

When building a multi-agent workflow (similar to magic-powers), different agents need different models:

  • Architecture/design tasks → Opus (deep reasoning)
  • Implementation/coding → Sonnet (balanced)
  • Review/classification → Haiku (fast, cheap, 60x cheaper than Opus)

Proposed Solution

Support agent definition files in .magic-code/agents/*.md (or similar path) with frontmatter:

---
name: reviewer
description: "Code review agent — fast, pattern-matching"
model: haiku
tools: ReadFile, GlobSearch, GrepSearch
---

You are a code reviewer focused on...

When user invokes @reviewer, mc-code:

  1. Loads this agent's system prompt
  2. Routes the conversation to the specified model
  3. Restricts available tools to the declared list

Benefits

  • Cost optimization: Route simple review/classification to Haiku (15x cheaper than Opus)
  • Consistency: Same task always gets same model — reproducible results
  • Team sharing: Agent definitions checked into repo, used by whole team
  • Workflow templates: Different agents for different phases (plan→implement→review)

Related

This would enable integration with plugin ecosystems like magic-powers that define specialized agents for domains (cloud engineering, AI development, analytics, etc.)

References

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions