redhat-et / redhat-et/docsclaw

feat: add real streaming to agentic tool loop (phase 2)

Open
#56 0 comments 0 reactions 0 assignees View on GitHub

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

  • RunToolLoop accepts a streaming callback parameter
  • On the final iteration (when StopReason == EndTurn), use
    StreamWithTools instead of CompleteWithTools and 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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.