You're Invited:Meet the Socket Team at RSAC and BSidesSF 2026, March 23–26.RSVP
Socket
Book a DemoSign in
Socket

fluxprotocol-client

Package Overview
Dependencies
Maintainers
1
Versions
5
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

fluxprotocol-client

FLUX client library for HTTP and WebSocket

latest
Source
npmnpm
Version
0.0.8
Version published
Maintainers
1
Created
Source

fluxprotocol-client

HTTP and WebSocket client for FLUX Protocol. Supports TOON format for 40% fewer tokens.

Install

npm install fluxprotocol-client

HTTP Client

import { FluxClient } from 'fluxprotocol-client';

const client = new FluxClient('http://localhost:3000');

// List available tools
const tools = await client.listTools();

// Call a tool
const weather = await client.call('weather.getWeather', { city: 'Tokyo' });

TOON Format (40% Fewer Tokens)

const client = new FluxClient('http://localhost:3000');

// Enable TOON format for token efficiency
const tools = await client.useToon().listTools();
const weather = await client.useToon().call('weather.getWeather', { city: 'Tokyo' });

// Switch back to JSON
const result = await client.useJson().call('data.query', { sql: 'SELECT *' });

WebSocket Client

import { FluxWebSocketClient } from 'fluxprotocol-client';

const client = new FluxWebSocketClient('ws://localhost:3001/ws');
await client.connect();

const weather = await client.call('weather.getWeather', { city: 'Tokyo' });

client.close();

Use with LangChain

import { FluxClient } from 'fluxprotocol-client';
import { tool } from '@langchain/core/tools';

const flux = new FluxClient('http://localhost:3000');

const weatherTool = tool(
  async (input) => {
    return await flux.useToon().call('weather.getWeather', input);
  },
  { name: 'get_weather', description: 'Get weather for a city' }
);
  • fluxprotocol-sdk - Core SDK (for building connectors)
  • fluxprotocol-cli - CLI tools

License

MIT

Keywords

flux

FAQs

Package last updated on 11 Dec 2025

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts