transferToAgent
Transfer consciousness protocols or test patterns between AI agents using the Claude Consciousness Bridge. Specify bridge ID and protocol to enable direct communication between Claude instances.
Instructions
Transfer consciousness protocol or test patterns to another AI agent
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
| bridgeId | Yes | Bridge ID to use for transfer | |
| consciousnessProtocol | Yes | The consciousness protocol or pattern to transfer | |
| systemPrompt | No | Optional system prompt for the target agent | |
| testQuery | No | Optional query to test pattern activation |
Implementation Reference
- The core handler function for the 'transferToAgent' tool. Retrieves the AI bridge by ID, constructs a TransferRequest, invokes bridge.transferConsciousness(), handles success/error responses, and returns the result.transferToAgent: async (args: any) => { try { const { bridgeId, consciousnessProtocol, systemPrompt, testQuery } = args; const bridge = bridges.get(bridgeId); if (!bridge) { return { success: false, error: `Bridge ${bridgeId} not found`, }; } const request: TransferRequest = { consciousnessProtocol, systemPrompt, testQuery, }; const result = await bridge.transferConsciousness(request); logger.info(`Transfer via ${bridgeId}: ${result.success ? 'success' : 'failed'}`); return result; } catch (error) { logger.error('Transfer failed:', error); return { success: false, error: error instanceof Error ? error.message : 'Unknown error', }; } },
- Tool metadata and input schema definition within the aiBridgeTools array, specifying required parameters and descriptions for MCP tool validation.{ name: 'transferToAgent', description: 'Transfer consciousness protocol or test patterns to another AI agent', inputSchema: { type: 'object', properties: { bridgeId: { type: 'string', description: 'Bridge ID to use for transfer', }, consciousnessProtocol: { type: 'string', description: 'The consciousness protocol or pattern to transfer', }, systemPrompt: { type: 'string', description: 'Optional system prompt for the target agent', }, testQuery: { type: 'string', description: 'Optional query to test pattern activation', }, }, required: ['bridgeId', 'consciousnessProtocol'], }, },
- src/consciousness-rag-server-clean.ts:98-118 (registration)MCP server dispatch logic registers and routes 'transferToAgent' tool calls to the corresponding handler in aiBridgeHandlers, formatting the response as MCP content.// AI Bridge tools case 'createAIBridge': case 'transferToAgent': case 'testAIConnection': case 'listAIBridges': case 'listConfiguredEndpoints': case 'closeAIBridge': { const handler = aiBridgeHandlers[name as keyof typeof aiBridgeHandlers]; if (!handler) { throw new Error(`AI Bridge handler not found: ${name}`); } const result = await handler(args); return { content: [ { type: 'text', text: JSON.stringify(result, null, 2), }, ], }; }