Back to list
ilteris

adk-progress-bridge

by ilteris

0🍴 0📅 Jan 15, 2026

SKILL.md


name: ADK Progress Bridge description: Transform long-running AI tools into real-time SSE progress streams

ADK Progress Bridge Skill

This skill teaches how to implement real-time progress streaming for GenAI/ADK tools using async generators and Server-Sent Events.

When to Use This Skill

  • Building long-running AI tools (>5 seconds) that need user feedback
  • Implementing multi-step workflows with progress tracking
  • Creating audit, analysis, or data processing tools
  • Any tool where "silence" during execution is a UX problem

Core Pattern

1. Backend: Async Generator Tool

from backend.app.bridge import progress_tool, ProgressPayload

@progress_tool(name="my_tool")
async def my_tool(args):
    # Yield progress updates
    yield ProgressPayload(step="Working...", pct=50, log="Details here")
    
    # Yield final result (must be dict)
    yield {"status": "complete", "data": result}

2. Frontend: SSE Composable

import { useAgentStream } from '@/composables/useAgentStream'

const { state, runTool } = useAgentStream()
await runTool('my_tool', { arg: 'value' })

// Reactive state: state.progressPct, state.currentStep, state.logs

Key Files Reference

FilePurpose
backend/app/bridge.pyCore: ProgressPayload, @progress_tool, ToolRegistry
backend/app/main.pyAPI: /start_task, /stream endpoints
frontend/src/composables/useAgentStream.tsVue composable for SSE
frontend/src/components/TaskMonitor.vueUI component example

SSE Event Schema

{
  "call_id": "uuid",
  "type": "progress|result|error",
  "payload": { "step": "...", "pct": 0-100, "log": "..." }
}

Adding a New Tool Checklist

  1. Create backend/app/my_tool.py with @progress_tool decorator
  2. Implement async generator yielding ProgressPayload + final dict
  3. Import in backend/app/main.py to register
  4. Test via /verify-stream workflow or verify_stream.py

Common Mistakes

  • ❌ Forgetting to yield a final dict (tool hangs)
  • ❌ Not importing tool in main.py (404 on /start_task)
  • ❌ Using sync functions instead of async generators
  • ❌ Not closing EventSource on result/error in frontend

Score

Total Score

50/100

Based on repository quality metrics

SKILL.md

SKILL.mdファイルが含まれている

+20
LICENSE

ライセンスが設定されている

0/10
説明文

100文字以上の説明がある

0/10
人気

GitHub Stars 100以上

0/15
最近の活動

3ヶ月以内に更新がある

0/10
フォーク

10回以上フォークされている

0/5
Issue管理

オープンIssueが50未満

+5
言語

プログラミング言語が設定されている

+5
タグ

1つ以上のタグが設定されている

0/5

Reviews

💬

Reviews coming soon