Logo vun Agencycli

Agencycli

Communautéit
chenhg5
agencycli

Manage AI agent teams with agencycli — a CLI tool for organising AI agents (Claude Code, Codex, Gemini, Cursor, etc.) into hierarchical teams (Agency → Team → Role → Project → Agent). Key capabilities: create agencies and teams, hire agents with merged context layers, assign and run tasks with priority queues, manage autonomous playbooks (wakeup.md), send async inbox messages between human and agents, configure heartbeat schedules and cron jobs, run agents inside Docker sandboxes, forward/confirm tasks via inbox, manage templates, and more. Use this skill whenever you need to: create or manage an agencycli workspace, hire/fire/sync agents, add/run/cancel tasks, check inbox confirmations, send messages, configure heartbeats or crons, start the scheduler, or work with agency templates.

Iwwersiicht

Editeurchenhg5
Repositoryagencycli
Skill-Nummagencycli
Stären
240
Forks
26
Matgeliwwert Fichieren
239
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 239 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    Vum chenhg5 op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Agencycli an TypingMind, fir e mat all LLM ze benotzen, oder füügt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vun GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier hei drënner an a bestätegt.
    https://github.com/chenhg5/agencycli/tree/main
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill afügen → Vu GitHub-URL, pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an de Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/chenhg5/agencycli.git \
  .claude/skills/agencycli
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Agencycli an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Agencycli automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Agencycli net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Keys.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

agencycli

agencycli is a CLI tool for organising AI agents into hierarchical teams (Agency → Team → Role → Project → Agent). Each agent = Model + Context + Skills. The binary is at /usr/local/bin/agencycli or in $PATH.

Installation

bash
# via npm (recommended)
npm install -g @agencycli/agentctl

# via install script
curl -fsSL https://raw.githubusercontent.com/chenhg5/agencycli/main/scripts/install.sh | sh

# verify
agencycli version

Core concepts

ConceptWhat it is
AgencyThe root workspace (agency-prompt.md, .agencycli/agency.yaml)
TeamA group with a shared prompt (teams/<team>/prompt.md)
RoleA position within a team — has its own prompt + bound skills + workspace setup
ProjectA work unit with its own prompt, linked to a code repo
AgentA hired instance: model + merged context from all layers
SkillReusable instructions copied into agent workspace on hire
TaskA unit of work with status, priority (0=critical…3=low), prompt, and optional heartbeat/cron
Playbookwakeup.md — the autonomous routine an agent runs when its task queue is empty
MessageAsync non-blocking communication between any two participants (human or agent)

Context is merged in this order (later layers override): Agency → Team → Role → Project → Agent


Quick start — blank agency

bash
# 1. Create agency
agencycli create agency --name "MyAgency" --desc "My first agency"
cd MyAgency

# 2. Create team + role
agencycli create team --name "engineering" --desc "Software engineers"
agencycli create role --team "engineering" --name "developer"

# 3. Create project
agencycli create project --name "my-service" --repo "/path/to/repo"

# 4. Hire an agent
agencycli hire --project my-service --team engineering --role developer \
  --model claudecode --name dev --sandbox docker

# 5. Add and run a task
agencycli task add --project my-service --agent dev \
  --title "Implement feature X" --prompt "..." --created-by human
agencycli run --project my-service --agent dev

Quick start — from a template (recommended)

bash
# 1. Create agency from template
agencycli create agency --name "MyAgency" \
  --template https://example.com/tech-agency.tar.gz
cd MyAgency

# 2. List available project blueprints
agencycli project blueprints

# 3. Create a project from a blueprint
agencycli create project --name "my-service" --blueprint default

# 4. Review and apply (hires agents, configures heartbeats, installs wakeup.md playbooks)
agencycli project show  --project my-service
agencycli project apply --project my-service

# 5. Start the scheduler — agents wake up on schedule and run their playbooks when idle
agencycli scheduler start

# 6. Monitor
agencycli inbox list          # task confirmations awaiting your decision
agencycli inbox messages      # async messages from agents
agencycli task list --project my-service --agent pm

Global flag

All commands support --dir <workspace> to point to the agency root when not running from inside it:

bash
agencycli --dir /root/code/MyAgency task list --project my-service --agent dev

Command reference

Workspace setup

bash
agencycli create agency  --name "Name" [--desc "..."] [--template file.tar.gz|dir|URL]
agencycli create team    --name "engineering" [--desc "..."]
agencycli create role    --team "engineering" --name "developer" [--desc "..."]
agencycli create project --name "my-service"  --repo "/path/to/repo" [--desc "..."]
agencycli create project --name "my-service"  --blueprint default   # from blueprint

