diff --git a/agent/jest.config.js b/agent/jest.config.js
new file mode 100644
index 00000000000..927b0b43d22
--- /dev/null
+++ b/agent/jest.config.js
@@ -0,0 +1,17 @@
+/** @type {import('ts-jest').JestConfigWithTsJest} */
+export default {
+  preset: 'ts-jest',
+  testEnvironment: 'node',
+  extensionsToTreatAsEsm: ['.ts'],
+  moduleNameMapper: {
+    '^(\\.{1,2}/.*)\\.js$': '$1',
+  },
+  transform: {
+    '^.+\\.tsx?$': [
+      'ts-jest',
+      {
+        useESM: true,
+      },
+    ],
+  },
+};
\ No newline at end of file
diff --git a/agent/package.json b/agent/package.json
index 91a900d6006..158db8a0fb2 100644
--- a/agent/package.json
+++ b/agent/package.json
@@ -6,7 +6,8 @@
   "scripts": {
     "start": "node --loader ts-node/esm src/index.ts",
     "dev": "node --loader ts-node/esm src/index.ts",
-    "check-types": "tsc --noEmit"
+    "check-types": "tsc --noEmit",
+    "test": "jest"
   },
   "nodemonConfig": {
     "watch": [
@@ -25,37 +26,40 @@
     "@elizaos/client-discord": "workspace:*",
     "@elizaos/client-farcaster": "workspace:*",
     "@elizaos/client-lens": "workspace:*",
+    "@elizaos/client-slack": "workspace:*",
     "@elizaos/client-telegram": "workspace:*",
     "@elizaos/client-twitter": "workspace:*",
-    "@elizaos/client-slack": "workspace:*",
     "@elizaos/core": "workspace:*",
     "@elizaos/plugin-0g": "workspace:*",
     "@elizaos/plugin-aptos": "workspace:*",
     "@elizaos/plugin-bootstrap": "workspace:*",
-    "@elizaos/plugin-intiface": "workspace:*",
     "@elizaos/plugin-coinbase": "workspace:*",
     "@elizaos/plugin-conflux": "workspace:*",
     "@elizaos/plugin-evm": "workspace:*",
     "@elizaos/plugin-flow": "workspace:*",
-    "@elizaos/plugin-story": "workspace:*",
     "@elizaos/plugin-goat": "workspace:*",
     "@elizaos/plugin-icp": "workspace:*",
     "@elizaos/plugin-image-generation": "workspace:*",
+    "@elizaos/plugin-intiface": "workspace:*",
+    "@elizaos/plugin-multiversx": "workspace:*",
+    "@elizaos/plugin-near": "workspace:*",
     "@elizaos/plugin-nft-generation": "workspace:*",
     "@elizaos/plugin-node": "workspace:*",
     "@elizaos/plugin-solana": "workspace:*",
     "@elizaos/plugin-starknet": "workspace:*",
-    "@elizaos/plugin-ton": "workspace:*",
+    "@elizaos/plugin-story": "workspace:*",
     "@elizaos/plugin-sui": "workspace:*",
     "@elizaos/plugin-tee": "workspace:*",
-    "@elizaos/plugin-multiversx": "workspace:*",
-    "@elizaos/plugin-near": "workspace:*",
+    "@elizaos/plugin-ton": "workspace:*",
     "@elizaos/plugin-zksync-era": "workspace:*",
     "readline": "1.3.0",
     "ws": "8.18.0",
     "yargs": "17.7.2"
   },
   "devDependencies": {
+    "@types/jest": "^29.5.14",
+    "jest": "^29.7.0",
+    "ts-jest": "^29.2.5",
     "ts-node": "10.9.2",
     "tsup": "8.3.5"
   }
diff --git a/agent/src/__tests__/client-type-identification.test.ts b/agent/src/__tests__/client-type-identification.test.ts
new file mode 100644
index 00000000000..602743e16fc
--- /dev/null
+++ b/agent/src/__tests__/client-type-identification.test.ts
@@ -0,0 +1,53 @@
+import { Client, IAgentRuntime } from "@elizaos/core";
+import { describe, it, expect } from '@jest/globals';
+
+// Helper function to identify client types
+function determineClientType(client: Client): string {
+    // Check if client has a direct type identifier
+    if ('type' in client) {
+        return (client as any).type;
+    }
+
+    // Check constructor name
+    const constructorName = client.constructor?.name;
+    if (constructorName && !constructorName.includes('Object')) {
+        return constructorName.toLowerCase().replace('client', '');
+    }
+
+    // Fallback: Generate a unique identifier
+    return `client_${Date.now()}`;
+}
+
+// Mock client implementations for testing
+class MockNamedClient implements Client {
+    type = "named-client";
+    async start(_runtime?: IAgentRuntime) { return this; }
+    async stop(_runtime?: IAgentRuntime) { }
+}
+
+class MockConstructorClient implements Client {
+    async start(_runtime?: IAgentRuntime) { return this; }
+    async stop(_runtime?: IAgentRuntime) { }
+}
+
+const mockPlainClient: Client = {
+    async start(_runtime?: IAgentRuntime) { return {}; },
+    async stop(_runtime?: IAgentRuntime) { }
+};
+
+describe("Client Type Identification", () => {
+    it("should identify client type from type property", () => {
+        const client = new MockNamedClient();
+        expect(determineClientType(client)).toBe("named-client");
+    });
+
+    it("should identify client type from constructor name", () => {
+        const client = new MockConstructorClient();
+        expect(determineClientType(client)).toBe("mockconstructor");
+    });
+
+    it("should generate fallback identifier for plain objects", () => {
+        const result = determineClientType(mockPlainClient);
+        expect(result).toMatch(/^client_\d+$/);
+    });
+});
\ No newline at end of file
diff --git a/agent/src/index.ts b/agent/src/index.ts
index 1e49bae84ff..2fa938bcc77 100644
--- a/agent/src/index.ts
+++ b/agent/src/index.ts
@@ -17,7 +17,6 @@ import {
     elizaLogger,
     FsCacheAdapter,
     IAgentRuntime,
-    ICacheManager,
     IDatabaseAdapter,
     IDatabaseCacheAdapter,
     ModelProviderName,
@@ -25,6 +24,8 @@ import {
     stringToUuid,
     validateCharacterConfig,
     CacheStore,
+    Client,
+    ICacheManager,
 } from "@elizaos/core";
 import { RedisClient } from "@elizaos/adapter-redis";
 import { zgPlugin } from "@elizaos/plugin-0g";
@@ -418,12 +419,30 @@ export async function initializeClients(
         if (slackClient) clients.slack = slackClient; // Use object property instead of push
     }
 
+    function determineClientType(client: Client): string {
+        // Check if client has a direct type identifier
+        if ('type' in client) {
+            return (client as any).type;
+        }
+
+        // Check constructor name
+        const constructorName = client.constructor?.name;
+        if (constructorName && !constructorName.includes('Object')) {
+            return constructorName.toLowerCase().replace('client', '');
+        }
+
+        // Fallback: Generate a unique identifier
+        return `client_${Date.now()}`;
+    }
+
     if (character.plugins?.length > 0) {
         for (const plugin of character.plugins) {
             if (plugin.clients) {
                 for (const client of plugin.clients) {
                     const startedClient = await client.start(runtime);
-                    clients[client.name] = startedClient; // Assuming client has a name property
+                    const clientType = determineClientType(client);
+                    elizaLogger.debug(`Initializing client of type: ${clientType}`);
+                    clients[clientType] = startedClient;
                 }
             }
         }
diff --git a/agent/tsconfig.json b/agent/tsconfig.json
index a959a90103c..3d4700eb634 100644
--- a/agent/tsconfig.json
+++ b/agent/tsconfig.json
@@ -6,7 +6,8 @@
         "module": "ESNext",
         "moduleResolution": "Bundler",
         "types": [
-            "node"
+            "node",
+            "jest"
         ]
     },
     "ts-node": {