agentc
GitHubagentc-sh/agentc
agentc
GitHubagentc-sh/agentc
›Introduction
Get started›Concepts in 5 minutes›Build your first agent›Add your first tool›Serve and connect
Concepts›Architecture overview›The manifest›The compilation pipeline›Archetypes›The graph›Tools and capabilities›Runtime libraries›Skills›Agents and prompts›Serving and protocols›Observability
Guides›Author a manifest›Write a tool›Give your agent a filesystem›Control network egress›Connect external tools via MCP›Connect agents via A2A›Use the bash tool›Control tool access with capabilities›Write templated prompts›Manage prompts with Langfuse›Pass context from the client›Configure a model provider›Connect a CopilotKit frontend›Deploy a standalone binary›Deploy with Docker and PostgreSQL›Instrument with OpenTelemetry›Extend code generation with blocks
Reference
›agentc init›agentc tool init›agentc build›agentc run›agentc generate›agentc inspect
Manifest
Runtime
›Observability

agentc build

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]

Arguments

ArgumentDefaultDescription
CONTEXT.Path to the directory containing agent.acl.

Options

FlagShortDefaultDescription
--output <DIR>-o<CONTEXT>/artifacts/buildDirectory to write the compiled artifact into.
--releasefalseCompile in release mode (optimized, slower to build).
--verbose-vfalsePrint detailed output from each pipeline stage, including compiler output and transformer subprocess output.
--format <FORMAT>autoOutput format. auto selects TTY or plain based on the terminal. plain disables colors and progress indicators.
--cache-dir <DIR><CONTEXT>/artifacts/cacheDirectory used to cache compiler artifacts between builds. Reusing this directory avoids a full recompile on every invocation.
--no-cachefalseDisable the build cache. The compiler will not read from or write to the cache directory.
--no-cleanupfalseSkip deletion of ephemeral build artifacts (for example, temporary virtual environments created during tool transforms).
-- <ARGS>...Additional arguments forwarded verbatim to cargo build.

Examples

Build the agent in the current directory:

agentc build

Build from a specific directory and output to a custom path:

agentc build ./agents/support --output ./dist

Build a release binary and forward a cargo target flag:

agentc build --release -- --target x86_64-unknown-linux-gnu

Output

On success, the compiled artifact is written to the output directory (default: <CONTEXT>/artifacts/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 <CONTEXT>/artifacts/generated/ during the build and can be inspected or modified there.

Troubleshooting

If the build fails during the compile stage, run agentc generate first. The generated Rust project will be on disk at artifacts/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.

← Previousagentc tool initNext →agentc run

© 2026 pogue.dev. All rights reserved.

Creative CommonsCC BY 4.0
On this pageArgumentsOptionsExamplesOutputTroubleshooting

Search docs

Search the agentc documentation