Compile a manifest into a deployable artifact.
agentc build runs the full compilation pipeline: it parses the manifest, fetches and transforms
tool sources, generates a complete project, and compiles it into a deployable artifact.
agentc build [CONTEXT] [OPTIONS]| Argument | Default | Description |
|---|---|---|
CONTEXT | . | Directory that relative paths in the manifest resolve against. |
| Flag | Short | Default | Description |
|---|---|---|---|
--manifest <FILE> | <CONTEXT>/agent.acl | Manifest file to read. | |
--artifacts-dir <DIR> | <CONTEXT>/artifacts | Directory the compiler writes its artifacts into. | |
--output <DIR> | -o | <ARTIFACTS_DIR>/build | Directory to write the compiled artifact into. |
--release | false | Compile in release mode (optimized, slower to build). | |
--verbose | -v | false | Print detailed output from each pipeline stage, including compiler output and transformer subprocess output. |
--format <FORMAT> | auto | Output format. auto selects TTY or plain based on the terminal. plain disables colors and progress indicators. | |
--cache-dir <DIR> | <ARTIFACTS_DIR>/cache | Directory used to cache compiler artifacts between builds. Reusing this directory avoids a full recompile on every invocation. | |
--no-cache | false | Disable the build cache. The compiler will not read from or write to the cache directory. | |
--no-cleanup | false | Skip deletion of ephemeral build artifacts (for example, temporary virtual environments created during tool transforms). | |
-- <ARGS>... | Additional arguments forwarded verbatim to cargo build. |
Build the agent in the current directory:
agentc buildBuild from a specific directory and output to a custom path:
agentc build ./agents/support --output ./distBuild from a manifest with a different file name:
agentc build --manifest prod.aclBuild a release binary and forward a cargo target flag:
agentc build --release -- --target x86_64-unknown-linux-gnuOn success, the compiled artifact is written to the output directory (default:
<ARTIFACTS_DIR>/build/). For the standalone archetype, this is an executable binary named
after the agent block in your manifest.
The generated project files are written to <ARTIFACTS_DIR>/generated/ during the build and
can be inspected or modified there.
If the build fails during the compile stage, run agentc generate first. The generated Rust
project will be on disk at <ARTIFACTS_DIR>/generated/ so you can read the generated source and
understand what the compiler produced before cargo tried to build it.
If the build fails during a tool transform, check that your tool source directories contain valid
package.json (JavaScript) or pyproject.toml (Python) files, and that the required toolchain
(node/esbuild for JavaScript, uv for Python) is available on your PATH.
© 2026 pogue.dev. All rights reserved.
CC BY 4.0