Skip to main content
Build and manage agents. Each subcommand has its own section below, in alphabetical order. Most commands take an optional agent identifier: an agent ID or a full name such as myorg~my-agent. Leave it out to use the agent in guild.json in the current directory. A typical development loop looks like this:

archive

Archive an agent. Archiving removes it from every workspace and stops new runs. See Disabling an agent for what changes.
To restore an archived agent, use unarchive.

capabilities

Show an agent’s resolved tools, grouped by their source: integrations, sub-agents, and built-in or legacy services. Each tool is marked read, write, or unknown. unknown is shown separately from read because an unclassified tool may write.
The command requires authentication, so run guild auth login first. Example output:
With --mode json:

categories

List agent categories, or show one category and the tags it allows.
The list doesn’t include tags. To see a category’s allowed tags, pass its name.

chat

Chat with the agent you’re developing, from inside the agent directory. By default, guild agent chat builds an ephemeral version from your local files and starts a new session. Unchanged files reuse the cached build.
Ephemeral builds include only files tracked by Git. guild agent chat and guild agent test upload files that are committed or staged with git add, and ignore new untracked files until you stage them. Modified tracked files upload their working-tree content, so you can try changes to existing files without committing them.
Resuming a session skips version resolution and ephemeral builds, because the session already pins its agent version and workspace. --workspace and --agent-version are ignored when you resume. In --mode json and --mode jsonl, resuming appends your input to the session as a new user message. The CLI reports the session’s ID, and response polling only considers events created after your message. If the session doesn’t exist or you can’t access it, guild agent chat exits with code 1 without building the agent and prints:

clone

Clone an agent’s repository into a local directory.

code

Fetch an agent’s latest code. By default, it prints the files as JSON and includes only published versions.

diff

Show what changed between your local files and a published version, as a colored unified diff.
Run it from inside an agent directory. The command needs a guild.json, and compares the Git-tracked files in your working tree, the same set test and chat upload.

fork

Fork a published agent version into a new, independent agent with its own repository.
A fork inherits the source agent’s category and its tags, except Guild’s own guild:-prefixed tags. Pass --category to change the category. The source tags are then dropped, and any --tags you pass are checked against the new category’s allowed tags. Run guild agent categories <category> to see them.

get

Show an agent’s details.

grep

Search agent files for lines that match a pattern. The pattern is a JavaScript regular expression.

init

Initialize a new agent, in a new directory or the current one.
Agent types are case-insensitive, and each one scaffolds a different entry point:
--agent-type appears only on accounts that have more than one agent type available. Omit it in a terminal and the CLI prompts you to choose. In non-interactive mode the flag is required, and omitting it exits with Error: --agent-type is required in non-interactive mode.
--template is only supported for GUILD_TYPESCRIPT. Passing it with any other agent type exits with Error: --template is not supported for agent type <agent-type>.
In non-interactive mode, --owner is required when your account belongs to one or more organizations. Run guild config set default_owner <name-or-id> to set a default. In interactive mode, the CLI always prompts for the owner.

list

List agents. Without filters, it lists your own agents.
With --workspace, the list is the agents installed in that workspace, not the platform-wide roster. --published is ignored there, because installed agents already reference committed versions.

log

Show an agent’s version history as Git-log-style blocks. Each block shows the commit SHA, version number, status, validation status, relative date, and summary.
For build and validation output, use logs.

logs

Show the build and validation step logs for an agent version.
For the version history, use log. For options and output format, see guild agent logs.

owners

List the accounts that can own an agent. Pass one of them to --owner on init or fork.

publish

Publish the latest draft version of an agent.
To save and publish in one step, use save --publish. To take a version back down, use unpublish.

pull

Pull the latest saved agent files into the current directory, without using Git.

revalidate

Run validation again on an agent version. It uses the latest version unless you pass a version ID.

save

Upload the agent’s files and create a new version. The target must already exist unless you pass --create-if-missing. Versions start as drafts until you publish them. save sends the files through the Guild API; it doesn’t commit or push with Git.
--publish always waits for validation and publishing to finish, then prints Version is now published and available in the catalog. If --timeout isn’t a positive integer, the command prints Invalid --timeout value and exits with status 1. If validation is still running when the timeout elapses, the CLI tells you how to finish:

