redhat-et / redhat-et/docsclaw
feat: add real streaming to agentic tool loop (phase 2)
Nobody has claimed this yet.
- Dominant language
- Go
- Stars
- 2
- Forks
- 1
- Avg merge
- 6h 9m
- Merged PRs (30d)
- 1
Description
Summary
Add real token-by-token streaming to the agentic tool loop
(pkg/tools/loop.go) so phase 2 responses stream from the provider
instead of using simulated word-by-word chunking.
Context
Issue #44 adds StreamWithTools to the provider interface. The first
iteration (PR TBD) implements real streaming for phase 1 (no tools)
and keeps simulated streaming for phase 2 (tool loop). This issue
tracks the follow-up to make phase 2 streaming real.
What needs to change
RunToolLoopaccepts a streaming callback parameter- On the final iteration (when
StopReason == EndTurn), use
StreamWithToolsinstead ofCompleteWithToolsand pipe text
deltas through the callback - All consumers benefit: OpenAI API, Chat TUI, A2A server
Depends on
- #44 (provider streaming interface)
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with issue #44 and the provider streaming interface, then inspect RunToolLoop in pkg/tools/loop.go and its existing CompleteWithTools path. Implement the callback flow for final EndTurn responses using StreamWithTools, with text deltas reaching the OpenAI API, Chat TUI, and A2A server consumers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- go
- Domain
- ai, api, backend
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 55/100