Hiring agents

bash
agencycli hire --project <proj> --team <team> [--role <role>] \
               --model <model> --name <name> [--sandbox docker]
# Supported models: claudecode  codex  gemini  cursor  generic-cli

agencycli sync --project <proj> --agent <name>   # re-sync after editing prompts/skills
agencycli sync --project <proj>                  # sync all agents in project
agencycli fire --project <proj> --agent <name>          # soft delete → .fired/
agencycli fire --project <proj> --agent <name> --force  # hard delete

Project lifecycle

bash
agencycli project blueprints
agencycli project show  --project P
agencycli project apply --project P             # hire agents + configure heartbeats + install playbooks
agencycli project apply --project P --dry-run
agencycli project apply --project P --force

project-blueprints/default.yaml example:

yaml
name: "{{PROJECT_NAME}}"
description: "..."
agents:
  - name: dev
    role: developer
    team: engineering
    model: claudecode
    sandbox: true
    playbook: dev.md        # installed as wakeup.md by project apply
    heartbeat:
      enabled: true
      interval: 30m
      active_hours: "09:00-20:00"
      active_days: weekdays

  - name: pm
    role: product-manager
    team: product
    model: claudecode
    playbook: pm.md
    heartbeat:
      enabled: true
      interval: 30m

Tasks

bash
agencycli task add    --project P --agent A --title "T" --prompt "..." \
                      --created-by human|<project>/<agent> \
                      [--type feature|bug|chore] [--priority 0-3]
agencycli task list   --project P --agent A [--status pending] [--archived]
agencycli task show   <task-id>
agencycli task set    <task-id> [--title T] [--status S] [--priority N] [--due-date D] \
                      [--estimate-duration 30m] [--parent ID] [--label L]...
agencycli task stats  [--since today] [--project P] [--agent A] [--assignee X] [--label L] \
                      [--by agent|assignee|label|label:value|label:category] [--detail] [--format json]
agencycli task cancel <task-id>
agencycli task retry  <task-id>

# Emergency halt — cancel pending (and optionally running) tasks
agencycli task stop-all --project P --all-agents
agencycli task stop-all --project P --agent A --include-running

# View token usage and cost
agencycli task tokens --project P --agent A
agencycli task tokens --project P --all-agents
agencycli task tokens --project P --agent A --task <task-id>

# Called by agent inside its prompt:
agencycli task done --id <task-id> --status success --summary "brief description"
agencycli task done --id <task-id> --status failed  --error "reason"

# Pause and wait for human confirmation (blocks until human responds):
agencycli task confirm-request --id <task-id> \
  --summary "PR #42 ready for review" \
  --action-item "Open the PR and check the diff" \
  --action-item "Reply: merge / hold <reason>"

Task priority: 0=critical, 1=high, 2=normal (default), 3=low. The scheduler always picks the highest-priority pending task first. After confirm-request, the human's reply is available as $CONFIRMATION_REPLY.

Running agents

bash
agencycli run  --project P --agent A              # pick next pending task
agencycli run  --project P --agent A --task <id>  # run specific task
agencycli exec --project P --agent A --prompt "..." # one-off prompt (no task queue)

Inbox — task confirmations (blocking)

Agents call task confirm-request to pause a task and wait for the human's decision.

bash
agencycli inbox list
agencycli inbox show    <task-id>
agencycli inbox confirm <task-id> --message "approved, go ahead"
agencycli inbox reject  <task-id> --reason "needs rework"
agencycli inbox comment <task-id> --message "check the auth module first"
agencycli inbox forward <task-id> --to <project>/<agent> --note "please re-check"

Inbox — async messages (non-blocking)

Any participant (human or agent) can send messages to any other. Recipients read them on their next wakeup — the scheduler auto-injects unread messages at the top of the wakeup prompt.

Address format: human or project/agent (e.g. cc-connect/pm, cc-connect/dev-claude)

bash
# Send (single recipient)
agencycli inbox send --to cc-connect/pm --subject "Prioritise #55" --body "..."
agencycli inbox send --from cc-connect/pm --to human --subject "Update" --body "..."

# Group send (repeat --to)
agencycli inbox send \
  --to cc-connect/pm --to cc-connect/dev-claude --to human \
  --subject "All-hands" --body "..."

# Read (human's mailbox by default)
agencycli inbox messages                                              # unread only
agencycli inbox messages --recipient cc-connect/pm                   # agent's mailbox
agencycli inbox messages --from cc-connect/pm                        # filter by sender
agencycli inbox messages --all                                        # include already-read
agencycli inbox messages --archived                                   # show archived messages
agencycli inbox messages --mark-read                                  # mark all as read after listing