Which files are saved

save uploads every file in the source directory except:
  • Files matched by .gitignore. In CLI 0.27.2 and later, rules apply from the repository root through the selected directory and its nested directories, including negation. Outside a Git repository, rules start at the selected directory.
  • .git, .guild, node_modules, dist, .env and .env*, guild.json, .npmrc, .DS_Store, and Thumbs.db, which are never uploaded.
A negation rule can’t bring back an always-excluded file. Global Git excludes and .git/info/exclude don’t apply, and it doesn’t matter whether Git tracks a file. Parent .gitignore files contribute rules, but they aren’t uploaded with a nested agent. Each save is a full snapshot: a file that exists in Guild but not in your directory is removed from the new version. Files must be valid UTF-8. -A/--all is deprecated and ignored. After each save, the CLI records the version and a hash of each file in .guild/state.json. If nothing changed since that save, save says so instead of creating a version. If the agent has a newer version than your last save, save stops unless you pass --force.

Save from your own repository

To save or publish from your own machine, sign in with guild auth login. You don’t need an API key. If GUILD_API_KEY is set, it takes precedence over your login, so unset it first. You don’t need guild agent clone or a guild.json to save. Name the existing agent and point --path at its source:
The named agent takes precedence over any guild.json in the directory, without changing it. The first save from a fresh directory compares its files with the agent’s latest version and asks you to confirm before replacing them, or you can pass --force. The same command works with an account API key. Set GUILD_API_KEY to a key with the agents:write scope, which lets a CI pipeline publish versions without guild auth login:
To create a missing agent during its first release, use CLI 0.27.1 or later and opt in explicitly:
The CLI creates the agent only when the target doesn’t exist. An authentication or permission error never triggers creation. The new agent is private, and publishing doesn’t change its visibility. If validation fails, the unpublished agent stays in place for you to inspect. You can also create the agent first with init. For a reusable workflow, see Publish from GitHub Actions. TypeScript agents take their version from package.json. Goose and Guild Native agents have no package.json, so save skips the version-bump checks for them, and --bump does nothing. When you run save --publish on one of them without --version-number, the CLI uses the next patch version after the latest published one, or 1.0.0 if none is published. For TypeScript agents, save also checks package-lock.json to keep dependency installs reproducible. The lockfile must be tracked in Git and in sync with package.json. If it’s stale or invalid, the save stops so you can run npm install and commit the result. If it’s missing, untracked, or ignored, the CLI warns you and falls back to legacy dependency resolution. Search agents by name and description.

tags

Manage an agent’s tags. Leave out the agent ID inside an agent directory.
To see the tags a category allows, run guild agent categories <name>.

test

Test the agent in the current directory. guild agent test polls for the agent’s response and prints it.
A poll timeout is recoverable: the session isn’t discarded, so you can resume it. In --mode json, the error output includes the session ID and the hint guild agent test --resume <session-id>. In --mode jsonl, the timeout output includes the same, and the command continues to the next input line. Pass --bundle <file> with --agent <id-or-name> to test a pre-built bundle without cloning the agent first. This mode needs no guild.json and uploads only the bundle you name. It works with GUILD_API_KEY set in CI, so you can test a bundle straight from a pipeline.
guild agent test runs any agent the workspace already trusts: one your account owns, or one installed in the workspace, including a public or third-party agent you added from the Hub. See Agent-test session authorization.
Before it runs, the CLI checks that the files the agent’s type needs are present: agent.ts and package.json for Guild TypeScript, PROMPT.md for Guild Native, recipe.yaml for Goose, AGENTS.md for OpenClaw, and langgraph.json for LangGraph. It resolves the type from guild.json or the Guild API, and names the missing file.

unarchive

Restore an archived agent.

unpublish

Unpublish an agent’s latest published version.

update

Change an agent’s visibility.

versions

List an agent’s versions.
For a Git-log-style view with commit SHAs and summaries, use log.

workspaces

List the workspaces that use an agent.
Last modified on October 15, 2026