DEV Community

MINYEONG KIM
MINYEONG KIM

Posted on

Stop writing Python glue code for your AI Agents. Use YAML instead

Every time I wanted to build a multi-agent workflow—like having one AI write code and another review it—I hit a wall.

Existing frameworks are powerful, but they all forced me to write a massive amount of Python glue code. I had to define nodes, edges, state schemas, and classes just to get two agents to talk to each other.

I wanted something simpler. I wanted to say, "Agent A hands off to Agent B, and if the quality check fails, go back to Agent A," all without touching a single .py file.

So, I built aqm.

What is aqm?
aqm is an open-source orchestrator that lets you define complex AI pipelines in a single YAML file and run them directly via CLI.

No SDKs, no complex environment setups, and most importantly—no API keys required if you already have your favorite AI CLIs (like Claude or Gemini) configured.

Why YAML?
When you use YAML, your AI pipeline becomes portable. You can share a single file with a teammate, and they can run the exact same workflow instantly. It turns "code" into "configuration."

Key Features that save my sanity:
Multi-LLM Native: Use Claude for coding and Gemini for security reviews in the same flow.

Quality Gates: Built-in logic to auto-evaluate output. If the result is "Bad," the system triggers a retry or sends it back to a previous agent.

Token Optimization: I implemented 5 different context strategies that saved me 55-85% on token costs by only showing agents what they actually need to see.

Session Nodes: Perfect for "design meetings" where agents discuss back and forth until they reach a consensus.

A Quick 30-Second Example
Here is a simple pipeline where a developer agent writes code and a reviewer agent checks it. If the reviewer rejects it, it goes back to the developer.

YAML

agents:
  - id: developer
    runtime: claude
    system_prompt: "Implement: {{ input }}"
    handoffs: [{ to: reviewer }]

  - id: reviewer
    runtime: gemini
    system_prompt: "Review for security: {{ input }}"
    gate:
      type: llm
      prompt: "Is this production-ready?"
      max_retries: 3
    handoffs:
      - { to: deployer, condition: on_approve }
      - { to: developer, condition: on_reject }
Enter fullscreen mode Exit fullscreen mode

You can run this entire flow with one command:
aqm run "Create a login form with JWT"

Give it a try!
I’ve made aqm entirely open-source (MIT License). I'm looking for fellow developers to break it, critique it, and tell me what's missing.

GitHub: https://github.com/aqm-framework/aqm

Quick Install: pip install aqm

I’d love to hear your thoughts:

Does a YAML-only approach fit your workflow?
What’s the one feature you wish your current agent framework had?

Top comments (0)