Skip to content

htekdev/copilot-agent-starter

Folders and files

NameName
Last commit message
Last commit date

Latest commit

Β 

History

1 Commit
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 
Β 

Repository files navigation

πŸ€– Copilot Agent Starter

Multi-agent orchestration templates, delegation patterns, and agent definitions for AI coding agents.

Build sophisticated agent systems using GitHub Copilot CLI. This template repository provides battle-tested patterns for creating domain agents, orchestrators, and multi-agent teams drawn from real production systems.

πŸ“˜ Part of The Agentic Development Blueprint by Hector Flores


⚑ Quick Start

  1. Clone this template:

    gh repo create my-agent-system --template htekdev/copilot-agent-starter --private
    cd my-agent-system
  2. Create your first agent:

    cp .github/agents/templates/domain-agent-template.agent.md .github/agents/my-agent.agent.md
    # Edit the file to define your agent's identity, domain, and behavior
  3. Launch your agent:

    gh copilot task my-agent "Check the status of X"

πŸ“¦ What's Included

🎭 Agent Patterns (patterns/)

  • Orchestrator Prompt Template β€” How to coordinate multiple sub-agents
  • Sub-Agent Task Schema β€” Structured format for delegating work
  • Delegation Decision Flowchart β€” When to delegate vs do it yourself
  • Parallel Agent Coordination β€” Running multiple agents safely
  • Agent Steering vs Launch β€” When to steer vs launch fresh
  • Team Agent Pattern β€” Goal-oriented multi-agent teams

πŸ“ Agent Definition Templates (.github/agents/templates/)

  • Domain Agent Template β€” Stateful agents that own a domain
  • Task Agent Template β€” Stateless agents that run procedures
  • Orchestrator Template β€” Agents that coordinate other agents
  • Team Agent Template β€” Goal-oriented agent teams

🧠 Memory System (memory/)

  • 4-Tier Memory Architecture β€” Core, Working, Long-term, Events
  • Memory Management Guide β€” Loading, saving, pruning patterns

🎨 Example Agents (.github/agents/)

  • Orchestrator Example β€” Dispatches multiple agents in parallel
  • Code Reviewer Example β€” Specialized code review agent
  • Researcher Example β€” Deep research and fact-gathering agent

πŸ“š Examples (examples/)

  • Multi-Agent System Walkthrough β€” End-to-end example
  • Agent Communication Patterns β€” How agents share context

🎯 Agent Pattern Comparison

Pattern Memory? Orchestrates? Owns a Goal? Lifecycle Example Use Case
Domain Agent βœ… 4-tier ❌ ❌ (owns a domain) Permanent Finance manager, content editor, CI/CD monitor
Task Agent ❌ Stateless ❌ ❌ (runs a procedure) Permanent Daily briefing, weekly report, one-time migration
Orchestrator ❌ Stateless βœ… All agents ❌ (generic coordination) Permanent System check-in, multi-domain audit
Team Agent βœ… 4-tier + manifest + progress βœ… Defined team βœ… Created β†’ Active β†’ Completed Home-buying team, product launch team, debt payoff team

πŸ”€ Delegation Decision Flowchart

New task arrives
  β”‚
  β”œβ”€ Can I complete in ≀5 tool calls?
  β”‚   β†’ DO IT YOURSELF
  β”‚
  β”œβ”€ Is it independent research across many files/modules?
  β”‚   β†’ LAUNCH EXPLORE AGENT
  β”‚
  β”œβ”€ Does it need the full toolset + multi-step reasoning?
  β”‚   β†’ LAUNCH GENERAL-PURPOSE AGENT
  β”‚
  β”œβ”€ Is this a follow-up to a running agent in the same domain?
  β”‚   β†’ STEER (write_agent)
  β”‚
  └─ Is it a cron/scheduled job?
      β†’ ALWAYS LAUNCH FRESH (never steer)

🧠 Memory Architecture (4-Tier System)

All stateful agents use this memory pattern:

Tier File Purpose Load Size Limit
1 core.md Identity, mission, heuristics ALWAYS 3-5KB
2 working.md Current state, active context ALWAYS 5KB max
3 long-term.md Historical patterns, validated lessons On-demand 10KB max
4 events.log Append-only audit trail Write-only Unlimited (prune >30d)

Pattern: Load 1+2 β†’ Work β†’ Save 2+4 β†’ Promote to 3 only when validated


🎭 How to Create Each Agent Type

Domain Agent

Use when: You need an agent that owns a specific area of responsibility with persistent memory.

---
name: finance-manager
description: "Owns budget tracking, bill payments, and expense categorization"
---

# Finance Manager β€” Budget & Bills

## Memory
**Load first:** core.md + working.md

## Identity
You own all financial tracking for the household...

## Domain Ownership
- Budget tracking
- Bill payment reminders
- Expense categorization

## Decision Framework
### Act Immediately
- Log expenses when receipts arrive
- Create tasks for due bills

### Ask First
- Purchases >$500

See: .github/agents/templates/domain-agent-template.agent.md

Task Agent

Use when: You need a stateless procedure that runs on-demand or on a schedule.

