Skip to content

docs(examples): add subagents and AG-UI runnable examples - #1895

Merged
edenreich merged 3 commits into
mainfrom
fix/issue-1891
Nov 17, 2026
Merged

edenreich merged 3 commits into
mainfrom
fix/issue-1891

Conversation

@inference-gateway-maintainer

@inference-gateway-maintainer inference-gateway-maintainer Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

Resolves #1891

Summary

Adds the two runnable examples the issue asks for: examples/subagents shows the Agent tool fanning out two tasks (one naming a Markdown-defined agent through agent) and folding both results back into one tool result, and examples/ag-ui consumes the AG-UI headless stream and the --serve worker with a small Go program. Both run offline against the tokenless mock like examples/tools - no API key, no gateway. Per maintainer feedback the ag-ui consumer is written in Go, not Python, so no python3 is needed.

Changes

  • examples/subagents/ (README.md, Taskfile.yml, scenarios.yaml, .agents/agents/researcher.md): a Markdown agent preset with name, description, a tools: [Read, Grep] allowlist, model: inherit and a system-prompt body; task list runs infer agents list; task fanout (in --mode auto) calls Agent with two tasks - one through agent: researcher, one plain; task fanout:name shows the description shorthand; Taskfile sets INFER_TOOLS_AGENT_WAIT=true for the deterministic fan-in. The README documents the knobs the run depends on: tools.agent.max_parallel, max_depth, idle_timeout, inherit_mock, wait, mode, and task chat.
  • examples/ag-ui/ (README.md, Taskfile.yml, scenarios.yaml, main.go): a stdlib-only Go program, go run . stream | serve [--approval]; task stream pipes infer headless --format ag-ui --no-save through the program, printing RUN_STARTED, TOOL_CALL_START, TOOL_CALL_RESULT, TEXT_MESSAGE_CONTENT and RUN_FINISHED with each row mapped to a section of docs/ag-ui-output.md; task serve spawns infer headless --serve --session-id ag-ui-serve-demo, writes two run_agent_input frames to stdin (one AG-UI run per frame) and closes stdin to shut the worker down; task serve:approval does the same with --require-approval and answers one interrupt over stdin with a resume frame.
  • docs/examples.md: indexes both examples in the runnable examples table.

Validation

  • Ran every scenario against the locally built binary from this branch with the mock gateway: task list, task fanout, task fanout:name in examples/subagents; task stream, task serve, task serve:approval in examples/ag-ui. The approval variant suspends on the Write call with RUN_FINISHED interrupt and completes after the resume answer, exactly as docs/ag-ui-output.md documents.
  • Re-ran task stream, task serve and task serve:approval after the Python-to-Go port with identical output, and go vet plus golangci-lint (0 issues) on examples/ag-ui.
  • markdownlint clean on both READMEs and on docs/examples.md; the pre-commit gate (mod:tidy, fmt, lint:imports, golangci-lint, markdownlint) passed on commit.
  • The runner environment exports INFER_AGENT_MODEL and INFER_TOOLS_*_REQUIRE_APPROVAL, so the offline validation shim set the mock model and restored approval defaults explicitly; shipped example files carry no such overrides.

no docs ticket: examples and their docs live in this repo and are indexed by docs/examples.md
Docs mirror ticket: inference-gateway/docs#1255

@edenreich

Copy link
Copy Markdown
Contributor

@infer if you need to provide an example please write it in go.

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.9 · CLI: v0.262.0 · Gateway: v0.67.1 · View Job

Todos

  • Port examples/ag-ui consumer from Python to Go (replace consume.py with a Go program)
  • Update Taskfile.yml and README.md to use the Go consumer
  • Validate hermetically: stream, serve, serve:approval with mock gateway
  • Run checks (gofmt, golangci-lint, markdownlint) then commit and push
  • Update PR docs(examples): add subagents and AG-UI runnable examples #1895 description to reflect the Go port

Pull Request

#1895

✅ Infer Result: Success

Memory updated. Closing out the todos:

Done. The example code is now in Go, per your ask - the Python consumer is gone.

What changed

