diff --git a/examples/.env.template b/examples/.env.template index 3bf48a935..65c1dc759 100644 --- a/examples/.env.template +++ b/examples/.env.template @@ -1,7 +1,9 @@ +# example .env file for cognee docker integration LLM_API_KEY= ENABLE_BACKEND_ACCESS_CONTROL="false" +# ~/.clawdbot/ .env file for clawdbot gateway COGNEE_API_KEY= CLAWDBOT_GATEWAY_TOKEN= \ No newline at end of file diff --git a/examples/cognee-config.yaml b/examples/cognee-config.yaml index 4279c0add..5412b992b 100644 --- a/examples/cognee-config.yaml +++ b/examples/cognee-config.yaml @@ -16,7 +16,8 @@ agents: # For Cognee Cloud, use: # baseUrl: https://cognee--cognee-saas-backend-serve.modal.run - # apiKey: your-api-key-here + # Cognee API key is stored in the .env file + apiKey: ${COGNEE_API_KEY} # Dataset name for organizing memories datasetName: clawdbot diff --git a/src/config/config.ts b/src/config/config.ts index e0bfc48a5..ab78f38f7 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -12,3 +12,5 @@ export * from "./runtime-overrides.js"; export * from "./types.js"; export { validateConfigObject, validateConfigObjectWithPlugins } from "./validation.js"; export { MoltbotSchema } from "./zod-schema.js"; + +export type { MoltbotConfig as ClawdbotConfig } from "./types.js"; diff --git a/src/memory/cognee-provider.ts b/src/memory/cognee-provider.ts index 11f224411..44ecc309b 100644 --- a/src/memory/cognee-provider.ts +++ b/src/memory/cognee-provider.ts @@ -1,6 +1,6 @@ import fs from "node:fs/promises"; import path from "node:path"; -import type { ClawdbotConfig } from "../config/config.js"; +import type { MoltbotConfig } from "../config/config.js"; import { resolveAgentWorkspaceDir } from "../agents/agent-scope.js"; import { resolveSessionTranscriptsDirForAgent } from "../config/sessions/paths.js"; import { createSubsystemLogger } from "../logging/subsystem.js"; @@ -40,7 +40,7 @@ export type CogneeMemorySource = "memory" | "sessions"; export class CogneeMemoryProvider { private readonly client: CogneeClient; - private readonly cfg: ClawdbotConfig; + private readonly cfg: MoltbotConfig; private readonly agentId: string; private readonly workspaceDir: string; private readonly datasetName: string; @@ -53,7 +53,7 @@ export class CogneeMemoryProvider { private syncedFiles = new Map(); // path -> hash constructor( - cfg: ClawdbotConfig, + cfg: MoltbotConfig, agentId: string, sources: Array, config: CogneeProviderConfig = {}, @@ -412,7 +412,7 @@ export class CogneeMemoryProvider { } export async function createCogneeProvider( - cfg: ClawdbotConfig, + cfg: MoltbotConfig, agentId: string, sources: Array, config: CogneeProviderConfig = {},