Skip to content

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

21 stars

Watchers

0 watching

Forks

Repository files navigation

Kiro Harness Hive — Generate Multi-Agent Harnesses with Kiro CLI

Generate custom multi-agent systems for any domain using the agent-harness skill. Describe your use case to Kiro CLI, and the skill scaffolds an orchestrator with plan→execute→evaluate loops, dedicated subagents, rubric-based evaluation, and self-improvement through evolution. This repo contains the skill itself and two example harnesses (PPT Builder and Web App Dev) showing what it generates.

Architecture

The agent-harness skill teaches Kiro CLI to generate this orchestrator pattern for any domain:

┌──────────────┐     ┌──────────────────────────────────────────┐
│  You (User)  │────▶│  Kiro CLI + Agent Configs + Skills        │
└──────────────┘     └──────────────────┬───────────────────────┘
                                        │
                     ┌──────────────────▼───────────────────────┐
                     │           ORCHESTRATOR                    │
                     │  Coordinates the loop:                   │
                     │                                          │
                     │  ┌────────┐  ┌────────┐  ┌───────────┐  │
                     │  │PLANNER │─▶│WORKER  │─▶│EVALUATOR  │  │
                     │  │        │  │        │  │           │  │
                     │  │Outline │  │Produce │  │Score 1-10 │  │
                     │  │+ Plan  │  │Output  │  │per rubric │  │
                     │  └────────┘  └────────┘  └─────┬─────┘  │
                     │                                │        │
                     │         ◀── FAIL? Loop ────────┘        │
                     │         ──▶ PASS? Evolve + Done         │
                     └─────────────────────────────────────────┘

The plan→execute→evaluate loop runs until the evaluator's score meets the threshold (or max iterations). After each task, the agent evolves — recording lessons that improve future runs.

Prerequisites

  • Kiro CLI installed: curl -fsSL https://cli.kiro.dev/install | bash
  • Node.js v18+ and npm: nodejs.org (required for npx skills add)
  • A Kiro account — sign up at kiro.dev (free tier available)

No AWS account or Amazon Bedrock access needed. Kiro handles model inference through your Kiro subscription. See kiro.dev/pricing for plans and rates.

Quickstart (~5 minutes)

Step 1: Clone the repository

git clone https://github.com/aws-samples/sample-kiro-harness-hive.git
cd sample-kiro-harness-hive

Step 2: Run setup

bash setup.sh

Expected output:

🐝 Setting up Kiro Harness Hive...

📦 Installing skills from registry (requires internet)...

✅ Setup complete!

Installed:
  Skills: agent-harness (local), pptx, webapp-testing, web-design-guidelines (registry)
  Agents: ppt-orchestrator, webapp-orchestrator (+ 6 subagents)

Try it now (~2 minutes):
  kiro-cli --agent ppt-orchestrator

WARNING: If you see ERROR: kiro-cli not found, install it first with curl -fsSL https://cli.kiro.dev/install | bash and restart your terminal.

WARNING: If you see ERROR: Node.js and npm are required, install Node.js v18+ from nodejs.org.

NOTE: The .kiro/ directory contains runtime configs (agent configs, skills). Task outputs go to ppt/ and webapp/ in the working directory. Both are already in .gitignore — you don't need to commit them.

Step 3: Launch the PPT Builder agent

kiro-cli --agent ppt-orchestrator

Expected output:

🐝 PPT Builder Orchestrator ready. Describe the presentation you want and
I'll coordinate the plan→execute→evaluate loop to build it.

Step 4: Give it a task

Paste this prompt:

Create a 5-slide pitch deck about the benefits of cloud migration for a CTO audience.
Use a bold modern design with dark backgrounds, vibrant accent colors, and clean data visualizations.

Step 5: Watch the plan→execute→evaluate loop

The orchestrator will:

  1. Create a task directory and write goal.md
  2. Spawn the planner — designs the slide outline → writes plan.md
  3. Spawn the worker — generates .pptx presentation → writes to work/
  4. Spawn the evaluator — scores quality against the rubric → writes eval.md
  5. If the score is below 9/10, loop back to step 2 with feedback
  6. Present the final slides when done

The exact log format varies per run, but you'll see the orchestrator coordinate each subagent in sequence. If the evaluator scores below threshold, the loop repeats with feedback until it passes.

Expected result: a .pptx presentation file in ppt/tasks/{your-task-id}/work/.

