Catalog PyPI
PACKAGE EXPLORERView in registry

a2a-client-toolkit

PyPI

A toolkit for building A2A client

a2a
Versions collected1
Direct dependencies11From release 0.1.7
Last observed20 Oct, 16:24 UTC

README

Version 0.1.7 documentation

A2A Client Toolkit

A2A SDK とメッセージングプラットフォーム(LINE、Slack)を統合したクライアントツールキットです。各プラットフォームのユーザーと A2A エージェント間の双方向コミュニケーションを可能にします。

コンセプト

このツールキットは、各メッセージングプラットフォームからのメッセージを受信して A2A エージェントに転送し、エージェントからの応答をプラットフォームユーザーに返すブリッジとして機能します。テキストメッセージだけでなく、画像やファイルのやり取りもサポートしています。

サポートプラットフォーム

  • LINE: LINE Bot API を使用
  • Slack: Slack Bolt API を使用

インストール

pip install -r requirements.txt

基本的な使い方

LINE クライアント

1. 環境変数の設定

.envファイルを作成し、必要な設定を行います:

LINE_CHANNEL_SECRET=your_line_channel_secret
LINE_CHANNEL_ACCESS_TOKEN=your_line_channel_access_token
A2A_AGENT_CARD_URL=your_a2a_agent_card_url
HOST=http://localhost:8000  # ファイル配信用URL(オプション)

2. サンプルコード

import os
import linebot.v3.messaging as line_messaging
import uvicorn
from dotenv import load_dotenv

from client.worker import A2AClientWorker
from providers.line.file import LocalFileStore
from providers.line.handler import DefaultLineEventHandler
from providers.line.server import LineServer, LineServerConfig
from providers.line.user_state import InMemoryUserStateStore

if __name__ == "__main__":
    load_dotenv()

    config = LineServerConfig(
        line_messaging_config=line_messaging.Configuration(
            access_token=os.getenv("LINE_CHANNEL_ACCESS_TOKEN"),
        ),
        line_channel_secret=os.getenv("LINE_CHANNEL_SECRET") or "",
    )

    user_state_store = InMemoryUserStateStore()
    file_store = LocalFileStore(base_uri=f"{os.getenv('HOST') or ''}/files", directory="public/files")

    event_handler = DefaultLineEventHandler(
        config=config.line_messaging_config,
        file_store=file_store,
        user_state_store=user_state_store,
    )

    worker = A2AClientWorker(
        a2a_agent_card_url=os.getenv("A2A_AGENT_CARD_URL") or "",
        event_handler=event_handler,
    )

    server = LineServer(config, worker, user_state_store)

    uvicorn.run(server.build(), host="0.0.0.0", port=8000)

3. サーバー起動

python src/samples/line.py

サーバーは http://localhost:8000 で起動します。LINE の Webhook エンドポイントは /callback です。

Slack クライアント

1. 環境変数の設定

.envファイルを作成し、必要な設定を行います:

SLACK_BOT_TOKEN=your_slack_bot_token
SLACK_APP_TOKEN=your_slack_app_token
A2A_AGENT_CARD_URL=your_a2a_agent_card_url

2. サンプルコード

import asyncio
import os
from dotenv import load_dotenv
from slack_sdk.web.async_client import AsyncWebClient

from client.worker import A2AClientWorker
from providers.slack.app import SlackApp, SlackAppConfig
from providers.slack.handler import DefaultSlackEventHandler

if __name__ == "__main__":
    load_dotenv()

    config = SlackAppConfig(
        slack_bot_token=os.getenv("SLACK_BOT_TOKEN", ""),
        slack_app_token=os.getenv("SLACK_APP_TOKEN", ""),
    )

    # Initialize Slack Web API client
    slack_client = AsyncWebClient(token=config.slack_bot_token)
    event_handler = DefaultSlackEventHandler(slack_client=slack_client)

    worker = A2AClientWorker(
        a2a_agent_card_url=os.getenv("A2A_AGENT_CARD_URL") or "",
        event_handler=event_handler,
    )

    app = SlackApp(config, worker)
    asyncio.run(app.run())

3. アプリ起動

python src/samples/slack.py

Slack アプリがソケットモードで起動します。

