Socket
Socket
Sign inDemoInstall

@crypto.com/ai-agent-client

Package Overview
Dependencies
Maintainers
0
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@crypto.com/ai-agent-client

A Node.js client library for interacting with the Chain AI Client.


Version published
Weekly downloads
7
decreased by-58.82%
Maintainers
0
Weekly downloads
 
Created
Source

Crypto.com AI Agent Client

The Crypto.com AI Agent Client is a TypeScript/JavaScript library designed to facilitate easy and efficient interactions with the Crypto.com AI Agent Service API. This client library provides methods to send queries and fetch responses from the Crypto.com AI Agent Service seamlessly.

npm

Features

  • Simple and intuitive API for interacting with the Crypto.com AI Agent.
  • Supports sending queries and receiving AI-generated responses.
  • Configurable client instances tailored to your specific endpoint and security needs.
  • Currently in betay: Expect frequent updates and potential changes in future releases.

Installation

To install the package, run the following command in your project directory:

npm install @crypto.com/ai-agent-client

Usage

Here’s how you can use the Crypto.com AI Agent Client in your project:

Configuring the Client

import { createClient } from '@crypto.com/ai-agent-client';

const client = createClient({
  openAI: {
    apiKey: 'YOUR_OPEN_AI_API_KEY',
  },
  chain: {
    id: 'CHAIN_ID', // e.g. 282 for the Cronos ZkEVM Testnet
    name: 'CHAIN_NAME',
    rpc: 'CHAIN_RPC_URL',
  },
  explorer: {
    url: 'EXPLORER_API_URL',
    apiKey: 'EXPLORER_API_KEY',
  },
});

Sending a Query

const sendQuery = async (query) => {
  try {
    const response = await client.agent.generateQuery(query);
    console.log('Crypto.com AI Agent Response:', response);
  } catch (error) {
    console.error('Error sending query:', error);
  }
};

API

Client Methods

  • generateQuery(query): Generates a query that is send to the Crypto.com AI Agent Service and returns a response.

Licensing

The code in this project is licensed under the MIT license.

Contact

If you have any questions or comments about the library, please feel free to open an issue or a pull request on our GitHub repository.

Keywords

FAQs

Package last updated on 24 Sep 2024

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

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc