@parcha/agentrun 0.4.11 → 0.4.12

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -0,0 +1,172 @@
1
+ // `--tailscale` (install.sh, `agentrun service install`): AgentRun on the person's own tailnet, over HTTPS at this
2
+ // machine's MagicDNS name, through `tailscale serve` in front of the server on loopback. Never Funnel: a serve entry with
3
+ // Funnel on is refused by name and left as it is. Tailscale itself is never installed, logged in or given sudo here;
4
+ // what it lacks is said as steps, and AgentRun runs on this machine meanwhile. The entry added is recorded in
5
+ // ~/.agentrun/tailscale.json, so `off` removes that entry and no other serve setting.
6
+ //
7
+ // Run as a script, it is the installer's step where AgentRun runs in the background (no service manager):
8
+ // node tailscale.mjs address PORT AGAIN prints the https address to start the server with, or nothing
9
+ // node tailscale.mjs serve PORT AGAIN URL serves the loopback PORT at URL, the address printed, and says where
10
+ // node tailscale.mjs off removes the entry it added
11
+ import { spawnSync } from "node:child_process";
12
+ import { existsSync, readFileSync, rmSync, writeFileSync } from "node:fs";
13
+ import { homedir } from "node:os";
14
+ import { join } from "node:path";
15
+
16
+ /** The port AgentRun is served on when --tailscale names none: fixed, so the serve entry and the server agree after a
17
+ * restart, where "the first free port" could land on another of this machine's services. */
18
+ export const TAILNET_PORT = "7340";
19
+ export const PRICE = "Tailscale's Personal plan is free: up to 6 users, unlimited user devices (https://tailscale.com/pricing).";
20
+ const MAC_APP = "/Applications/Tailscale.app/Contents/MacOS/Tailscale";
21
+ const DENIED = /Access denied/i;
22
+
23
+ /** The proxy target of the server on `port`. */
24
+ const LOOPBACK = "127.0.0.1"; // key-gate: loopback-rule serve proxies to the server on this machine
25
+ export const targetOf = (port) => `http://${LOOPBACK}:${port}`;
26
+
27
+ /** Tailscale on this machine, driven through `exec` (spawnSync's shape); `again` is the command that runs this step again. */
28
+ export function tailnetOf({ platform = process.platform, root = join(homedir(), ".agentrun"), uid = process.getuid?.(), exec, say, fail, again }) {
29
+ // The Mac app's CLI is in the app, and on PATH only when someone put it there.
30
+ let bin;
31
+ const run = (args, options) => {
32
+ bin ??= platform === "darwin" && exec("tailscale", ["version"]).error?.code === "ENOENT" && existsSync(MAC_APP) ? MAC_APP : "tailscale";
33
+ return exec(bin, args, options);
34
+ };
35
+ const state = join(root, "tailscale.json");
36
+ const json = (result) => {
37
+ try {
38
+ return JSON.parse(result.stdout?.trim() || "{}");
39
+ } catch {
40
+ return undefined;
41
+ }
42
+ };
43
+ const errorOf = (result) => `${result.error?.message ?? ""}${result.stderr ?? ""}`.trim().split("\n")[0];
44
+ const up = platform === "darwin" ? "open the Tailscale app and log in" : uid === 0 ? "tailscale up" : "sudo tailscale up --operator=$USER";
45
+ const steps = (why, ...todo) => {
46
+ say(`${why}, so AgentRun is on this machine only for now. To open it from your phone and laptop, on your tailnet only:`);
47
+ todo.forEach((step, i) => say(` ${i + 1}. ${step}`));
48
+ say(`Then run again: ${again}`);
49
+ say(PRICE);
50
+ };
51
+ const operator = (retry = again) => {
52
+ say("Tailscale on Linux lets only root or its operator change what it serves. Run once:");
53
+ say(" sudo tailscale set --operator=$USER");
54
+ say(`Then run again: ${retry}`);
55
+ };
56
+ const serveConfig = () => {
57
+ const result = run(["serve", "status", "--json"]);
58
+ if (result.status !== 0) return { denied: DENIED.test(result.stderr ?? ""), missing: result.error?.code === "ENOENT", error: errorOf(result) };
59
+ return { config: json(result) ?? {} };
60
+ };
61
+ const recorded = () => {
62
+ try {
63
+ return JSON.parse(readFileSync(state, "utf8"));
64
+ } catch {
65
+ return undefined;
66
+ }
67
+ };
68
+ const handlerOf = (config, host) => config.Web?.[`${host}:443`]?.Handlers?.["/"];
69
+
70
+ return {
71
+ state,
72
+ recorded,
73
+ /** The https address to serve AgentRun at, its server to be `target`: `{ host, url }`, or undefined once what Tailscale
74
+ * lacks is said. Throws, changing nothing, when Funnel is on there or another service has it. */
75
+ address(target) {
76
+ const status = run(["status", "--json"]);
77
+ if (status.error?.code === "ENOENT") {
78
+ const link = platform === "darwin" ? "https://tailscale.com/download/mac" : "https://tailscale.com/download/linux";
79
+ return steps("Tailscale is not installed here", `Install Tailscale: ${link}`, `Connect this machine to your tailnet: ${up}`);
80
+ }
81
+ const st = status.status === 0 ? json(status) : undefined;
82
+ if (st === undefined) {
83
+ const start = platform === "darwin" ? "open the Tailscale app" : "sudo systemctl enable --now tailscaled";
84
+ return steps(`Tailscale is installed but not running (${errorOf(status) || "no status"})`, `Start it: ${start}`, `Connect this machine to your tailnet: ${up}`);
85
+ }
86
+ if (st.BackendState !== "Running") return steps(`Tailscale is installed but this machine is not on a tailnet (${st.BackendState ?? "no state"})`, `Connect it: ${up}`);
87
+ const host = (st.Self?.DNSName ?? "").replace(/\.$/, "");
88
+ if (!host || !(st.CertDomains ?? []).includes(host)) {
89
+ return steps(`tailscale serve needs an HTTPS certificate, and your tailnet gives none to this machine${host ? ` (${host})` : ""}`, "Turn on MagicDNS and HTTPS Certificates: https://login.tailscale.com/admin/dns");
90
+ }
91
+ const { config, denied, error } = serveConfig();
92
+ if (denied) return operator();
93
+ if (config === undefined) throw fail(1, `tailscale serve status failed: ${error}.`);
94
+ if (config.AllowFunnel?.[`${host}:443`]) {
95
+ throw fail(1, `Tailscale Funnel is on for https://${host}/ (tailscale funnel status), which puts it on the public internet. AgentRun is served on your tailnet only, so nothing was changed. Turn that Funnel off, then run again: ${again}`);
96
+ }
97
+ const handler = handlerOf(config, host);
98
+ const tcp = config.TCP?.["443"];
99
+ const ours = [target, recorded()?.proxy].filter(Boolean);
100
+ if ((handler && !ours.includes(handler.Proxy)) || (tcp && !tcp.HTTPS)) {
101
+ const what = handler ? handler.Proxy ?? handler.Path ?? "text" : tcp.TCPForward;
102
+ throw fail(1, `https://${host}/ already serves ${what} on your tailnet (tailscale serve status), so AgentRun left it as it is and changed nothing. Free it, then run again: ${again}`);
103
+ }
104
+ return { host, url: `https://${host}/` };
105
+ },
106
+ /** Serves the server on `port` at `host`'s https address; false once what stops it is said (operator rights). */
107
+ serve(port, host) {
108
+ const target = targetOf(port);
109
+ // Tailscale's own words (a link to turn something on, say) go to the terminal as it writes them.
110
+ const result = run(["serve", "--bg", "--https=443", target], { stdio: ["ignore", "inherit", "pipe"] });
111
+ if (result.status !== 0) {
112
+ if (DENIED.test(result.stderr ?? "")) return operator(), false;
113
+ throw fail(1, `tailscale serve --bg --https=443 ${target} failed: ${errorOf(result)}.`);
114
+ }
115
+ const { config } = serveConfig();
116
+ if (handlerOf(config ?? {}, host)?.Proxy !== target) throw fail(1, `tailscale serve did not serve ${target} at https://${host}/ (tailscale serve status shows what it serves).`);
117
+ writeFileSync(state, `${JSON.stringify({ url: `https://${host}/`, proxy: target })}\n`, { mode: 0o600 });
118
+ say(`AgentRun is on your tailnet at https://${host}/ (tailscale serve): only your devices on your tailnet open it; nothing is on the public internet.`);
119
+ say(`It asks for a setup code on the first visit: the newest "Set up this server" line in ${join(root, "logs", "agentrun.log")} has the link.`);
120
+ say(PRICE);
121
+ return true;
122
+ },
123
+ /** Removes the serve entry this added, when it is still the one there; never another. The record stays while
124
+ * Tailscale's settings can't be read or change, so running it again finishes the job. */
125
+ off(retry = again) {
126
+ const had = recorded();
127
+ if (!had) return;
128
+ const host = URL.canParse(had.url) ? new URL(had.url).hostname : "";
129
+ const { config, denied, missing, error } = serveConfig();
130
+ if (denied) return operator(retry);
131
+ if (config === undefined && !missing) {
132
+ // The entry may still be in Tailscale's settings (tailscaled stopped keeps them), so the record stays for the next run.
133
+ say(`AgentRun's entry at https://${host}/ may still be in Tailscale's serve settings, and they can't be read now (${error || "no answer"}). Start Tailscale, then run again: ${retry}`);
134
+ return;
135
+ }
136
+ // With Tailscale gone, what it served went with it.
137
+ if (config !== undefined && handlerOf(config, host)?.Proxy === had.proxy) {
138
+ const result = run(["serve", "--https=443", "off"]);
139
+ if (result.status !== 0) {
140
+ if (DENIED.test(result.stderr ?? "")) return operator(retry);
141
+ throw fail(1, `tailscale serve --https=443 off failed: ${errorOf(result)}.`);
142
+ }
143
+ say(`Removed AgentRun from your tailnet (tailscale serve --https=443 off): https://${host}/ serves nothing now.`);
144
+ }
145
+ rmSync(state, { force: true });
146
+ },
147
+ };
148
+ }
149
+
150
+ /** The installer's step for an AgentRun in the background. Exit 1 on a refusal, said on stderr. */
151
+ function script([verb, port, again, url]) {
152
+ const fail = (code, message) => Object.assign(new Error(message), { code });
153
+ // `address` prints the address alone on stdout, for the installer to read; what it says goes to stderr.
154
+ const say = (line) => (verb === "address" ? process.stderr : process.stdout).write(`${line}\n`);
155
+ const exec = (command, args, options = {}) => spawnSync(command, args, { encoding: "utf8", ...options });
156
+ const tailnet = tailnetOf({ exec, say, fail, again });
157
+ try {
158
+ if (verb === "address") {
159
+ const at = tailnet.address(targetOf(port));
160
+ if (at) process.stdout.write(`${at.url}\n`);
161
+ } else if (verb === "serve") tailnet.serve(port, new URL(url).hostname);
162
+ else if (verb === "off") tailnet.off();
163
+ else throw fail(2, `tailscale.mjs takes address, serve or off, not ${verb}`);
164
+ return 0;
165
+ } catch (error) {
166
+ process.stderr.write(`agentrun: ${error.message}\n`);
167
+ return error.code ?? 1;
168
+ }
169
+ }
170
+
171
+ // The installer runs this on the Node it installed, inside the engines floor, where import.meta.main is set.
172
+ if (import.meta.main) process.exitCode = script(process.argv.slice(2));
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@parcha/agentrun",
3
- "version": "0.4.11",
3
+ "version": "0.4.12",
4
4
  "description": "AgentRun, the open-source platform that supercharges your agents (self-improvement, durable execution and a control plane on top of your favorite agent harness), on this machine with one command: npx @parcha/agentrun",
5
5
  "type": "module",
6
6
  "license": "Apache-2.0",
@@ -11,12 +11,13 @@
11
11
  "bin",
12
12
  "lib",
13
13
  "skills",
14
+ "install.sh",
14
15
  "README.md",
15
16
  "LICENSE",
16
17
  "NOTICE"
17
18
  ],
