New:Introducing Socket Scanning for VS Code Marketplace Extensions.Learn more →
Get Started

@tangle-network/agent-client

Package Overview
Dependencies
Maintainers
4
Versions
4
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@tangle-network/agent-client

Client SDK for calling Tangle agent gateway endpoints. Supports x402, MPP, and API key authentication with streaming SSE responses.

latest
npmnpm
Version
0.4.0
Version published
Weekly downloads
2
Maintainers
4
Weekly downloads
 
Created
Source

@tangle-network/agent-client

Consumer SDK for calling agent endpoints published through @tangle-network/agent-gateway. OpenAI-compatible chat shape, supports API key, x402 SpendAuth, and MPP credential authentication.

Install

npm install @tangle-network/agent-client

Usage

import { AgentClient } from '@tangle-network/agent-client'

const client = new AgentClient('https://gtm.tangle.tools')

// Discover agent metadata (no auth)
const info = await client.discover('my-agent')

// Chat (API key)
const response = await client.chat('my-agent',
  [{ role: 'user', content: 'Hello' }],
  { apiKey: 'ak_...' }
)

// Chat (streaming)
for await (const chunk of client.chatStream('my-agent', messages, { apiKey: 'ak_...' })) {
  process.stdout.write(chunk.content ?? '')
}

// Chat (x402 SpendAuth — no account needed)
const response = await client.chat('my-agent', messages, {
  x402Signature: signedSpendAuthJson,
})

When to use this vs @tangle-network/tcloud

  • Use tcloud to call Tangle platform services (router.tangle.tools — 671+ models, sandbox, browser, evals).
  • Use agent-client to call a specific published agent app at its own URL (gtm.tangle.tools, taxes.tangle.tools, etc.).

License

MIT

FAQs

Package last updated on 06 May 2026

Related posts