Skip to main content
A coding agent can develop Atonom tools using the same CLI as a person. Give it the intended behavior, an environment, the target tool, and explicit success cases. Keep the Atonom agent (the tool owner) distinct from the coding agent editing the file.

Give the agent a concrete task

Copy this brief into your coding agent and replace the bracketed values:
If you want the agent to save and execute changes, replace the last paragraph with:
These are suggested task boundaries; adapt them to your team’s workflow.

Bootstrap context

guide prints plain text even with --json. It is the compact authoring contract shipped with the executable. get --json returns the script and input schema. Read pull’s per-file action: exit code zero can include skipped-local-edits. An agent should use the returned path, not invent a filename from the tool name. Pass explicit --comm-agent-id when creating tools noninteractively.

Iterate with fixtures

With sandbox access, test local changes before saving:
Use eval with the full workspace-relative file path. Unlike push, diff, and run, it does not resolve a bare filename relative to the scripts directory. Compare the output to the expected value, rather than treating exit code 0 as proof of correctness. A script returning { ok = false } is still a successful Lua execution unless it raises an error.

Interpret machine output

  • Exit 0: command or script succeeded. Check values and per-file sync actions.
  • Exit 1: configuration, authentication, transport, or command failure. Read stderr; it may be plain text even in JSON mode.
  • Exit 2: run returned an error status, or eval produced FAIL. Fix the script or input. Argument-parser errors also use code 2, so check whether JSON was emitted.
  • Exit 3: an eval trap was unanswered, or the trap limit was reached. Inspect unanswered_trap and supply a suitable mock or correct the loop.
For run, inspect top-level status, value, error, and saved. For eval, inspect outcome.status, outcome.value or outcome.error, traps, and exit_code. diff returns zero even when content differs. Parse identical and remote_changed_since_pull. A null remote-change field means there is no synced entry to compare against.

Suggested workspace instructions

Place these conventions in your script repository’s agent instructions if useful:
Keep fixtures and scripts in version control according to your repository policy. Keep environment-specific tool mappings separate when moving between environments; see Sync & release.