機能

  • 双方向メッセージング: 各プラットフォームユーザーと A2A エージェント間でのリアルタイム会話
  • ファイル共有: 画像、ドキュメント等のファイル送受信
  • セッション管理: ユーザーごとの会話状態を保持
  • カスタマイズ可能: 各コンポーネントを独自実装で置き換え可能
  • マルチプラットフォーム: LINE、Slack に対応

動作の流れ

  1. プラットフォームユーザーがメッセージを送信
  2. 各プラットフォームの API がメッセージを受信
  3. メッセージを A2A 形式に変換
  4. A2A エージェントにメッセージを送信
  5. エージェントからの応答を受信
  6. 応答をプラットフォーム形式に変換して返信

ライセンス

MIT License

Downloads & popularity

3downloads
1-day window · source-reported counts20 Oct 2026
54270
2026-07-23: 2 · observed 2026-10-21T09:55:33.5682006Z · period 2026-07-23–2026-07-232026-07-24: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-07-24–2026-07-242026-07-27: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-07-27–2026-07-272026-07-29: 9 · observed 2026-10-21T09:55:33.5682006Z · period 2026-07-29–2026-07-292026-07-30: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-07-30–2026-07-302026-08-01: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-01–2026-08-012026-08-02: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-02–2026-08-022026-08-03: 16 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-03–2026-08-032026-08-04: 6 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-04–2026-08-042026-08-06: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-06–2026-08-062026-08-09: 7 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-09–2026-08-092026-08-10: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-10–2026-08-102026-08-13: 2 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-13–2026-08-132026-08-14: 6 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-14–2026-08-142026-08-16: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-16–2026-08-162026-08-17: 8 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-17–2026-08-172026-08-18: 54 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-18–2026-08-182026-08-20: 2 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-20–2026-08-202026-08-22: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-22–2026-08-222026-08-23: 4 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-23–2026-08-232026-08-24: 23 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-24–2026-08-242026-08-28: 14 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-28–2026-08-282026-08-31: 3 · observed 2026-10-21T09:55:33.5682006Z · period 2026-08-31–2026-08-312026-09-01: 2 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-01–2026-09-012026-09-03: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-03–2026-09-032026-09-04: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-04–2026-09-042026-09-05: 6 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-05–2026-09-052026-09-07: 2 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-07–2026-09-072026-09-09: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-09–2026-09-092026-09-10: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-10–2026-09-102026-09-11: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-11–2026-09-112026-09-12: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-12–2026-09-122026-09-19: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-19–2026-09-192026-09-23: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-23–2026-09-232026-09-26: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-26–2026-09-262026-09-27: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-27–2026-09-272026-09-28: 9 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-28–2026-09-282026-09-29: 7 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-29–2026-09-292026-09-30: 13 · observed 2026-10-21T09:55:33.5682006Z · period 2026-09-30–2026-09-302026-10-01: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-01–2026-10-012026-10-03: 15 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-03–2026-10-032026-10-06: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-06–2026-10-062026-10-07: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-07–2026-10-072026-10-09: 7 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-09–2026-10-092026-10-10: 8 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-10–2026-10-102026-10-11: 5 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-11–2026-10-112026-10-12: 9 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-12–2026-10-122026-10-13: 5 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-13–2026-10-132026-10-14: 4 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-14–2026-10-142026-10-15: 2 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-15–2026-10-152026-10-16: 1 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-16–2026-10-162026-10-17: 4 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-17–2026-10-172026-10-18: 2 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-18–2026-10-182026-10-19: 3 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-19–2026-10-192026-10-20: 3 · observed 2026-10-21T09:55:33.5682006Z · period 2026-10-20–2026-10-20
23 Jul20 Oct

pypistats · 55 observations shown. Missing days are unknown. Source category: overall: without mirrors.

