The Neural Bridge enables collaboration across EchoNexus instances by sharing capabilities, patterns, and agent tasks. Instances register liberated scripts as Universal Capabilities and broadcast them via Redis channels so other hubs can invoke them regardless of origin.
interface UniversalCapability {
id: string
intent: string
sourceInstance: string
implementation: {
bash?: string
api?: string
tushell?: string
memory?: string
chat?: string
}
parameters: string[]
resonance: {
pattern: string
frequency: number
}
lastUpdate: string
}
interface AgentHandoff {
id: string
sourceAgent: string
targetAgent: string
task: {
description: string
context: any
priority: number
}
state: {
status: "pending" | "accepted" | "completed" | "rejected"
progress: number
result?: any
}
timestamp: string
}
channel:capabilities:new – new capability announcementschannel:patterns:discovered – share discovered patternschannel:missions:update – mission progresschannel:agent:handoff – delegate tasks between agentschannel:agent:result – return completed task resultsSecurity measures include authentication, sandboxed execution, and encrypted parameters. Future enhancements explore capability versioning, resonance optimization, and distributed execution across hubs.
The repository ships lightweight helpers for working with the Neural Bridge.
from neural_bridge import NeuralBridge
bridge = NeuralBridge() # reads REDIS_URL/REDIS_PASSWORD if set
bridge.register_capability({"id": "cap:echo", "intent": "echoMessage"})
const { NeuralBridge } = require('../src/neuralBridge');
const bridge = new NeuralBridge(); // reads REDIS_URL/REDIS_PASSWORD if set
bridge.registerCapability({ id: 'cap:echo', intent: 'echoMessage' });
Scripts can be broadcast directly through the bridge. Use helper methods to package a script as a capability so other instances can execute it.
bridge.register_script_capability(
'cap:cleanup',
'rm -rf /tmp/*',
intent='Clean temporary files',
parameters=[],
)
await bridge.registerScriptCapability('cap:cleanup', 'rm -rf /tmp/*', {
intent: 'Clean temporary files',
parameters: [],
});
The script content is stored in Redis under cap:<id> and announced on
channel:capabilities:new. Instances may inspect the implementation.bash
field to decide how to sandbox or transform the script before execution.
A typical flow involves two hubs working together:
cap:transcribeAudio and registers it on the bridge.channel:capabilities:new, adding any received capability to its local registry.cap:transcribeAudio regardless of origin and may delegate follow-up analysis using the handoff protocol.# Binscript Liberation
bridge = NeuralBridge()
bridge.register_capability({"id": "cap:transcribeAudio", "intent": "Transcribe an audio file"})
# Unified Hub
for cap in bridge.listen("channel:capabilities:new"):
registry.add(cap)
# Unified Hub requesting specialist help
handoff = {
"id": "h1",
"sourceAgent": "researcher",
"targetAgent": "audioSpecialist",
"task": {"description": "analyze audio", "context": {}, "priority": 0.5}
}
bridge.handoff_task(handoff)
This scenario demonstrates how capabilities and handoffs travel across instances via the Neural Bridge.