nexus-agents - v2.80.0
    Preparing search index...

    Interface IRoutingMemory

    Memory interface for routing-related data. Bridges memory backend and routing systems.

    This interface enables:

    • #148 Preference-Trained Routing: Store preferences and outcomes
    • #149 MobiMem Evolution: Store experiences and action patterns
    const routingMemory = createRoutingMemory(memoryBackend);

    // Store a routing decision and outcome
    await routingMemory.storePreference(decision, outcome, preference);

    // Get preferences for training
    const prefs = await routingMemory.getPreferences({ taskType: 'code' }, 100);

    // Store experience for MobiMem
    await routingMemory.storeExperience(experience);
    interface IRoutingMemory {
        storePreference(
            decision: RoutingDecisionRecord,
            outcome: TaskOutcomeRecord,
            preference?: PreferenceSignal,
        ): Promise<Result<void, RoutingMemoryError>>;
        getPreferences(
            filter: PreferenceFilter,
            limit: number,
        ): Promise<Result<PreferenceRecord[], RoutingMemoryError>>;
        storeExperience(
            experience: ExperienceRecord,
        ): Promise<Result<void, RoutingMemoryError>>;
        getExperiences(
            query: string,
            limit: number,
        ): Promise<Result<ExperienceRecord[], RoutingMemoryError>>;
        storeAction(
            action: ActionRecord,
        ): Promise<Result<void, RoutingMemoryError>>;
        getActions(
            taskType: string,
            limit: number,
        ): Promise<Result<ActionRecord[], RoutingMemoryError>>;
        export(): Promise<Result<RoutingMemoryExport, RoutingMemoryError>>;
        import(
            data: RoutingMemoryExport,
        ): Promise<Result<void, RoutingMemoryError>>;
        getStats(): Promise<Result<RoutingMemoryStats, RoutingMemoryError>>;
    }
    Index

    Methods