diff --git a/agent/src/index.ts b/agent/src/index.ts index 8e8e93ccc8..d4f0448f63 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:");