open-index/open-npm huggingface dataset:
npm package: @peargent/echo
Description: Official TypeScript SDK for Peargent Echo
Author: Peargent
Latest version: 0.1.1

# @peargent/echo

Official TypeScript SDK for [Peargent Echo](https://echo.peargent.online) — persistent memory for AI agents.

## Installation

```bash
npm install @peargent/echo
```

## Quick Start

```typescript
import { PeargentEcho } from "@peargent/echo";

const client = new PeargentEcho({
  apiKey: "YOUR_API_KEY" // Get from https://echo.peargent.online/dashboard
});

// Store a memory
await client.addMemory("User prefers TypeScript over JavaScript.");

// Search memories
const results = await client.search("programming preferences");
console.log(results);

// Get user profile
const profile = await client.getProfile();
console.log(profile);
```

## API Reference

### `addMemory(content, options?)`

Store a new memory. Similar memories are automatically merged.

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `filter` | boolean | `true` | Filter irrelevant content |
| `extract` | boolean | `true` | Extract entities & facts |
| `agentId` | string | - | Agent identifier |
| `runId` | string | - | Conversation run ID |
| `metadata` | object | - | Custom JSON metadata |

### `search(query, options?)`

Semantically search through stored memories.

| Option | Type | Default | Description |
|--------|------|---------|-------------|
| `limit` | number | `10` | Max results to return |
| `includeGraph` | boolean | `false` | Include related memories |

### `getProfile()`

Get the auto-generated user profile from stored memories.

## License

MIT