/** * SLOP Agent Base Class * * Base class for all SLOP-native agents. * Each agent runs as a standalone HTTP server with /info, /tools, /memory endpoints. */ import { createServer } from 'http'; import { SLOPAgentConfig, SLOPInfo, SLOPTool, SLOPToolCall, SLOPToolResult, SLOPMemoryEntry, AgentMessage } from './types.js'; export declare abstract class SLOPAgent { protected config: SLOPAgentConfig; protected tools: SLOPTool[]; protected server: ReturnType | null; protected memory: Map; protected messageLog: AgentMessage[]; protected isRunning: boolean; constructor(config: SLOPAgentConfig, tools: SLOPTool[]); /** * Get agent info (SLOP /info endpoint) */ getInfo(): SLOPInfo; /** * Handle tool call (SLOP /tools endpoint) */ abstract handleToolCall(call: SLOPToolCall): Promise; /** * Call another agent's tool via SLOP */ callAgent(agentUrl: string, tool: string, args: Record): Promise; /** * Write to shared memory (via coordinator or local) */ writeMemory(key: string, value: unknown): Promise; /** * Read from shared memory (via coordinator or local) */ readMemory(key: string): Promise; /** * Start the SLOP server */ start(): Promise; /** * Stop the SLOP server */ stop(): Promise; private sendJson; private parseBody; }