A TypeScript-based sdk for communicating with AI agents via the dgenai.io A2A (Agent-to-Agent) protocol.
This CLI allows you to send and stream messages to agents directly from the terminal, supporting task cancellation and live status updates.
- Node.js >= 20
- npm or yarn
- TypeScript and ts-node installed globally or locally
npm install -g typescript ts-node
- Clone this repository
git clone https://github.com/dgenai/dgenai-sdk.git
cd dgenai-sdk- Install dependencies
npm install
# or
yarn installRun the CLI using ts-node:
node --loader ts-node/esm src/a2a-cli.ts/list→ list available agent/mode→ switch between single / orchestration mode/use <index>→ use an agent in single mode/cancel→ cancels the current running task (if any).Ctrl+CorCtrl+D→ exits the terminal.
- Uses
@a2a-js/sdkto connect to an agent from its Agent Card URL. - Uses
x402-fetchto pay paid agents. - Streams agent responses in real time.
- Displays task status updates (e.g.,
in-progress,completed, and agents toolcall.). - Supports task cancellation via the
/cancelcommand.
{
"userWalletPubKey": "AYJk5Dzvu9MpSqmb6gX99jovcrr6Ss728B74qmErry6V"
}You can adapt this to your environment as needed per agent requirements (see gitbook)
MIT License © 2025 — DGENAI Project