@tanstack/ai-code-mode
Version:
Code Mode for TanStack AI - LLM-driven code execution in secure sandboxes
22 lines (21 loc) • 733 B
TypeScript
export interface AgentSession {
name: string;
systemPrompt: string;
memory: Record<string, unknown>;
createdAt: number;
lastUsedAt: number;
}
export interface AgentStore {
get: (name: string) => Promise<AgentSession | null>;
set: (name: string, session: AgentSession) => Promise<void>;
delete: (name: string) => Promise<void>;
list: () => Promise<Array<string>>;
}
export declare class InMemoryAgentStore implements AgentStore {
private sessions;
get(name: string): Promise<AgentSession | null>;
set(name: string, session: AgentSession): Promise<void>;
delete(name: string): Promise<void>;
list(): Promise<Array<string>>;
}
export declare function generateAgentName(): string;