18
19
  "dependencies": {
19
- "@parcha/agentrun-serve": "0.1.0-beta.43"
20
+ "@parcha/agentrun-serve": "0.1.0-beta.44"
20
21
  },
21
22
  "scripts": {
22
23
  "test": "node --test 'test/*.test.mjs'"
@@ -145,8 +145,10 @@ Two clients call the same API from code, with the same server and token. `@parch
145
145
  - `agentrun runs`: archive, cancel, computer-call, computer-release, create-inline-run, files, get, grade-run, graph, hand-back-run-computer, learning, learning-diff, list, message, pause, raise-cap, read-file, resume, start, start-held, stop, take-over-run-computer, timeline, unarchive, wait
146
146
  - `agentrun sdk-runs`: complete, events, get, start
147
147
  - `agentrun server`: capabilities, health, mcp, openapi
148
+ - `agentrun service`: install, logs, restart, start, status, stop, uninstall, upgrade
148
149
  - `agentrun skill`: install
149
150
  - `agentrun stats`: Counts and cost over every agent and run
151
+ - `agentrun stop`: Stop the AgentRun the installer started in the background, where there is no service manager (exit 0 stopped, 3 none running)
150
152
  - `agentrun template`: apply, delete, eval, import, install, list, validate
151
153
  - `agentrun tool-keys`: list
152
154
  - `agentrun tool-settings`: get, save
@@ -671,6 +671,7 @@ Route: `POST /runs`.
671
671
  - `--effort low|medium|high` (string, one of these): How hard a run works. It sets the model's thinking level, and adds a short note on how to work right after the agent's instructions, on every harness: low answers directly, medium plans briefly and checks once, high plans each part, fills the gaps and reviews. A run started with none thinks at its agent revision's own thinking level, else the host's default, and gets no note.
672
672
  - `--max-cost-usd NUMBER` (number): This run's cap, for every turn of it. Default the definition's `max_cost_usd`, else the effort default.
673
673
  - `--quote-id STRING` (string): Run at a quote's terms. A different `effort` or `max_cost_usd` than the quote's is `409 quote_invalid`.
674
+ - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run look-back). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call.
674
675
  - `--workflow-first` (boolean): Whether a run of an agent that learns may start on one of its learned workflows. On (absent or true), a run whose input fits exactly one active learned workflow (its input schema has a required field, and the run's input passes it) runs that workflow first, with no turn of the agent's model: its answer is the run's answer, and if it hands the job back (it escalates, a step fails), the same run goes on with the agent, given what the workflow found. The run keeps which path it took: `workflow`, `handed_back` or `agent`. false: the agent takes the run from its first turn.
675
676
  - `--learning use` (string, one of these): `use`: the run starts from what its agent learned (its notes, learned skills and learned workflows, as a run that learns is given them), whatever its agent's `learning` says, and keeps nothing: no end-of-run turn, no proposal, no grade and no merge, at its end or after a follow-up. Its `learning` reads `seeded` while it runs, then `dropped` with reason `use`. So many runs of one agent read one learned state, frozen (a held-out evaluation). On a server whose learning is off it is given nothing, as every run there. Absent: the agent's own (`learning: true` learns). 422 not_an_option for anything else.
676
677
  - `--repo STRING` (string): The GitHub repository (`owner/name`) this run reaches: the one its GitHub App token is made for, so its github MCP calls are scoped to it. It must be one the agent is bound to (a repository its GitHub triggers' `accept` names on `/repository/full_name`); another is 422 at `repo` in words naming the repositories it is bound to. Absent: the agent's repository when it is bound to exactly one and the first message names none; otherwise the repository a `https://github.com/<owner>/<repo>` URL in the first message names. A run a trigger starts takes its repository from its event, and `repo` there is 422.
@@ -754,6 +755,7 @@ Route: `POST /runs/{run_id}/messages`.
754
755
 
755
756
  - `--idempotency-key STRING` (string): Makes a create safe to retry. The same key and body within `limits.idempotency_ttl_s` replays the first
756
757
  - `--content STRING` (string, required): At most `limits.max_message_chars`. Not only whitespace.
758
+ - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run look-back). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call. On a message it replaces the run's key from the run's next model request on, a turn still going included, and it is the first key of a run that started on the server's (mint one per turn); a message without one keeps the key the run holds, which is none once its last turn ended: then, where the server holds no key for the run's model, the message is 422 `model_key_required` and nothing is written.
757
759
  - `--body JSON|@FILE|-` (application/json, required): The whole body: inline, from a file or from stdin. The flags above win over a JSON body's fields.
