Method field guide

Run your first AI agent.
Keep the result.

Install the Method SDK, run a small file task with Codex, and inspect the saved output. Then save a version to your Method dashboard.

Before you start

You need Node.js 22 or later and an installed, signed-in Codex CLI. Local agent steps run on your computer with unrestricted shell access. Read a method before you run it, and start in an empty test folder.

The local SDK does not transfer browser sessions or set up cloud accounts. Use your existing local tools and connections. Cloud scheduling is available to pilot customers; book a call to discuss access and pricing.

1. Install and check the tools.

npm install -g https://app.withmethod.ai/downloads/withmethod-sdk-0.3.0.tgz
method doctor

The doctor command checks your Node and Codex installation. Resolve any missing tool or sign-in requirement before starting a run.

2. Prepare an empty working folder.

mkdir method-first-run
cd method-first-run
curl -fL https://withmethod.ai/examples/checked-file.method -o checked-file.method
printf '%s\n' '{"text":"Hello from Method.\n"}' > inputs.json
method validate checked-file.method

This method writes the supplied text to a file and checks it. Read it before continuing. A successful validation means the document has a valid structure.

3. Run it locally.

method run checked-file.method --inputs inputs.json --workspace . --run-dir .runs/first

Method starts a fresh Codex process for the step and another for the text check. It saves the returned file and run records under .runs/first. The expected file text is shown below; this is a sample output, not a report from a customer run.

Hello from Method.

4. Inspect the evidence.

method inspect .runs/first --out inspection.json --include-files

Read inspection.json and the run’s result.json. Check the final status, the returned file, and the check evidence. A failed or ambiguous check needs review. Do not treat a file’s presence alone as a successful run.

5. Save a version to Method.

method login
method create --file checked-file.method

Sign-in opens your browser. The create command saves the method and prints its server details. The adjacent .method.json file keeps the saved identity for future edits. Keep it with the method.

To run the saved method, use the method ID and version ID returned by the server:

method run METHOD_ID --version VERSION_ID --inputs inputs.json --workspace . --run-dir .runs/saved

Replace both uppercase values with the real IDs. Runs of saved methods upload their records to the dashboard. If that upload fails, use method sync RUN_DIRECTORY after reviewing the run. Do not repeat a business action just to repair an upload.

If the run does not finish

  • Missing Codex or sign-in: run method doctor and resolve its report.
  • Invalid method: run method validate FILE and correct the named field.
  • Failed check or timeout: inspect the run before any retry. Use method authoring recovery for resume rules.
  • New input or changed instructions: use a new run directory.

For all command options, run method COMMAND --help. The complete offline manual is available with method authoring all.

Make the next run better.