Coding agent walkthrough
A single script that exercises the coding surface against the tiny sample
repository in its directory, with no server and no database. Every call goes
through the importable Arrowhead facade, which runs the identical guarded
path an HTTP client reaches, so this doubles as a smoke test of the coding
families. The runnable source lives in
examples/coding_agent/;
run it from a repository checkout:
uv run python examples/coding_agent/run.pyIt demonstrates, in order:
symbol_mapover the repository, listing each definition and its line span.code_readof a line range, returned inside the untrusted framing.workingset_updatepinning a file into a named working set.pack_contextassembling a token-budgeted, secret-scanned, provenance-stamped bundle from the pinned file plus retrieval.run_snippetexecuting a self-contained snippet in the sandbox and returning its bounded, framed output.
The script constructs
Settings(profile="coding", repo_root=..., exec_enabled=True), so it shows how
a deployment selects the coding profile and turns execution on. A real HTTP
deployment would additionally grant the execute action in its authorization
policy; here auth is off, so the allow-all authorizer stands in.