758
760
  - `--body-type TYPE` (string): The body's type, one of application/json; any other than JSON is sent as given.
759
761
 
@@ -798,6 +800,7 @@ Route: `POST /agents/{agent_id}/runs`.
798
800
  - `--effort low|medium|high` (string, one of these): How hard a run works. It sets the model's thinking level, and adds a short note on how to work right after the agent's instructions, on every harness: low answers directly, medium plans briefly and checks once, high plans each part, fills the gaps and reviews. A run started with none thinks at its agent revision's own thinking level, else the host's default, and gets no note.
799
801
  - `--max-cost-usd NUMBER` (number): This run's cap, for every turn of it. Default the definition's `max_cost_usd`, else the effort default.
800
802
  - `--quote-id STRING` (string): Run at a quote's terms. A different `effort` or `max_cost_usd` than the quote's is `409 quote_invalid`.
803
+ - `--model-key STRING` (string): The run's own model key: a key for the model gateway at AGENT_MODEL_BASE_URL, such as a LiteLLM virtual key minted for this run, which every model request tied to the run carries in place of the server's own key (its turns, its subagents, its learned workflows' nodes, a workflow's model nodes, its end-of-run look-back). AgentRun never mints, lists or revokes it. Sealed into the run's launch bound to the gateway's origin, read at each claim (a reclaim after a crash among them), erased by the write that ends the run's turn; never in its saved body, its timeline, its view, a log or an Idempotency-Key's fingerprint (a retry with a new key answers the first request's run, its first key kept). The harness, its tools and its sandbox never see it. 422 at `model_key` when the run's model never goes to that gateway (no AGENT_MODEL_BASE_URL here, a native run, or a model routed elsewhere). Absent, the run spends on the server's key for its route; where the server holds none (no AGENT_MODEL_API_KEY, none saved in Settings), a start without it is 422 `model_key_required`, never a failure at its first model call.
801
804
  - `--workflow-first` (boolean): Whether a run of an agent that learns may start on one of its learned workflows. On (absent or true), a run whose input fits exactly one active learned workflow (its input schema has a required field, and the run's input passes it) runs that workflow first, with no turn of the agent's model: its answer is the run's answer, and if it hands the job back (it escalates, a step fails), the same run goes on with the agent, given what the workflow found. The run keeps which path it took: `workflow`, `handed_back` or `agent`. false: the agent takes the run from its first turn.
802
805
  - `--learning use` (string, one of these): `use`: the run starts from what its agent learned (its notes, learned skills and learned workflows, as a run that learns is given them), whatever its agent's `learning` says, and keeps nothing: no end-of-run turn, no proposal, no grade and no merge, at its end or after a follow-up. Its `learning` reads `seeded` while it runs, then `dropped` with reason `use`. So many runs of one agent read one learned state, frozen (a held-out evaluation). On a server whose learning is off it is given nothing, as every run there. Absent: the agent's own (`learning: true` learns). 422 not_an_option for anything else.
803
806
  - `--repo STRING` (string): The GitHub repository (`owner/name`) this run reaches: the one its GitHub App token is made for, so its github MCP calls are scoped to it. It must be one the agent is bound to (a repository its GitHub triggers' `accept` names on `/repository/full_name`); another is 422 at `repo` in words naming the repositories it is bound to. Absent: the agent's repository when it is bound to exactly one and the first message names none; otherwise the repository a `https://github.com/<owner>/<repo>` URL in the first message names. A run a trigger starts takes its repository from its event, and `repo` there is 422.
@@ -940,6 +943,65 @@ This document.
940
943
 
941
944
  Route: `GET /openapi.json`.
942
945
 
946
+ ## service
947
+
948
+ ### `agentrun service install`
949
+
950
+ Install AgentRun as a service of this user and start it: it keeps running after the terminal closes and starts again at login.
951
+
952
+ Route: none, it runs on this machine.
953
+
954
+ - `--port N` (string, this CLI's own): the port to listen on (default: the first free from 7340; 7340 with --tailscale)
955
+ - `--data DIR` (string, this CLI's own): the data directory (default ~/.agentrun)
956
+ - `--tailscale` (boolean, this CLI's own): also serve it over HTTPS on your own tailnet only (tailscale serve, never Funnel); --no-tailscale takes it off
957
+
958
+ ### `agentrun service logs`
959
+
960
+ Print the service's log, ~/.agentrun/logs/agentrun.log.
961
+
962
+ Route: none, it runs on this machine.
963
+
964
+ - `--lines N` (string, this CLI's own): how many of its last lines (default 50)
965
+ - `--follow` (boolean, this CLI's own): and keep printing what comes (-f)
966
+
967
+ ### `agentrun service restart`
968
+
969
+ Restart the service and wait until it answers.
970
+
971
+ Route: none, it runs on this machine.
972
+
973
+ ### `agentrun service start`
974
+
975
+ Start the service and wait until it answers.
976
+
977
+ Route: none, it runs on this machine.
978
+
979
+ ### `agentrun service status`
980
+
981
+ Say whether the service is installed and running, the console's address and its health (exit 0 healthy, 1 not, 3 not installed).
982
+
983
+ Route: none, it runs on this machine.
984
+
985
+ ### `agentrun service stop`
986
+
987
+ Stop the service (it starts again at the next login).
988
+
989
+ Route: none, it runs on this machine.
990
+
991
+ ### `agentrun service uninstall`
992
+
993
+ Stop the service and remove it, and the tailscale serve entry --tailscale added; the data directory stays.
994
+
995
+ Route: none, it runs on this machine.
996
+
997
+ ### `agentrun service upgrade`
998
+
999
+ Install another version with the installer, then restart the service on it.
1000
+
1001
+ Route: none, it runs on this machine.
1002
+
1003
+ - `--version V` (string, this CLI's own): the version or npm tag (default: latest)
1004
+
943
1005
  ## skill
944
1006
 
945
1007
  ### `agentrun skill install`
@@ -964,6 +1026,14 @@ Route: `GET /stats`.
964
1026
  - `--to STRING` (string): Runs started before this RFC 3339 date-time, to the millisecond (a finer fraction is a 400). Default no bound.
965
1027
  - `--agent STRING` (string): One agent's runs.
966
1028
 
1029
+ ## stop
1030
+
1031
+ ### `agentrun stop`
1032
+
1033
+ Stop the AgentRun the installer started in the background, where there is no service manager (exit 0 stopped, 3 none running).
1034
+
1035
+ Route: none, it runs on this machine.
1036
+
967
1037
  ## template
968
1038
 
969
1039
  ### `agentrun template apply TEMPLATE`