Files
agency-agents/integrations
Michael Sitarzewski 00fb28a4cf feat(tools): add ZCode (Z.ai GLM agent harness) (#700)
* feat(tools): add ZCode (Z.ai GLM agent harness)

ZCode reads per-agent markdown from `.zcode/agents/{slug}.md` (project) and
`~/.config/zcode/agents/{slug}.md` (global), with `name` + `description` YAML
frontmatter and an optional `tools` list — the same plain-agent-markdown shape
as Qwen.

- tools.json: add the `zcode` entry (dual-scope, per-agent, format `zcode-md`).
- convert.sh: add `convert_zcode` (byte-identical to the qwen converter,
  output to integrations/zcode/agents/) + register in the dispatch, valid_tools,
  tools_to_run, and parallel_tools.
- install.sh: add `zcode` to ALL_TOOLS, `install_zcode`, `detect_zcode`, and the
  resolve_dest / bin / is_detected / display / label dispatches.

Directories + file format verified against ZCode's published docs. Renderer
contract: `zcode-md` output is byte-identical to `qwen-md`, verified by
diffing `convert.sh --tool zcode` against `--tool qwen` (243/243 files match).

check-tools.sh passes (16 tools consistent across tools.json, install.sh, and
convert.sh); bash -n clean on both scripts.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WdX6PvnCfRgYD11yVpXVor

* zcode: gitignore generated output + add integration README

Bring the ZCode integration in line with the other tools: the 243 generated
agent files (integrations/zcode/agents/*.md) are output of `convert.sh`, not
source — add a .gitignore rule so they can't be committed, and add
integrations/zcode/README.md documenting generate/install (matching the vibe
and qwen integration READMEs).

Verified: generated agents are now git-ignored, the README is tracked, and
check-tools.sh still passes at 16 tools.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKnDRWM4izsB8WAXKszhsq

* zcode: fix user-scope install path to ~/.zcode/agents (per ZCode docs)

The user-scope dest was ~/.config/zcode/agents/, but the official ZCode docs
state subagents are read from ~/.zcode/agents/<name>.md — so user-scope
installs landed where ZCode never looks. (detect.agentsDir and project scope
were already correct at .zcode/agents, so this was an internal inconsistency.)

Point tools.json dest.user, install_zcode's default, the header comment, and
the list display at ~/.zcode/agents; drop the stale ~/.config/zcode detection
clause; update the integration README. Keep format `zcode-md` distinct — ZCode's
native format supports color/model/permissions, so it will diverge from gemini-md
as the converter matures rather than being a permanent alias.

Verified: a default user-scope install now writes to ~/.zcode/agents/<slug>.md
(not ~/.config/zcode); check-tools.sh passes at 16 tools; install.sh syntax and
tools.json JSON both valid.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01WKnDRWM4izsB8WAXKszhsq

---------

Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
2026-07-12 11:29:16 -05:00
..

🔌 Integrations

This directory contains The Agency integrations and converted formats for supported agentic coding tools.

Supported Tools

  • Claude Code.md agents, use the repo directly
  • GitHub Copilot.md agents, use the repo directly
  • AntigravitySKILL.md per agent in antigravity/
  • Gemini CLI.md agent files in gemini-cli/agents/
  • OpenCode.md agent files in opencode/
  • OpenClawSOUL.md + AGENTS.md + IDENTITY.md workspaces
  • Cursor.mdc rule files in cursor/
  • AiderCONVENTIONS.md in aider/
  • Windsurf.windsurfrules in windsurf/
  • Kimi Code — YAML agent specs in kimi/
  • Qwen Code — project-scoped .md SubAgents in .qwen/agents/
  • Codex.toml custom agents in codex/
  • Mistral Vibe.toml agents + prompt files generated in vibe/
  • Osaurus -- SKILL.md skills generated in osaurus/
  • Hermes -- lazy-router plugin generated in hermes/

Quick Install

# Install for all detected tools automatically
./scripts/install.sh

# Install a specific home-scoped tool
./scripts/install.sh --tool antigravity
./scripts/install.sh --tool copilot
./scripts/install.sh --tool openclaw
./scripts/install.sh --tool claude-code
./scripts/install.sh --tool codex
./scripts/install.sh --tool osaurus
./scripts/install.sh --tool hermes

# Gemini CLI needs generated integration files on a fresh clone
./scripts/convert.sh --tool gemini-cli
./scripts/install.sh --tool gemini-cli

# Qwen Code also needs generated SubAgent files on a fresh clone
./scripts/convert.sh --tool qwen
./scripts/install.sh --tool qwen

If you install OpenClaw and the gateway is already running, restart it after installation:

openclaw gateway restart

For project-scoped tools such as OpenCode, Cursor, Aider, Windsurf, and Qwen Code, run the installer from your target project root as shown in the tool-specific sections below.

Regenerating Integration Files

If you add or modify agents, regenerate all integration files:

./scripts/convert.sh

Claude Code

The Agency was originally designed for Claude Code. Agents work natively without conversion.

cp -r <category>/*.md ~/.claude/agents/
# or install everything at once:
./scripts/install.sh --tool claude-code

See claude-code/README.md for details.


GitHub Copilot

The Agency also works natively with GitHub Copilot. Agents can be copied directly into ~/.github/agents/ and ~/.copilot/agents/ without conversion.

./scripts/install.sh --tool copilot

See github-copilot/README.md for details.


Antigravity

Skills are installed to ~/.gemini/config/skills/. Each agent becomes a separate skill prefixed with agency- to avoid naming conflicts.

./scripts/install.sh --tool antigravity

See antigravity/README.md for details.


Gemini CLI

Agents are packaged as Gemini CLI subagents. Subagents are installed to ~/.gemini/agents/. Because the agent files are generated artifacts, run ./scripts/convert.sh --tool gemini-cli before installing from a fresh clone.

./scripts/convert.sh --tool gemini-cli
./scripts/install.sh --tool gemini-cli

See gemini-cli/README.md for details.


OpenCode

Each agent becomes a project-scoped .md file in .opencode/agents/.

cd /your/project && /path/to/agency-agents/scripts/install.sh --tool opencode

See opencode/README.md for details.


OpenClaw

Each agent becomes an OpenClaw workspace containing SOUL.md, AGENTS.md, and IDENTITY.md.

Before installing, generate the OpenClaw workspaces:

./scripts/convert.sh --tool openclaw

Then install them:

./scripts/install.sh --tool openclaw

See openclaw/README.md for details.


Cursor

Each agent becomes a .mdc rule file. Rules are project-scoped — run the installer from your project root.

cd /your/project && /path/to/agency-agents/scripts/install.sh --tool cursor

See cursor/README.md for details.


Aider

All agents are consolidated into a single CONVENTIONS.md file that Aider reads automatically when present in your project root.

cd /your/project && /path/to/agency-agents/scripts/install.sh --tool aider

See aider/README.md for details.


Windsurf

All agents are consolidated into a single .windsurfrules file for your project root.

cd /your/project && /path/to/agency-agents/scripts/install.sh --tool windsurf

See windsurf/README.md for details.


Kimi Code

Each agent is converted to a Kimi Code CLI agent specification (YAML format with separate system prompt files). Agents are installed to ~/.config/kimi/agents/.

Because the Kimi agent files are generated from the source Markdown, run ./scripts/convert.sh --tool kimi before installing from a fresh clone.

./scripts/convert.sh --tool kimi
./scripts/install.sh --tool kimi

Usage

After installation, use an agent with the --agent-file flag:

kimi --agent-file ~/.config/kimi/agents/frontend-developer/agent.yaml

Or in a specific project:

cd /your/project
kimi --agent-file ~/.config/kimi/agents/frontend-developer/agent.yaml \
     --work-dir /your/project

See kimi/README.md for details.


Qwen Code

Each agent becomes a project-scoped .md SubAgent file in .qwen/agents/.

From a fresh clone, generate the Qwen files first:

./scripts/convert.sh --tool qwen

Then install them from your project root:

cd /your/project && /path/to/agency-agents/scripts/install.sh --tool qwen

See qwen/README.md for details.


Codex

Each agent is converted into a standalone Codex custom agent TOML file and installed to ~/.codex/agents/.

Because Codex uses generated TOML files rather than the source Markdown directly, run the converter before installing from a fresh clone:

./scripts/convert.sh --tool codex
./scripts/install.sh --tool codex

See codex/README.md for details.