Aller au contenu
login
arrow_backRetour aux issues
agentdecksdk/agentdeck #400

example: demonstrate structured progress reporting with Reporter

ecoDébutant help wanted good first issue blocked difficulty: small area:examples

descriptionDescription

## Context In AgentDeck, tools and workflows can report structured progress and status directly from inside execution using `ctx.reporter`. This enables streaming progress updates to users and client frontends during long-running tasks. ## Current state The Reporter interface exists in `agentdeck/authoring/context.py` and `agentdeck/core/reporter.py`, but there is no dedicated standalone example demonstrating how a tool uses `ctx.reporter.info()` or `ctx.reporter.report()` to stream structured intermediate progress. ## What is missing A minimal worked example in `examples/reporter-progress/` (`run.py`, `README.md`) showing an agent using a tool that reports structured progress updates during execution. ## Expected contribution 1. `examples/reporter-progress/run.py`: - A tool function taking `Context` and emitting progress events via `ctx.reporter` (e.g. searching items, processing chunks). - A Deck running the agent and printing incoming reporter events from the event stream. 2. `examples/reporter-progress/README.md`: Explains how the reporter integrates with the event log and provides expected terminal output. ## Relevant APIs and source files - `agentdeck/core/reporter.py` - `agentdeck/authoring/injection.py` - `examples/chat-agent-with-a-tool/` (reference example structure) ## Files to change - `examples/reporter-progress/run.py` (new file) - `examples/reporter-progress/README.md` (new file) ## Acceptance criteria - [ ] Runs cleanly via `python run.py` - [ ] Uses only public APIs from `agentdeck` - [ ] Demonstrates reporter events emitted in the run stream - [ ] Includes expected terminal output in `README.md` - [ ] `make check` passes ## Out of scope - No changes to Reporter core contracts - No UI frontend dependencies ## How to verify locally ```bash make install make check cd examples/reporter-progress && python run.py ``` ## Difficulty small
codeOuvre sur GitHub