Your first app
Argent is a Rust workspace. Clone it and run the standard check loop first — if that passes, the toolchain is good.
git clone https://github.com/argent-lang/argentcd argent./check.shBuild the tickets app
cargo run -- build examples/tickets.ag --out examples/build/ticketsThree things land in the output directory, and it is worth knowing what each is before moving on:
| Output | What it is |
|---|---|
sil/*.sil | Generated Silverscript — plain, auditable, and the thing you review |
artifact.json | The portable artifact the runtime consumes |
manifest.json | Build metadata |
When one source file declares several apps, pick one by name:
cargo run -- build contracts.ag --app DexCore --out build/dex-coreInspect before you trust
cargo run --bin argentc -- inspect examples/build/ticketsThe report summarises actor script, state and template sizes, static opcode counts, entry arguments and generated witnesses, route metadata, and signature-script size estimates.
Two reasons to run this early. Practically, script and witness sizes drive your transaction costs, and it is better to find out now than after you have designed around something too large. More importantly, it is the habit the next section depends on.
Read the generated Silverscript
cat examples/build/tickets/sil/*.silOpen the .ag source and the generated .sil side by side. You are looking for
the correspondence: which entry became which function, where your requires
went, how the successor’s constraints were encoded, and what the compiler added
that you did not write — routing, template commitments, and the witness material
that makes the whole thing check out.
Within each generated contract, Silverscript supplies the types, expressions, functions, arrays, loops and control flow, then does the final type checking and Kaspa Script compilation. Argent does not use Silverscript’s covenant macros — it generates the covenant logic itself.
Where to go after tickets
examples/tickets.ag is deliberately one actor. Once it makes sense, the
interesting examples are:
examples/stones/— a real multi-file application, split acrossapp,game,league,player,settleandtypes. This is the one that shows what the language is for.examples/spawns.ag— constrained covenant spawning.examples/icc/— closed inter-covenant communication: a minter and an asset that are compiled separately and still transition together.examples/open_icc/— open ICC, where a core app accepts actors it was not compiled against.
Upstream reference
The repository’s docs/ is written for compiler authors, and it is good. Once
you are past the basics:
argent-design.md,
icc-semantics.md,
route-planner.md,
and the
security invariants.