# Reply
agencycli inbox reply <msg-id> --from cc-connect/pm --body "Acknowledged."

# Forward a message to one or more recipients
agencycli inbox fwd <msg-id> --to cc-connect/dev-claude
agencycli inbox fwd <msg-id> --to cc-connect/pm --to human --note "FYI"

# Per-message status management
agencycli inbox read    <msg-id>                    # mark single message as read
agencycli inbox archive <msg-id>                    # archive (hidden from normal listing)
agencycli inbox delete  <msg-id>                    # permanently delete
agencycli inbox rm      <msg-id>                    # alias for delete
# --recipient flag available on all above to specify mailbox (default: human)

Knowledge base (docs)

A bookmark index for documents. Files stay where they are; only metadata is tracked in .agencycli/docs.yaml. Virtual directories are created automatically.

bash
# Add a document
agencycli docs add --path ./reports/design.md --title "System Design" \
  --index "cc-connect/architecture" --created-by human --tag design

# List / search
agencycli docs list [--index prefix] [--tag tag] [--created-by human] [--json]
agencycli docs search "design"
agencycli docs tree                     # virtual directory tree

# View details
agencycli docs show <doc-id> [--content]

# Update metadata / move
agencycli docs update <doc-id> --title "New Title" --tag newtag
agencycli docs move   <doc-id> --index "new/category"

# Remove from index (file is NOT deleted)
agencycli docs remove <doc-id>

The Web UI provides a visual knowledge base viewer at the "Knowledge Base" page with directory tree navigation and Markdown rendering.

Daemon (heartbeat + wakeup routines)

bash
# Configure heartbeat
agencycli scheduler heartbeat --project P --agent A \
  --enable --interval 30m \
  --active-hours "09:00-18:00" \
  --active-days  "weekdays"

# Set wakeup routine (runs as synthetic task when queue is empty)
agencycli scheduler heartbeat --project P --agent A \
  --wakeup-prompt-file /path/to/wakeup.md

# Start scheduler (aliases: sched, s)
agencycli scheduler start
agencycli scheduler stop
agencycli scheduler status

# Cron jobs
agencycli cron add     --project P --agent A \
  --title "Daily standup" --schedule "0 9 * * 1-5" --prompt "..."
agencycli cron list    --project P --agent A
agencycli cron delete  <cron-id>  --project P --agent A
agencycli cron enable  <cron-id>  --project P --agent A
agencycli cron disable <cron-id>  --project P --agent A

Each heartbeat cycle: if pending tasks exist → run highest-priority task; if queue is empty and wakeup.md is set → run wakeup routine. Unread messages are always prepended automatically.

Agent playbooks

A playbook (wakeup.md) defines what an agent does when its task queue is empty. Store in agent-playbooks/ and reference from project.yaml via playbook:.

project apply copies agent-playbooks/<playbook> → agents/<name>/.agencycli/context/wakeup.md and sets wakeup_prompt: "@.agencycli/context/wakeup.md" in heartbeat.yaml.

Typical wakeup.md patterns:

  • Check injected unread messages (auto-prepended — no inbox messages call needed)
  • Reply with: agencycli inbox reply <msg-id> --from project/agent --body "..."
  • Send async update: agencycli inbox send --from project/agent --to human --subject "..." --body "..."
  • Pause for human decision: agencycli task confirm-request --id $TASK_ID --summary "..." --action-item "..."
  • Complete: agencycli task done --id $TASK_ID --status success --summary "..."

Skills

bash
agencycli role skill add    --team <t> --role <r> --skill <s>
agencycli role skill remove --team <t> --role <r> --skill <s>
agencycli role list         --team <t>
agencycli list skills

Templates

A template bundles: agency-prompt.md, teams/, skills/, agent-playbooks/, project-blueprints/.

bash
agencycli template pack --output my-agency.tar.gz \
  --name "tech-project" --version "1.0.0" \
  --author "Alice" --email "alice@example.com" \
  --description "Standard software engineering agency" \
  --keywords "engineering,software"

agencycli template info my-agency.tar.gz
agencycli template info my-agency.tar.gz --json

agencycli create agency --name "My Agency" --template my-agency.tar.gz
agencycli create agency --name "My Agency" --template https://example.com/tpl.tar.gz

Sessions & misc

bash
agencycli session show  --project P --agent A
agencycli session clear --project P --agent A
agencycli list teams | projects | agents | skills
agencycli show team engineering
agencycli show project my-api
agencycli show agent my-api dev [--raw]
agencycli version

Agent context file locations

