/** * FeltDB Agent Runtime * * Agents are durable, addressable participants in the FeltDB fabric. * An agent's observations, decisions, actions, and results are all part * of the same causal graph. */ /** * Agent reference - a location-independent address for an agent * Format: flow://agent/{name}@{version} * Example: flow://agent/researcher@1 */ export interface AgentRef { /** Agent name */ name: string; /** Agent version */ version: number; /** Full canonical form */ toString(): string; } /** * Lifecycle states for agent execution */ export declare enum AgentExecutionStatus { Created = "Created", Planning = "Planning", Observing = "Observing", Deciding = "Deciding", Acting = "Acting", Waiting = "Waiting", Completed = "Completed", Failed = "Failed", Cancelled = "Cancelled", Blocked = "Blocked" } /** * Agent definition: what the agent is capable of doing */ export interface AgentDefinition { /** Unique agent name */ name: string; /** Agent version */ version: number; /** Human-readable description */ description?: string; /** List of capabilities the agent can use */ capabilities: string[]; /** Agent goals/objectives */ goals?: string[]; /** Execution constraints */ constraints?: { /** Maximum latency in milliseconds */ maxLatency?: number; /** Whether to require fresh state */ requireFreshState?: boolean; /** Maximum number of decision iterations */ maxIterations?: number; /** Maximum concurrent executions */ maxConcurrent?: number; }; /** Execution tools available to the agent */ tools?: string[]; /** Agent policies */ policies?: { /** Require human approval for certain actions */ requireApproval?: string[]; /** Actions that are forbidden */ forbidden?: string[]; }; /** Memory scope and retention */ memory?: { /** Maximum memory size in KB */ maxSize?: number; /** Memory retention period in milliseconds */ retentionMs?: number; /** Memory scope (local, distributed, shared) */ scope?: 'local' | 'distributed' | 'shared'; }; } /** * Agent execution: a particular invocation of an agent */ export interface AgentExecution { /** Unique execution ID */ executionId: string; /** Reference to the agent being executed */ agentRef: AgentRef; /** Current lifecycle status */ status: AgentExecutionStatus; /** Goal for this execution */ goal: string; /** Input references to the execution */ inputs: string[]; /** State version when execution started */ stateVersion: number; /** Peer ID that owns this execution (single-owner semantics) */ ownedBy?: string; /** Observations made during this execution */ observationIds: string[]; /** Decisions made during this execution */ decisionIds: string[]; /** Actions taken during this execution */ actionIds: string[]; /** Result reference after completion */ resultRef?: string; /** Execution attempt number */ attempt: number; /** Timestamp when execution was created */ createdMs: number; /** Timestamp when execution started */ startedMs?: number; /** Timestamp when execution completed */ completedMs?: number; /** Optional error message if execution failed */ error?: string; /** Metadata about the execution */ metadata?: Record; } /** * Parse an agent reference from its canonical form * @example parseAgentRef("flow://agent/researcher@1") */ export declare function parseAgentRef(ref: string): AgentRef; /** * Create an agent reference */ export declare function createAgentRef(name: string, version: number): AgentRef; /** * Generate a unique execution ID */ export declare function generateExecutionId(agentName: string): string; //# sourceMappingURL=agent.d.ts.map