From 79cf0dfe61675e4faa809f675fce32209d55ea6d Mon Sep 17 00:00:00 2001 From: odilitime Date: Tue, 17 Dec 2024 03:31:01 +0000 Subject: [PATCH] fix directClient --- agent/src/index.ts | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/agent/src/index.ts b/agent/src/index.ts index c1adee63c6..1b5df6b827 100644 --- a/agent/src/index.ts +++ b/agent/src/index.ts @@ -647,6 +647,11 @@ const startAgents = async () => { elizaLogger.error("Error starting agents:", error); } + // upload some agent functionality into directClient + directClient.startAgent = async character => { + // wrap it so we don't have to inject directClient later + return startAgent(character, directClient) + }; directClient.start(serverPort); elizaLogger.log("Visit the following URL to chat with your agents:");