New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@agentuity/keyvalue

Package Overview
Dependencies
Maintainers
3
Versions
23
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@agentuity/keyvalue

latest
npmnpm
Version
2.0.10
Version published
Maintainers
3
Created
Source

@agentuity/keyvalue

A standalone package for the Agentuity Key-Value storage service.

Installation

npm install @agentuity/keyvalue

Quick Start

import { KeyValueClient } from '@agentuity/keyvalue';

const client = new KeyValueClient();

// Set a value with optional TTL
await client.set('my-namespace', 'user:123', { name: 'John', email: 'john@example.com' }, {
  ttl: 3600 // expires in 1 hour
});

// Get a value
const result = await client.get('my-namespace', 'user:123');
if (result.exists) {
  console.log('Found:', result.data);
  console.log('Content-Type:', result.contentType);
}

// Delete a value
await client.delete('my-namespace', 'user:123');

// Get namespace statistics
const stats = await client.getStats('my-namespace');
console.log(`${stats.count} keys, ${stats.sum} bytes`);

// Search for keys
const results = await client.search('my-namespace', 'user');

Configuration

The client can be configured with options:

const client = new KeyValueClient({
  apiKey: 'your-api-key',           // or set AGENTUITY_SDK_KEY
  url: 'https://api.agentuity.com', // or set AGENTUITY_KV_URL
  logger: customLogger,              // optional custom logger
});

Environment Variables

VariableDescriptionDefault
AGENTUITY_SDK_KEYAPI key for authenticationRequired
AGENTUITY_REGIONRegion for API endpointsusc
AGENTUITY_KV_URLOverride KV API URLAuto-detected

TTL (Time-to-Live)

Keys can have an optional TTL:

// Key expires in 1 hour
await client.set('ns', 'key', value, { ttl: 3600 });

// Key never expires
await client.set('ns', 'key', value, { ttl: null });

// Key uses namespace default TTL
await client.set('ns', 'key', value);

License

Apache-2.0

FAQs

Package last updated on 03 Apr 2026

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