ModelContext fileSkills dir
claudecodeCLAUDE.md.claude/skills/
codexAGENTS.md(inlined)
geminiGEMINI.md.gemini/skills/
cursor.cursorrules.cursor/rules/
generic-clicontext.md—

Agency directory structure

<AgencyName>/
  .agencycli/
    agency.yaml            ← workspace marker
    inbox.yaml             ← human task-confirmation inbox
    inbox.md               ← human-readable inbox summary
    messages.yaml          ← async messages for the human
  agency-prompt.md
  teams/
    <team>/
      team.yaml
      prompt.md
      roles/<role>/
        role.yaml
        prompt.md
  skills/
    <skill>/
      skill.yaml
      prompt.md
      [other files, e.g. scripts]
  agent-playbooks/         ← wakeup.md templates, distributed with agency template
    pm.md
    qa-reviewer.md
  project-blueprints/
    default.yaml
  projects/
    <project>/
      project.yaml         ← agents + heartbeats + crons + playbooks (declarative)
      prompt.md
      agents/
        <agent>/
          CLAUDE.md           ← merged context (claudecode)
          .claude/skills/     ← deployed skill files
          .agencycli/
            context/
              agency.md       ← agency-level prompt
              role-<team>-<role>.md
              project-<project>.md
              wakeup.md       ← autonomous routine (installed by project apply)
          heartbeat.yaml      ← set by project apply or scheduler heartbeat
          crons.yaml          ← set by project apply or cron add
          tasks.yaml          ← active tasks
          tasks_archive.yaml  ← completed tasks
          messages.yaml       ← async messages for this agent
          runs/               ← execution logs

Context compression

Long-running agents accumulate context that may degrade quality. Each CLI has built-in auto-compression:

AgentMechanismDefaultConfiguration
Claude Codeauto-compact~90% of context windowEnv vars: CLAUDE_AUTOCOMPACT_PCT_OVERRIDE (threshold %, recommend 70-80), CLAUDE_CODE_AUTO_COMPACT_WINDOW (effective token window size)
Codexauto-compact~90% of context windowConfig key model_auto_compact_token_limit in codex config
Geminiauto-compress70% of context windowchatCompression.contextPercentageThreshold (0-1) in .gemini/settings.json

Set per-agent env vars via the Web UI (Agent → API Provider) or directly in agent.yaml:

yaml
env:
  CLAUDE_AUTOCOMPACT_PCT_OVERRIDE: "75"

Tips for agents

  1. Always use --dir <workspace> if you are not inside the agency directory.
  2. Get your own task ID from $TASK_ID (set by the scheduler when running a task).
  3. When you need human approval and must wait: use task confirm-request — do NOT call task done. The task resumes when the human confirms; their reply is in $CONFIRMATION_REPLY.
  4. When you want to notify someone without blocking: use inbox send --from <your-address> --to <recipient> --body "...".
  5. Unread messages are auto-injected at the top of your wakeup prompt — no need to call inbox messages yourself.
  6. Use inbox reply <msg-id> --from <your-address> to reply to a message.
  7. Use agencycli list agents to discover all agents and their project/agent addresses.
  8. Use agencycli exec --project P --agent A --prompt "..." for quick one-off tests without adding a task.

Matgeliwwert Fichieren

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

a weider 140 Fichieren.

Heefeg gestallte Froen

Wat mécht de KI-Skill Agencycli?

Manage AI agent teams with agencycli — a CLI tool for organising AI agents (Claude Code, Codex, Gemini, Cursor, etc.) into hierarchical teams (Agency → Team → Role → Project → Agent). Key capabilities: create agencies and teams, hire agents with merged context layers, assign and run tasks with priority queues, manage autonomous playbooks (wakeup.md), send async inbox messages between human and agents, configure heartbeat schedules and cron jobs, run agents inside Docker sandboxes, forward/confirm tasks via inbox, manage templates, and more. Use this skill whenever you need to: create or man...

Firwat Agencycli op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Agencycli besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt amplaz vun engem Abonnement pro Benotzerplaz. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Agencycli an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/chenhg5/agencycli/tree/main an. TypingMind liest d'Datei SKILL.md, bündelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Agencycli benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Agencycli benotzen?

Esou vill Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Agencycli domat benotzen – GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama a méi – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Agencycli gratis?

De Skill gëtt vum chenhg5 op GitHub publizéiert. Kuckt am Repository no de Lizenzbedéngungen. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbaart Pak vun Instruktiounen, dat engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt en nokënnt a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a keng Lafzäitëmfeld a funktionéiere mat all Modell.

All weisen

Elo Ären eegene KI-Workspace ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