Skip to content

armgit / ruflo

Public Imported from GitHub
0

🌊 The original agent harness. Deploy intelligent multi-player swarms, coordinate autonomous workflows, and build conversational AI systems. Features adaptive memory, self-learning intelligence, federation, vector RAG integration, and native Claude Code / Codex / Hermes and many more Integrated

checkpoint: File edit:

rUv0d9cd95ab871
diff --git a/v3/integration/attention-coordinator.ts b/v3/integration/attention-coordinator.ts
index 1f67942174..f7dc1f0e2e 100644
--- a/v3/integration/attention-coordinator.ts
+++ b/v3/integration/attention-coordinator.ts
@@ -27,6 +27,38 @@ import type {
DEFAULT_ATTENTION_CONFIG,
} from './types.js';
+/**
+ * Interface for agentic-flow Attention reference (for delegation)
+ * This allows the coordinator to delegate to agentic-flow when available
+ */
+interface AgenticFlowAttentionReference {
+ compute(params: {
+ query: number[] | Float32Array;
+ key: number[] | Float32Array;
+ value: number[] | Float32Array;
+ mask?: boolean[];
+ mechanism?: string;
+ }): Promise<{
+ output: number[];
+ latencyMs: number;
+ memoryBytes: number;
+ mechanism: string;
+ }>;
+ setMechanism(mechanism: string): Promise<void>;
+ getMetrics(): Promise<{
+ avgLatencyMs: number;
+ throughputTps: number;
+ memoryEfficiency: number;
+ speedupFactor: number;
+ }>;
+}
+
+/**
+ * Threshold for delegating to native attention (tokens)
+ * Sequences longer than this benefit most from Flash Attention optimization
+ */
+const DELEGATION_SEQUENCE_THRESHOLD = 512;
+
/**
* Mechanism-specific performance characteristics
*/