The whole hunk
from line 302, old and new numbered
/
lines
from line 302
302302
303303 <MultiFileExample language="cli" label="CLI">
304304 ```bash CLI
305 { read -r _ agent_id; read -r _ agent_version; } < <(ant beta:agents create \
306 --transform '{id,version}' --format yaml < task-runner.agent.yaml)
305 ant apply agent.md
307306
308307 session_id=$(ant beta:sessions create \
309308 --agent "{type: agent, id: $agent_id, version: $agent_version}" \
from line 317
318317 ant beta:sessions:events send \
319318 --session-id "$session_id" \
320319 --event "{type: user.message, content: [{type: text, text: \"$task\"}]}" \
321 > /dev/null
320 > /dev/null
322321
323322 # Wait for the session to go idle (grep exits at the first match)
324323 grep -m1 -x 'session.status_idle' <&"$stream" > /dev/null
from line 324
325324 exec {stream}<&-
326325 ```
327326
328 <File filename="task-runner.agent.yaml">
329 ```yaml
327 <File filename="agent.md">
328 ```markdown
329 ---
330330 name: Task Runner
331331 model: claude-opus-5
332332 tools:
333333 - type: agent_toolset_20260401
334 ---
334335 ```
335336 </File>
336337 </MultiFileExample>
from line 1335
13341335
13351336 <MultiFileExample language="cli" label="CLI">
13361337 ```bash CLI
1337 ant beta:agents update --agent-id "$AGENT_ID" < agent.yaml
1338 ant apply agent.md
13381339 ```
13391340
1340 <File filename="agent.yaml">
1341 ```yaml
1341 <File filename="agent.md">
1342 ```markdown
1343 ---
13421344 name: Task Runner
13431345 model: claude-opus-5
1344 system: You are a task automation agent. Complete the task you are given end to end.
13451346 tools:
13461347 - type: agent_toolset_20260401
1348 ---
1349
1350 You are a task automation agent. Complete the task you are given end to end.
13471351 ```
13481352 </File>
13491353 </MultiFileExample>