View observed values
Date / source periodValueObserved at
2026-10-20 – 2026-10-2032026-10-21T09:55:33.5682006Z
2026-10-19 – 2026-10-1932026-10-21T09:55:33.5682006Z
2026-10-18 – 2026-10-1822026-10-21T09:55:33.5682006Z
2026-10-17 – 2026-10-1742026-10-21T09:55:33.5682006Z
2026-10-16 – 2026-10-1612026-10-21T09:55:33.5682006Z
2026-10-15 – 2026-10-1522026-10-21T09:55:33.5682006Z
2026-10-14 – 2026-10-1442026-10-21T09:55:33.5682006Z
2026-10-13 – 2026-10-1352026-10-21T09:55:33.5682006Z
2026-10-12 – 2026-10-1292026-10-21T09:55:33.5682006Z
2026-10-11 – 2026-10-1152026-10-21T09:55:33.5682006Z
2026-10-10 – 2026-10-1082026-10-21T09:55:33.5682006Z
2026-10-09 – 2026-10-0972026-10-21T09:55:33.5682006Z
2026-10-07 – 2026-10-0712026-10-21T09:55:33.5682006Z
2026-10-06 – 2026-10-0612026-10-21T09:55:33.5682006Z
2026-10-03 – 2026-10-03152026-10-21T09:55:33.5682006Z
2026-10-01 – 2026-10-0112026-10-21T09:55:33.5682006Z
2026-09-30 – 2026-09-30132026-10-21T09:55:33.5682006Z
2026-09-29 – 2026-09-2972026-10-21T09:55:33.5682006Z
2026-09-28 – 2026-09-2892026-10-21T09:55:33.5682006Z
2026-09-27 – 2026-09-2712026-10-21T09:55:33.5682006Z
2026-09-26 – 2026-09-2612026-10-21T09:55:33.5682006Z
2026-09-23 – 2026-09-2312026-10-21T09:55:33.5682006Z
2026-09-19 – 2026-09-1912026-10-21T09:55:33.5682006Z
2026-09-12 – 2026-09-1212026-10-21T09:55:33.5682006Z
2026-09-11 – 2026-09-1112026-10-21T09:55:33.5682006Z
2026-09-10 – 2026-09-1012026-10-21T09:55:33.5682006Z
2026-09-09 – 2026-09-0912026-10-21T09:55:33.5682006Z
2026-09-07 – 2026-09-0722026-10-21T09:55:33.5682006Z
2026-09-05 – 2026-09-0562026-10-21T09:55:33.5682006Z
2026-09-04 – 2026-09-0412026-10-21T09:55:33.5682006Z
2026-09-03 – 2026-09-0312026-10-21T09:55:33.5682006Z
2026-09-01 – 2026-09-0122026-10-21T09:55:33.5682006Z
2026-08-31 – 2026-08-3132026-10-21T09:55:33.5682006Z
2026-08-28 – 2026-08-28142026-10-21T09:55:33.5682006Z
2026-08-24 – 2026-08-24232026-10-21T09:55:33.5682006Z
2026-08-23 – 2026-08-2342026-10-21T09:55:33.5682006Z
2026-08-22 – 2026-08-2212026-10-21T09:55:33.5682006Z
2026-08-20 – 2026-08-2022026-10-21T09:55:33.5682006Z
2026-08-18 – 2026-08-18542026-10-21T09:55:33.5682006Z
2026-08-17 – 2026-08-1782026-10-21T09:55:33.5682006Z
2026-08-16 – 2026-08-1612026-10-21T09:55:33.5682006Z
2026-08-14 – 2026-08-1462026-10-21T09:55:33.5682006Z
2026-08-13 – 2026-08-1322026-10-21T09:55:33.5682006Z
2026-08-10 – 2026-08-1012026-10-21T09:55:33.5682006Z
2026-08-09 – 2026-08-0972026-10-21T09:55:33.5682006Z
2026-08-06 – 2026-08-0612026-10-21T09:55:33.5682006Z
2026-08-04 – 2026-08-0462026-10-21T09:55:33.5682006Z
2026-08-03 – 2026-08-03162026-10-21T09:55:33.5682006Z
2026-08-02 – 2026-08-0212026-10-21T09:55:33.5682006Z
2026-08-01 – 2026-08-0112026-10-21T09:55:33.5682006Z
2026-07-30 – 2026-07-3012026-10-21T09:55:33.5682006Z
2026-07-29 – 2026-07-2992026-10-21T09:55:33.5682006Z
2026-07-27 – 2026-07-2712026-10-21T09:55:33.5682006Z
2026-07-24 – 2026-07-2412026-10-21T09:55:33.5682006Z
2026-07-23 – 2026-07-2322026-10-21T09:55:33.5682006Z

Versions 1

Collected releases
VersionPublishedDirect dependenciesOpen version
0.1.724 Jun 202511

Package advisories

0
No matching advisories collected

This describes our collected data; it is not a security assessment.

Repository

PENDING
ryukez/a2a-client-toolkit

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 16:24 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package:27eaa8242b0f7af5d91164f4ae877a0a3a42bb17152b39a4949219e0ced92785