examples/ag-ui consumer ported from Python to Go (commit 2b4b6bff):

  • Deleted consume.py and added examples/ag-ui/main.go - a stdlib-only package main (bufio/json/os/exec only) with the same printed lines and the same stdin frame protocol: main.go stream reads one infer headless --format ag-ui run from stdin by type, main.go serve [--approval] spawns infer headless --serve --session-id ag-ui-serve-demo, writes the run_agent_input frames, answers one interrupt with a resume frame in the --approval variant, and closes stdin to shut the worker down. It keeps the INFER env override for pointing at a local build.
  • The program is a member of the root Go module, so it needs no separate go.mod and builds with the repo's toolchain (go build ./... covers it now).
  • Taskfile.yml: stream, serve and serve:approval now go through go run . [...]; README updated accordingly (needs a Go toolchain instead of python3), and docs/examples.md describes the ag-ui example as "a small Go program". The examples/subagents example ships no code, so nothing to port there.
  • PR docs(examples): add subagents and AG-UI runnable examples #1895 description updated to reflect the port.

Validation

  • Re-ran all three scenarios hermetically on this runner (mock gateway, hermetic HOME, wrapper exporting INFER_AGENT_MODEL=mock/openai/gpt-4o and unsetting the runner's auto-approval vars): task stream, task serve and task serve:approval produce output identical to the Python version and to the README's "What to expect" - the approval variant suspends on Write with RUN_FINISHED interrupt, resumes after the resume answer, and writes the marker file (whose clean task ran before committing). Also re-ran after a lint-driven simplification of the serve control flow.
  • task precommit:run (mod:tidy, fmt, lint:imports, golangci-lint, markdownlint) passes with 0 issues, so the program is lint-clean as part of the root module; go vet clean.

Skipped/risks: the README's "What to expect" sample still shows streamed text as single chunks (mock chunking can split lines like Hello from run o/ne. - same as before, purely cosmetic); RUN_STARTED/RUN_FINISHED on malformed events print <nil> where Python printed None/empty, which never occurs with real or mock output.

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.9 · CLI: v0.262.0 · Gateway: v0.67.1 · Exit Code: 0 · Duration: 8m 22s

Tokens: 4,044,723 in · 43,852 out · 4,088,575 total (59 requests)

Tool calls: 62 total · 100% success rate

Traces
Session: 1794924900-dc530910

session (headless, success)                                                                        8m15s
├── chat ollama_cloud/glm-5.3-flash                                                                 4.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        4.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.4s
├── execute_tool Memory call_yijwkf05                                                              130µs
├── execute_tool Read call_exg9rs30                                                                266µs
├── chat ollama_cloud/glm-5.3-flash                                                                21.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      21.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    21.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       21.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                21.4s
├── execute_tool Read call_iu19qqoo                                                                285µs
├── execute_tool Read call_oiv2gqzy                                                                248µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1m7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1m7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1m7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1m7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1m7s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool TodoWrite call_rbxl17l4                                                            66µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.1s
├── execute_tool Read call_y1adpd9o                                                                287µs
├── execute_tool Read call_wwe9xvt6                                                                339µs
├── execute_tool Read call_xba05k2x                                                                335µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1m2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1m2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1m2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1m2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1m2s
├── chat ollama_cloud/glm-5.3-flash                                                                10.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       10.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.7s
├── execute_tool Write call_iqwk5yia                                                                 1ms
├── chat ollama_cloud/glm-5.3-flash                                                                12.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      12.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    12.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       12.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                12.8s
├── execute_tool MultiEdit call_8z4ywoyw                                                           502µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.6s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.6s
├── execute_tool MultiEdit call_5c337yzy                                                           405µs [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 1.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.7s
├── execute_tool Read call_i2g46zli                                                                262µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.3s
├── execute_tool MultiEdit call_6pmq0peu                                                           491µs
├── chat ollama_cloud/glm-5.3-flash                                                                 6.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       6.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     6.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        5.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.9s
├── execute_tool MultiEdit call_6aqr4wkl                                                           506µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool Edit call_6flx797z                                                                472µs
├── execute_tool Delete call_2fy29hqd                                                              333µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.9s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.9s
├── execute_tool Write call_zqxjzu20                                                               881µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.1s
├── execute_tool Bash call_3i6td0v6                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool Bash call_ykhrcext                                                                  1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool Wait call_3k8z1aix                                                                 1m5s
├── chat ollama_cloud/glm-5.3-flash                                                                 3.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.5s
├── execute_tool Bash call_7ldewkcd                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.2s
├── execute_tool Bash call_13o3ues8                                                                705ms [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
├── execute_tool Read call_xl84fhkr                                                                285µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.1s
├── execute_tool Edit call_ufc0anan                                                                597µs
├── chat ollama_cloud/glm-5.3-flash                                                                872ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      864ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    859ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       859ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                859ms
├── execute_tool Bash call_blzxvv7n                                                                 52ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.4s
├── execute_tool Bash call_lqv16igj                                                                  1ms
│   ╰── session [infer-action, internal] (headless, success)                                       444ms
│       ├── chat mock/openai/gpt-4o [infer-action, client]                                          10ms
│       ├── execute_tool Grep [infer-action, internal] call_0_0                                    759µs
│       ╰── chat mock/openai/gpt-4o [infer-action, client]                                           4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
├── execute_tool Wait call_xwkmgn8v                                                                500ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool BashOutput call_9pepbjkd                                                           46µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Bash call_agbszwzd                                                                  3ms
│   ├── session [infer-action, internal] (headless, success)                                       386ms
│   │   ╰── chat mock/openai/gpt-4o [infer-action, client]                                          11ms
│   ╰── session [infer-action, internal] (headless, success)                                        26ms
│       ╰── chat mock/openai/gpt-4o [infer-action, client]                                           5ms
├── chat ollama_cloud/glm-5.3-flash                                                                777ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      767ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    761ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       760ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                760ms
├── execute_tool Wait call_ru8el8sl                                                                501ms
├── chat ollama_cloud/glm-5.3-flash                                                                722ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      715ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    709ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       709ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                709ms
├── execute_tool BashOutput call_jiqwrprh                                                           47µs
├── chat ollama_cloud/glm-5.3-flash                                                                 4.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        4.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.4s
├── execute_tool Bash call_a3a7874t                                                                  1ms
│   ╰── session [infer-action, internal] (headless, success)                                       412ms
│       ├── chat mock/openai/gpt-4o [infer-action, client]                                          12ms
│       ├── execute_tool Write [infer-action, internal] call_0_0                                   661µs
│       ╰── chat mock/openai/gpt-4o [infer-action, client]                                           3ms
├── chat ollama_cloud/glm-5.3-flash                                                                905ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      897ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    883ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       883ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                883ms
├── execute_tool Wait call_do0ko6tr                                                                500ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.4s
├── execute_tool BashOutput call_63chzfwb                                                           55µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.4s
├── execute_tool Bash call_p2z1lbqv                                                                 39ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.9s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.9s
├── execute_tool Bash call_ect1d75q                                                                  6ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool Bash call_wdftdfcf                                                                  9ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool Bash call_ww1fftme                                                                  2ms
├── chat ollama_cloud/glm-5.3-flash                                                                884ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      879ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    872ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       872ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                872ms
├── execute_tool Wait call_hgafpo8r                                                                1m14s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
├── execute_tool BashOutput call_grwx8s52                                                           69µs
├── chat ollama_cloud/glm-5.3-flash                                                                22.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      22.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    22.6s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       22.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                22.6s
├── execute_tool MultiEdit call_7okee110                                                           661µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.9s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.9s
├── execute_tool Bash call_l7d8c1hg                                                                  3ms
│   ╰── session [infer-action, internal] (headless, success)                                       380ms
│       ├── chat mock/openai/gpt-4o [infer-action, client]                                          11ms
│       ├── execute_tool Write [infer-action, internal] call_0_0                                   801µs
│       ╰── chat mock/openai/gpt-4o [infer-action, client]                                           5ms
├── chat ollama_cloud/glm-5.3-flash                                                                930ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      909ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    900ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       900ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                900ms
├── execute_tool Wait call_olluzttp                                                                501ms
├── chat ollama_cloud/glm-5.3-flash                                                                906ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      897ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    891ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       891ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                891ms
├── execute_tool BashOutput call_i3oge737                                                           62µs
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Bash call_rnbf7w99                                                                  2ms
│   ├── session [infer-action, internal] (headless, success)                                       381ms
│   │   ╰── chat mock/openai/gpt-4o [infer-action, client]                                          11ms
│   ╰── session [infer-action, internal] (headless, success)                                        26ms
│       ╰── chat mock/openai/gpt-4o [infer-action, client]                                           4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.2s
├── execute_tool Wait call_49aig7vy                                                                501ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.2s
├── execute_tool BashOutput call_zvpzg2hx                                                           71µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.1s
├── execute_tool Bash call_h8lrxub4                                                                 41ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool Bash call_s6cy2m85                                                                  8ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      999ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    993ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       993ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                993ms
├── execute_tool Bash call_7f5hzabe                                                                  1ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
├── execute_tool Wait call_zpd5b3rk                                                                 4.5s
├── chat ollama_cloud/glm-5.3-flash                                                                 5.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        5.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.7s
├── execute_tool Bash call_eaue0wd7                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.3s
├── execute_tool Bash call_wupzhn2w                                                                 5.5s
├── chat ollama_cloud/glm-5.3-flash                                                                888ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      878ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    870ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       870ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                870ms
├── execute_tool Bash call_b8kx1f75                                                                 2.1s
├── chat ollama_cloud/glm-5.3-flash                                                                 7.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       7.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     7.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        7.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 7.3s
├── execute_tool TodoWrite call_44zwnjnl                                                            66µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.1s
├── execute_tool Bash call_q4sh5gy1                                                                426ms
├── chat ollama_cloud/glm-5.3-flash                                                                10.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       10.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.7s
├── execute_tool Write call_p9sfsfw0                                                               701µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.1s
├── execute_tool Bash call_tql2mjed                                                                 2.0s
├── chat ollama_cloud/glm-5.3-flash                                                                 7.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       7.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     7.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        7.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 7.7s
├── execute_tool Bash call_bl3ebdku                                                                  6ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.8s
├── execute_tool Memory call_w2m9llrv                                                               2.0s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
├── execute_tool TodoWrite call_6y62rs2i                                                            63µs
╰── chat ollama_cloud/glm-5.3-flash                                                                 5.7s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.7s
        ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.7s
            ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        5.7s
                ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.7s
Stats
Tool Calls

╭────────────┬───────┬───────┬─────────╮
│ Tool       │ Calls │ Fail% │ Avg     │
├────────────┼───────┼───────┼─────────┤
│ Bash       │ 23    │ 4%    │ 476ms   │
│ Wait       │ 8     │ 0%    │ 18188ms │
│ Read       │ 8     │ 0%    │ 286µs   │
│ BashOutput │ 6     │ 0%    │ 57µs    │
│ MultiEdit  │ 5     │ 20%   │ 474µs   │
│ TodoWrite  │ 3     │ 0%    │ 57µs    │
│ Write      │ 3     │ 0%    │ 863µs   │
│ Edit       │ 2     │ 0%    │ 527µs   │
│ Memory     │ 2     │ 0%    │ 1004ms  │
│ Delete     │ 1     │ 0%    │ 328µs   │
╰────────────┴───────┴───────┴─────────╯

Token Usage

╭────────────────────────────┬─────────┬─────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached  │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼─────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 4044723 │ 3310720 │ 43852      │ 4088575 │ -    │
╰────────────────────────────┴─────────┴─────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

@edenreich

Copy link
Copy Markdown
Contributor

@infer there is a merge conflict, can you resolve this?

@inference-gateway-maintainer

inference-gateway-maintainer Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor Author

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.9 · CLI: v0.262.0 · Gateway: v0.67.1 · View Job

Todos

  • Fetch origin and inspect how main diverged from the PR branch
  • Identify the conflicting files and their content on both sides
  • Merge origin/main into fix/issue-1891 and resolve conflicts (rebase-equivalent replay, 3 commits)
  • Verify replayed diff matches the original PR diff (examples byte-identical, docs merged)
  • Push the replayed branch to PR docs(examples): add subagents and AG-UI runnable examples #1895

Pull Request

#1895

✅ Infer Result: Success

Merge conflict resolved and pushed - GitHub now reports PR #1895 as mergeable: MERGEABLE.

What the conflict was

Only docs/examples.md: three commits landed on main since this PR branched (PRs #1893, #1894, #1896), and two of them added rows to the runnable examples table at the same spot this PR did - right after the tools row (scheduling + heartbeat). No other file overlapped.

How I resolved it

git merge is not available on this CI runner, so I did a rebase-equivalent: reset onto the current main tip (d9962730) and replayed the PR's three commits byte-faithfully, then force-pushed with --force-with-lease:

  • 3cca5aae docs(examples): add a subagents example with a Markdown agent preset
  • fae077e1 docs(examples): add an ag-ui stream and serve example
  • e04ad86f docs(examples): replace the ag-ui Python consumer with a Go program

The conflicted table now carries both sides: tools → subagents → ag-ui → scheduling → heartbeat, with main's skills/plugins/hooks block untouched further down. Commit messages were preserved exactly.

Verification

  • The example files were restored directly from the original commit blobs: git diff <old-pr-tip> HEAD -- examples shows no changes to examples/ag-ui/ or examples/subagents/, so they are byte-identical to what you already reviewed.
  • The branch's total diff vs main is 9 files, 689 insertions - exactly the PR's original shape.
  • Every replayed commit ran the repo's pre-commit gate (mod:tidy, gofmt, lint:imports, golangci-lint: 0 issues, markdownlint) and passed.
  • gh pr view 1895 --json mergeable returns MERGEABLE; the current mergeStateStatus: BLOCKED is just the required checks re-running on the force push, not a conflict.
  • git status is clean and the branch is fully pushed.

Heads up: resolving this rewrote the branch history (no merge commit was added - the three commits were re-parented onto main), so anyone with a local checkout of fix/issue-1891 should git fetch and reset to the new tip before continuing.

Skipped re-running the example demos end to end (content is byte-identical to the already-validated version) and a full task test (docs-only replay, lint gate passed per commit) - the only real risk is the force push, which is expected by anyone tracking the branch.

Model: ollama_cloud/glm-5.3-flash · Action: v0.59.9 · CLI: v0.262.0 · Gateway: v0.67.1 · Exit Code: 0 · Duration: 6m 27s

Tokens: 2,200,477 in · 30,687 out · 2,231,164 total (41 requests)

Tool calls: 40 total · 100% success rate

Traces
Session: 1794927471-72e495c9

session (headless, success)                                                                        6m19s
├── chat ollama_cloud/glm-5.3-flash                                                                29.9s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      29.9s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    29.9s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       29.9s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                29.9s
├── execute_tool TodoWrite call_otg8x9nx                                                            62µs
├── chat ollama_cloud/glm-5.3-flash                                                                17.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      17.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    17.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       17.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                17.8s
├── execute_tool Bash call_hl4lwy9q                                                                328ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.7s
├── execute_tool Bash call_xvht6db5                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.0s
├── execute_tool Bash call_jjzh9hbq                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.5s
├── execute_tool Bash call_xzmlimq5                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 4.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        4.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.8s
├── execute_tool Bash call_7bdulehd                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.0s
├── execute_tool Bash call_9itq89jv                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                801ms
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      795ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    792ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       792ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                792ms
├── execute_tool Bash call_h1v0eh95                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                22.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      22.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    22.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       22.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                22.8s
├── execute_tool Bash call_76l5r6dt                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool Bash call_os4mfaht                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                20.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      20.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    20.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       20.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                20.2s
├── execute_tool Bash call_nh7kg0uv                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                33.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      33.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    33.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       33.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                33.3s
├── execute_tool Bash call_w4tfe0d9                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.0s
├── execute_tool Bash call_47pqoa0f                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                11.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      11.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    11.6s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       11.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                11.6s
├── execute_tool Bash call_cozg2zqh                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                24.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      24.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    24.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       24.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                24.3s
├── execute_tool Bash call_nwsejzom                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
├── execute_tool Bash call_miqy377b                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                10.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       10.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.3s
├── execute_tool Bash call_chz2adxp                                                                 10ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.5s
├── execute_tool Bash call_gu7x8kgl                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.3s
├── execute_tool Bash call_4sfv9smt                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                      999ms
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    995ms
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       995ms
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                995ms
├── execute_tool Bash call_6yumhc45                                                                1m36s
├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
├── execute_tool Bash call_knvs6q5f                                                                  6ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
├── execute_tool Read call_up8sqhqy                                                                273µs
├── chat ollama_cloud/glm-5.3-flash                                                                 3.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.0s
├── execute_tool Edit call_4cmqnffl                                                                407µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.6s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.6s
├── execute_tool Bash call_tcxrjhh5                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.0s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.0s
├── execute_tool Bash call_ily7xoje                                                                 5.3s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.2s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.2s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.2s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.2s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.2s
├── execute_tool Bash call_o7wszedo                                                                  5ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.4s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.4s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.4s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.4s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.4s
├── execute_tool Edit call_bms05u29                                                                383µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.7s
├── execute_tool Delete call_1qx2kp27                                                              302µs [error: tool_error]
├── chat ollama_cloud/glm-5.3-flash                                                                 3.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.3s
├── execute_tool Bash call_jgiyhaxc                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 2.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.5s
├── execute_tool Bash call_mdcfnbgt                                                                  7ms
├── chat ollama_cloud/glm-5.3-flash                                                                 1.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.8s
├── execute_tool Bash call_rh1o99g1                                                                 5.3s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.7s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.7s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.7s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.7s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.7s
├── execute_tool TodoWrite call_12p9af1g                                                            54µs
├── chat ollama_cloud/glm-5.3-flash                                                                 4.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       4.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     4.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        4.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 4.1s
├── execute_tool Bash call_tlabgjf1                                                                  4ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.5s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.5s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.5s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.5s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.5s
├── execute_tool Bash call_cjxjmrmq                                                                  3ms
├── chat ollama_cloud/glm-5.3-flash                                                                 3.6s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       3.6s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     3.6s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        3.6s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 3.6s
├── execute_tool TodoWrite call_h9zrumqt                                                            51µs
├── chat ollama_cloud/glm-5.3-flash                                                                 1.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       1.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     1.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        1.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 1.3s
├── execute_tool Bash call_h0lppb6i                                                                 3.6s
├── chat ollama_cloud/glm-5.3-flash                                                                 5.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       5.1s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     5.1s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        5.1s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 5.1s
├── execute_tool Bash call_uv3o129j                                                                  6ms
├── chat ollama_cloud/glm-5.3-flash                                                                 7.1s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       7.0s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     7.0s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        7.0s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 7.0s
├── execute_tool Bash call_vwmutiwx                                                                881ms
├── chat ollama_cloud/glm-5.3-flash                                                                 7.8s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       7.8s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     7.8s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        7.8s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 7.8s
├── execute_tool Memory call_3mbcgy3x                                                               1.3s
├── chat ollama_cloud/glm-5.3-flash                                                                 2.3s
│   ╰── POST /v1/chat/completions [inference-gateway, server]                                       2.3s
│       ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]     2.3s
│           ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                        2.3s
│               ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                 2.3s
├── execute_tool TodoWrite call_i0rhhw03                                                            47µs
╰── chat ollama_cloud/glm-5.3-flash                                                                10.3s
    ╰── POST /v1/chat/completions [inference-gateway, server]                                      10.3s
        ╰── POST 127.0.0.1:8080/proxy/ollama_cloud/chat/completions [inference-gateway, client]    10.3s
            ╰── POST /proxy/{provider}/{path...} [inference-gateway, server]                       10.3s
                ╰── POST ollama.com/v1/chat/completions [inference-gateway, client]                10.3s
Stats
Tool Calls

╭───────────┬───────┬───────┬────────╮
│ Tool      │ Calls │ Fail% │ Avg    │
├───────────┼───────┼───────┼────────┤
│ Bash      │ 31    │ 0%    │ 3605ms │
│ TodoWrite │ 4     │ 0%    │ 56µs   │
│ Edit      │ 2     │ 0%    │ 392µs  │
│ Memory    │ 1     │ 0%    │ 1316ms │
│ Read      │ 1     │ 0%    │ 270µs  │
│ Delete    │ 1     │ 100%  │ 260µs  │
╰───────────┴───────┴───────┴────────╯

Token Usage

╭────────────────────────────┬─────────┬─────────┬────────────┬─────────┬──────╮
│ Model                      │ Prompt  │ Cached  │ Completion │ Total   │ Cost │
├────────────────────────────┼─────────┼─────────┼────────────┼─────────┼──────┤
│ ollama_cloud/glm-5.3-flash │ 2200477 │ 1666560 │ 30687      │ 2231164 │ -    │
╰────────────────────────────┴─────────┴─────────┴────────────┴─────────┴──────╯

Sessions

╭───────────┬──────────┬──────────╮
│ Execution │ Mode     │ Sessions │
├───────────┼──────────┼──────────┤
│ headless  │ headless │ 1        │
╰───────────┴──────────┴──────────╯

Triggered by edenreich · Infer Action · OSS

Ported consume.py to a stdlib-only examples/ag-ui/main.go with the same printed lines and the same stdin frame protocol, driven via go run . stream | serve [--approval], so the example needs a Go toolchain instead of python3.
@edenreich
edenreich merged commit 28fff77 into main Nov 17, 2026
1 check passed
@edenreich
edenreich deleted the fix/issue-1891 branch November 17, 2026 15:39
@edenreich edenreich moved this from Todo to Done in 2026 Nov 17, 2026
@inference-gateway-releaser

Copy link
Copy Markdown
Contributor

🎉 This PR is included in version 0.263.0 🎉

The release is available on:

Your semantic-release bot 📦🚀

@inference-gateway-releaser inference-gateway-releaser Bot added the released Shipped in a release label Nov 17, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

released Shipped in a release

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[FEATURE] docs: add runnable examples for subagents and the AG-UI headless stream

1 participant