Step 6: Open your presentation

open ppt/tasks/*/work/*.pptx

That's it — you just described what you wanted and got a polished slide deck, built by three agents working together.

What Just Happened?

The PPT Builder agents were generated by telling Kiro CLI what you want:

Build me a PPT agent. It should create slide decks from a topic description.
The planner outlines the slides, the worker generates a real .pptx file, and
the evaluator scores the quality. Use the pptx skill from the registry.

That's it — the agent-harness skill turns that description into a full orchestrator with three specialized subagents, evaluation rubrics, and a self-improving loop.

When you ran the PPT orchestrator, it coordinated three specialized subagents through a structured loop:

  • The planner designed the slide structure (it knows presentation best practices from the pptx skill, installed from the skills.sh registry)
  • The worker generated the actual content (following the plan and the skill's formatting rules)
  • The evaluator scored the output against a rubric and provided specific feedback — including a Plan Adherence check (verifying every plan step has corresponding output), regression detection (ensuring fixes from prior rounds aren't lost), and per-dimension threshold scoring (every dimension must meet the threshold individually, not just the weighted average)
  • If the score was below threshold, the loop ran again with the evaluator's feedback

Each agent has scoped permissions — the worker can only write files, the evaluator can only read and score, and the orchestrator has no domain tools (it can only coordinate). This is the least privilege principle in action.

For a deeper explanation of these concepts, see docs/concepts.md.

📎 Want to see another example? The repo also includes a Web App Dev agent that scaffolds web apps with Playwright testing and Creative UI scoring.

Build Your Own Agent Harness

The agent-harness skill can generate harnesses for any domain with a plan→produce→review workflow. Install it into any project:

cd your-project
npx skills add https://github.com/aws-samples/sample-kiro-harness-hive --skill agent-harness -y
kiro-cli chat

Then describe what you want. Here are some ideas:

  • Report generator — produces quarterly business reviews from project data. The planner structures sections, the worker generates prose and charts, the evaluator checks data accuracy and completeness.
  • Code reviewer — analyzes PRs for security issues, style violations, and test coverage. The planner identifies files to review, the worker annotates findings, the evaluator scores coverage and accuracy.
  • Solution architect — designs AWS architectures from requirements documents. The planner decomposes requirements, the worker produces architecture diagrams and IaC, the evaluator checks best practices and cost.
  • Data pipeline monitor — generates ETL scripts from schema definitions. The planner maps source→target schemas, the worker writes transformation code, the evaluator validates correctness and performance.

Use this template prompt (customize the bracketed parts):

I want to build a [DOMAIN] agent using the agent-harness skill. The agent should
[WHAT IT DOES] from [INPUT TYPE]. The planner [PLANNER'S JOB], the worker
[WORKER'S JOB], and the evaluator [EVALUATOR'S JOB]. Scaffold the full agent
harness for me.

→ Full step-by-step guide: docs/create-your-own.md

Documentation

Document What it covers
Concepts Custom agents, skills, subagents, orchestrator pattern, evolution
Architecture Detailed diagrams of orchestrator flow, task lifecycle, evolution loop
Create Your Own Step-by-step guide to building a custom agent harness

Troubleshooting

kiro-cli not found Install it with curl -fsSL https://cli.kiro.dev/install | bash and restart your terminal.

Agent fails to start / "agent not found" Run bash setup.sh first — it copies agent configs to .kiro/agents/. Verify with kiro-cli agent list.

Loop hangs or produces errors Check your Kiro subscription has available credits at kiro.dev. If the agent times out mid-loop, re-run the same command — the orchestrator reads existing task state and resumes.

Empty task directory after run The orchestrator creates task directories in ./{domain}/tasks/. If the directory is empty, the planner subagent may have failed. Check the Kiro CLI output for error messages. Common cause: the skill files weren't installed (re-run bash setup.sh).

Cost

  • Kiro CLI usage consumes credits from your Kiro subscription
  • See kiro.dev/pricing for current plans and rates
  • No AWS infrastructure deployed — no additional AWS charges
  • Estimated credit usage per example run: a few prompts (plan + execute + evaluate per iteration)

License

This library is licensed under the MIT-0 License. See the LICENSE file.

About

No description, website, or topics provided.

Resources

Code of conduct

Contributing

Security policy

Stars

21 stars

Watchers

0 watching

Forks

Releases

Packages

Used by

Contributors

Languages