UNPKG

arc-agents

Version:

A library for creating and deploying gaming agents at scale

50 lines (42 loc) 1.55 kB
import { NetworkingAgent } from './networking-agent'; import { AgentConfig } from './agent-core'; export declare class BaseAgent extends NetworkingAgent { /** The architecture ID associated with this agent. */ architectureId: string; /** The user ID of the agent's owner. */ userId: string; /** The slot index for this agent's model. */ slotIdx: number; /** * Creates a new Agent instance. * @param architectureId - The architecture ID for this agent. * @param userId - The user ID of the agent's owner. * @param slotIdx - The slot index for this agent (default = 0). * @param agentConfig - Configuration options for the agent. * @param delayInit - Whether to delay initialization (commonly delayed for async loading). */ constructor( architectureId: string, userId: string, slotIdx?: number, agentConfig?: AgentConfig, delayInit?: boolean ); /** * Initializes the agent and its model. * @returns A promise that resolves when initialization is complete. */ initialize(): Promise<void>; /** * Fetches the model data for this agent. * @returns A promise that resolves to a boolean indicating success. */ getModelData(): Promise<boolean>; /** * Saves the current model state to the backend. * @param newModelBool - Whether to save as a new model. */ save(newModelBool?: boolean): Promise<void>; /** Resets the agent and its model through random initialization. */ reset(): Promise<void>; }