@adonis-agora/agent
Version:
Governed, durable-backed AI agent (chat + tool-calling + governance) for AdonisJS — part of the Agora ecosystem.
27 lines • 1.34 kB
TypeScript
import { type PoppyStore } from './store.js';
/**
* The slice of a Redis client {@link redisPoppyStore} uses — an `@adonisjs/redis` connection
* (ioredis) has it: `redisPoppyStore(redis.connection('main'))`.
*/
export interface PoppyRedisClient {
get(key: string): Promise<string | null>;
mget(...keys: string[]): Promise<(string | null)[]>;
set(key: string, value: string, ...args: (string | number)[]): Promise<unknown>;
del(...keys: string[]): Promise<unknown>;
incr(key: string): Promise<number>;
}
export interface RedisPoppyStoreOptions {
/** Key prefix. Default `'agent:poppy:'`. */
prefix?: string;
}
/**
* A {@link PoppyStore} shared by every replica, over Redis. Positions come from `INCR`, so two
* appends never share one; a message claim, an event key and the reader lease are `SET … NX`.
* Conversations are JSON values; events one key each (`…:evt:<conversation>:<seq>`).
*
* @experimental Tracks Personal Agent Protocol Draft 0.1 (https://personalagentprotocol.org/docs/spec),
* a spec still in development: this API WILL change as the spec evolves — possibly in breaking
* ways, outside semver majors while it is a draft.
*/
export declare function redisPoppyStore(redis: PoppyRedisClient, options?: RedisPoppyStoreOptions): PoppyStore;
//# sourceMappingURL=redis-store.d.ts.map