Repository navigation
Description
Summary
Domain: chat and the headless agent. Two README features have no example. Subagents are the hero feature (the README GIF is plan mode fanning out five subagents), and the only example that touches them is examples/mcp, where two Markdown agents exist to show mcpServers and need a real provider key to run. Nothing shows the Agent tool dispatching parallel tasks, a Markdown agent's tools allowlist or model, or infer agents list. The AG-UI stream (infer headless --format ag-ui, infer headless --serve) is how every other program drives the agent, and no example consumes it - a user who wants to embed infer has only the event tables in docs/ag-ui-output.md.
Both can run offline against the mock model (INFER_GATEWAY_MOCK=true, INFER_GATEWAY_MOCK_SCENARIOS), like examples/tools: tools.agent.inherit_mock defaults to true, so headless subagents inherit the mock gateway.
Acceptance Criteria
- Add
examples/subagents/(README.md,Taskfile.yml,scenarios.yaml,.agents/agents/<name>.md): a Markdown agent with frontmatter (name, description, atoolsallowlist) and a system-prompt body,task listrunninginfer agents listto show it, and a headless scenario in--mode autowhere the mock model calls theAgenttool with twotasks, one naming the Markdown agent throughagent, and reads the results back (GetSubagentResultor the completion notice). Print the"role":"tool"lines asexamples/toolsdoes. - In the same README, describe the knobs the run depends on:
tools.agent.max_parallel,tools.agent.max_depth,tools.agent.idle_timeout,tools.agent.inherit_mock, andtask chatto open the TUI and watch a subagent's live transcript. - Add
examples/ag-ui/(README.md,Taskfile.yml,scenarios.yaml, one small consumer script):task streamrunsinfer headless --format ag-ui "<prompt>"and the script prints the run's events by type (run started and finished, text message content, tool call start and result), with the README mapping each printed line todocs/ag-ui-output.md. - In
examples/ag-ui/,task servestartsinfer headless --serve --session-id <id>, writes tworun_agent_inputframes to its stdin and shows one AG-UI run per frame on stdout, then closes stdin to shut the worker down. Add a variant with--require-approvalthat answers one approval over stdin. - Add both examples to the table in
docs/examples.md.
Metadata
Metadata
Assignees
Labels
Type
Projects
- StatusShow more project fieldsDone
Activity
edenreich commentedon Nov 17, 2026
@infer can you work on this? use /domain-driven-design /clean-architecture /ponytail:ponytail
inference-gateway-maintainer commentedon Nov 17, 2026
Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.9· CLI:v0.262.0· Gateway:v0.67.1· View JobTodos
Pull Request
#1895
✅ Infer Result: Success
All work is complete. Let me finalize the todo list.
All done - 9 of 9 todos complete, working tree clean, everything pushed.
PR: #1895 (ready for review; resolves #1891)
What I changed
examples/subagents/(README.md, Taskfile.yml, scenarios.yaml,.agents/agents/researcher.md):name: researcher,description, atools: [Read, Grep]allowlist,model: inherit) and a system-prompt body.task listrunsinfer agents listand shows theresearcherrow with its tools, model, mode and source.task fanout(in--mode auto) makes the mock model call theAgenttool with twotasks- one namingresearcherthroughagent, one plain - and reads both results back;task fanout:nameshows the single-taskagent:+descriptionshorthand. The Taskfile setsINFER_TOOLS_AGENT_WAIT=trueso the fan-in is one deterministic aggregate tool result, printed as the"role":"tool"line likeexamples/toolsdoes; the README explains the async default (completion notice,GetSubagentResult).tools.agent.max_parallel,max_depth,idle_timeout,inherit_mock,wait,mode, plustask chatfor the TUI.examples/ag-ui/(README.md, Taskfile.yml, scenarios.yaml, consume.py):task streampipesinfer headless --format ag-ui --no-savethrough a small Python script that prints the run's events by type (RUN_STARTED,TOOL_CALL_START,TOOL_CALL_RESULT,TEXT_MESSAGE_CONTENT,RUN_FINISHED); the README maps every printed line to a section ofdocs/ag-ui-output.md.task servedrivesinfer headless --serve --session-id ag-ui-serve-demo: tworun_agent_inputframes in on stdin, one AG-UI run per frame on stdout, then stdin closes and the worker shuts down.task serve:approvaldoes the same with--require-approval: the model'sWritecall suspends the run withRUN_FINISHED interruptand the script answers one approval over stdin (resumeframe) and watches the resumed call finish.docs/examples.md: both examples added to the runnable examples table.Validation
I built this branch's binary and ran every scenario offline against the mock:
task list,task fanout,task fanout:name;task stream,task serve,task serve:approvalall pass, with the approval flow suspending and resuming exactly as documented.markdownlintis clean and the pre-commit gate (mod:tidy, fmt, lint:imports, golangci-lint 0 issues, markdownlint) passed on both commits. Board #8 was set In progress then QA; docs mirror ticket filed: inference-gateway/docs#1255.Not checked locally: the cspell gate (not on this sandbox's allow-list) - CI runs it; and the full
go test ./...suite, pointless with zero Go changes. Risk: the READMEs quote abbreviated mock output that can drift cosmetically as CLI output formats evolve.Model:
ollama_cloud/glm-5.3-flash· Action:v0.59.9· CLI:v0.262.0· Gateway:v0.67.1· Exit Code:0· Duration: 25m 16sTokens: 20,337,604 in · 102,679 out · 20,440,283 total (113 requests)
Tool calls: 148 total · 100% success rate
Traces
Stats
Triggered by edenreich · Infer Action · OSS
inference-gateway-releaser commentedon Nov 17, 2026
🎉 This issue has been resolved in version 0.263.0 🎉
The release is available on:
Your semantic-release bot 📦🚀