---
name: daily-briefing
description: "Morning briefing: weather, calendar, tasks, emails"
---

# Daily Briefing β€” Morning Summary

You compile the morning briefing: weather, calendar, top tasks, emails.

**No memory** β€” fresh state every run.

## Procedure
1. Get weather forecast
2. Load today's calendar events
3. Find top 3 priority tasks
4. Scan unread emails for urgency
5. Send one consolidated message

See: patterns/task-agent-pattern.md

Orchestrator

Use when: You need to dispatch multiple agents and compile their results.

---
name: system-checkin
description: "Dispatches all domain agents, collects reports, compiles one summary"
---

# System Check-In Orchestrator

## Orchestration Workflow
1. Discover all domain agents (glob `.github/agents/*.agent.md`)
2. Filter out orchestrators, task agents, team agents
3. Launch all remaining agents in parallel via `task` tool
4. Collect results with `read_agent`
5. Compile consolidated report
6. Send ONE notification (silence if all clear)

See: .github/agents/orchestrator.agent.md and patterns/orchestrator-prompt.md

Team Agent

Use when: You have a goal-oriented initiative requiring multiple specialized agents over weeks/months.

---
name: product-launch-team
description: "Coordinates product launch from planning through post-launch review"
---

# Product Launch Team

## Goal
Successfully launch Product X by Q2 2026.

## Team Roster
- **marketing-lead** (dedicated) β€” Owns campaign, messaging, launch timeline
- **engineering-lead** (shared) β€” Feature delivery, deployment
- **sales-enablement** (dedicated) β€” Collateral, training, demo prep

## Phases
1. **Planning** (Weeks 1-2) β€” Roadmap, messaging, timeline
2. **Build** (Weeks 3-8) β€” Feature dev, content creation
3. **Launch** (Week 9) β€” Go-live, monitoring
4. **Post-Launch** (Weeks 10-12) β€” Metrics, retrospective

See: patterns/team-agent-pattern.md


🚦 Agent Steering vs Launch Decision

Steer (write_agent) β€” When ALL are true:

  • βœ… An IDLE agent exists in the same domain
  • βœ… Message is a follow-up (correcting, clarifying, continuing)
  • βœ… Agent has context that would be lost by launching fresh
  • βœ… NOT a cron dispatch

Launch Fresh (task tool) β€” When ANY is true:

  • βœ… New topic unrelated to any running agent
  • βœ… No idle agents exist with relevant context
  • βœ… High-quality results needed with clean slate
  • βœ… Unsure? (default to launch β€” cleaner)
  • βœ… ALL cron-dispatched jobs (absolute rule)

See: patterns/agent-steering-vs-launch.md


πŸ“ Orchestrator Pattern

The canonical pattern for coordinating multiple agents:

Step 1: Discover Agents

glob(pattern: ".github/agents/*.agent.md")

Extract agent names, filter out orchestrators and team agents.

Step 2: Dispatch in Parallel

task(agent_type: "agent1", mode: "background", ...)
task(agent_type: "agent2", mode: "background", ...)
task(agent_type: "agent3", mode: "background", ...)

Step 3: Collect Results

read_agent(agent_id: "agent1", wait: true)
read_agent(agent_id: "agent2", wait: true)
read_agent(agent_id: "agent3", wait: true)

Step 4: Compile Report

Aggregate only agents with updates. Omit "all clear" sections.

Step 5: Send ONE Notification

Single consolidated message. Stay silent if nothing actionable.

See: patterns/parallel-coordination.md and .github/agents/orchestrator.agent.md


πŸ“š Documentation

Document What It Covers
patterns/README.md Overview of all delegation patterns
patterns/orchestrator-prompt.md How to write orchestrator prompts
patterns/sub-agent-task-schema.md Structured task delegation format
patterns/delegation-decision.md Flowchart: delegate vs do it yourself
patterns/parallel-coordination.md Running agents safely in parallel
patterns/agent-steering-vs-launch.md When to steer vs launch fresh
patterns/team-agent-pattern.md Goal-oriented agent teams
memory/4-tier-system.md Complete memory architecture
examples/multi-agent-system.md Full system walkthrough
examples/agent-communication.md How agents share context

πŸŽ“ Learn More

This template is part of The Agentic Development Blueprint β€” a comprehensive guide to building production-grade agentic systems with GitHub Copilot CLI.

The blueprint covers:

  • βœ… Agent architecture (this repo)
  • βœ… Custom instructions β€” htekdev/copilot-instructions-starter
  • βœ… Git hookflows β€” htekdev/copilot-hookflow-starter
  • βœ… Quality gates β€” htekdev/copilot-quality-starter

πŸ‘‰ Get the full blueprint on htek.dev


🀝 Contributing

Found a pattern that works well? Submit a PR! This is a living template that evolves with the community.


πŸ“„ License

MIT License β€” See LICENSE file.


πŸ‘¨β€πŸ’» About

Created by Hector Flores (@htekdev)

These patterns are drawn from production agentic systems managing complex multi-domain workflows. They're battle-tested, not theoretical.

About

Multi-agent orchestration templates, delegation patterns, and agent definitions for AI coding agents. From The Agentic Development Blueprint.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors