@dxos/assistant-toolkit 0.8.4-main.ae835ea
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +8 -0
- package/README.md +3 -0
- package/dist/lib/browser/index.mjs +2481 -0
- package/dist/lib/browser/index.mjs.map +7 -0
- package/dist/lib/browser/meta.json +1 -0
- package/dist/lib/node-esm/index.mjs +2483 -0
- package/dist/lib/node-esm/index.mjs.map +7 -0
- package/dist/lib/node-esm/meta.json +1 -0
- package/dist/types/src/blueprints/design/design-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/design/design-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/design/design-blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/design/index.d.ts +3 -0
- package/dist/types/src/blueprints/design/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/discord/discord-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/discord/index.d.ts +3 -0
- package/dist/types/src/blueprints/discord/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/index.d.ts +7 -0
- package/dist/types/src/blueprints/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/index.d.ts +3 -0
- package/dist/types/src/blueprints/linear/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts +18 -0
- package/dist/types/src/blueprints/linear/linear-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/index.d.ts +3 -0
- package/dist/types/src/blueprints/planning/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/planning/planning-blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/index.d.ts +3 -0
- package/dist/types/src/blueprints/research/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/research-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/research/research-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts +2 -0
- package/dist/types/src/blueprints/research/research-blueprint.test.d.ts.map +1 -0
- package/dist/types/src/blueprints/testing.d.ts +12 -0
- package/dist/types/src/blueprints/testing.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/index.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/index.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts +4 -0
- package/dist/types/src/blueprints/websearch/websearch-blueprint.d.ts.map +1 -0
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts +26 -0
- package/dist/types/src/blueprints/websearch/websearch-toolkit.d.ts.map +1 -0
- package/dist/types/src/experimental/feed.test.d.ts +2 -0
- package/dist/types/src/experimental/feed.test.d.ts.map +1 -0
- package/dist/types/src/functions/agent/index.d.ts +5 -0
- package/dist/types/src/functions/agent/index.d.ts.map +1 -0
- package/dist/types/src/functions/agent/prompt.d.ts +11 -0
- package/dist/types/src/functions/agent/prompt.d.ts.map +1 -0
- package/dist/types/src/functions/discord/fetch-messages.d.ts +11 -0
- package/dist/types/src/functions/discord/fetch-messages.d.ts.map +1 -0
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts +2 -0
- package/dist/types/src/functions/discord/fetch-messages.test.d.ts.map +1 -0
- package/dist/types/src/functions/discord/index.d.ts +12 -0
- package/dist/types/src/functions/discord/index.d.ts.map +1 -0
- package/dist/types/src/functions/document/index.d.ts +12 -0
- package/dist/types/src/functions/document/index.d.ts.map +1 -0
- package/dist/types/src/functions/document/read.d.ts +7 -0
- package/dist/types/src/functions/document/read.d.ts.map +1 -0
- package/dist/types/src/functions/document/update.d.ts +6 -0
- package/dist/types/src/functions/document/update.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts +173 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts +2 -0
- package/dist/types/src/functions/entity-extraction/entity-extraction.test.d.ts.map +1 -0
- package/dist/types/src/functions/entity-extraction/index.d.ts +174 -0
- package/dist/types/src/functions/entity-extraction/index.d.ts.map +1 -0
- package/dist/types/src/functions/exa/exa.d.ts +5 -0
- package/dist/types/src/functions/exa/exa.d.ts.map +1 -0
- package/dist/types/src/functions/exa/index.d.ts +3 -0
- package/dist/types/src/functions/exa/index.d.ts.map +1 -0
- package/dist/types/src/functions/exa/mock.d.ts +5 -0
- package/dist/types/src/functions/exa/mock.d.ts.map +1 -0
- package/dist/types/src/functions/github/fetch-prs.d.ts +6 -0
- package/dist/types/src/functions/github/fetch-prs.d.ts.map +1 -0
- package/dist/types/src/functions/index.d.ts +8 -0
- package/dist/types/src/functions/index.d.ts.map +1 -0
- package/dist/types/src/functions/linear/index.d.ts +9 -0
- package/dist/types/src/functions/linear/index.d.ts.map +1 -0
- package/dist/types/src/functions/linear/linear.test.d.ts +2 -0
- package/dist/types/src/functions/linear/linear.test.d.ts.map +1 -0
- package/dist/types/src/functions/linear/sync-issues.d.ts +12 -0
- package/dist/types/src/functions/linear/sync-issues.d.ts.map +1 -0
- package/dist/types/src/functions/research/create-document.d.ts +7 -0
- package/dist/types/src/functions/research/create-document.d.ts.map +1 -0
- package/dist/types/src/functions/research/graph.d.ts +64 -0
- package/dist/types/src/functions/research/graph.d.ts.map +1 -0
- package/dist/types/src/functions/research/graph.test.d.ts +2 -0
- package/dist/types/src/functions/research/graph.test.d.ts.map +1 -0
- package/dist/types/src/functions/research/index.d.ts +19 -0
- package/dist/types/src/functions/research/index.d.ts.map +1 -0
- package/dist/types/src/functions/research/research-graph.d.ts +18 -0
- package/dist/types/src/functions/research/research-graph.d.ts.map +1 -0
- package/dist/types/src/functions/research/research.d.ts +13 -0
- package/dist/types/src/functions/research/research.d.ts.map +1 -0
- package/dist/types/src/functions/research/research.test.d.ts +2 -0
- package/dist/types/src/functions/research/research.test.d.ts.map +1 -0
- package/dist/types/src/functions/research/types.d.ts +384 -0
- package/dist/types/src/functions/research/types.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/index.d.ts +15 -0
- package/dist/types/src/functions/tasks/index.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/read.d.ts +7 -0
- package/dist/types/src/functions/tasks/read.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/task-list.d.ts +74 -0
- package/dist/types/src/functions/tasks/task-list.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/task-list.test.d.ts +2 -0
- package/dist/types/src/functions/tasks/task-list.test.d.ts.map +1 -0
- package/dist/types/src/functions/tasks/update.d.ts +9 -0
- package/dist/types/src/functions/tasks/update.d.ts.map +1 -0
- package/dist/types/src/index.d.ts +5 -0
- package/dist/types/src/index.d.ts.map +1 -0
- package/dist/types/src/plugins.d.ts +19 -0
- package/dist/types/src/plugins.d.ts.map +1 -0
- package/dist/types/src/sync/index.d.ts +2 -0
- package/dist/types/src/sync/index.d.ts.map +1 -0
- package/dist/types/src/sync/sync.d.ts +15 -0
- package/dist/types/src/sync/sync.d.ts.map +1 -0
- package/dist/types/src/testing/data/exa-search-1748337321991.d.ts +38 -0
- package/dist/types/src/testing/data/exa-search-1748337321991.d.ts.map +1 -0
- package/dist/types/src/testing/data/exa-search-1748337331526.d.ts +37 -0
- package/dist/types/src/testing/data/exa-search-1748337331526.d.ts.map +1 -0
- package/dist/types/src/testing/data/exa-search-1748337344119.d.ts +58 -0
- package/dist/types/src/testing/data/exa-search-1748337344119.d.ts.map +1 -0
- package/dist/types/src/testing/data/index.d.ts +3 -0
- package/dist/types/src/testing/data/index.d.ts.map +1 -0
- package/dist/types/src/testing/index.d.ts +2 -0
- package/dist/types/src/testing/index.d.ts.map +1 -0
- package/dist/types/src/util/graphql.d.ts +22 -0
- package/dist/types/src/util/graphql.d.ts.map +1 -0
- package/dist/types/src/util/index.d.ts +2 -0
- package/dist/types/src/util/index.d.ts.map +1 -0
- package/dist/types/tsconfig.tsbuildinfo +1 -0
- package/package.json +67 -0
- package/src/blueprints/design/design-blueprint.test.ts +108 -0
- package/src/blueprints/design/design-blueprint.ts +33 -0
- package/src/blueprints/design/index.ts +7 -0
- package/src/blueprints/discord/discord-blueprint.ts +34 -0
- package/src/blueprints/discord/index.ts +7 -0
- package/src/blueprints/index.ts +10 -0
- package/src/blueprints/linear/index.ts +7 -0
- package/src/blueprints/linear/linear-blueprint.ts +35 -0
- package/src/blueprints/planning/index.ts +7 -0
- package/src/blueprints/planning/planning-blueprint.test.ts +129 -0
- package/src/blueprints/planning/planning-blueprint.ts +98 -0
- package/src/blueprints/research/index.ts +7 -0
- package/src/blueprints/research/research-blueprint.test.ts +7 -0
- package/src/blueprints/research/research-blueprint.ts +45 -0
- package/src/blueprints/testing.ts +34 -0
- package/src/blueprints/websearch/index.ts +8 -0
- package/src/blueprints/websearch/websearch-blueprint.ts +20 -0
- package/src/blueprints/websearch/websearch-toolkit.ts +8 -0
- package/src/experimental/feed.test.ts +108 -0
- package/src/functions/agent/index.ts +11 -0
- package/src/functions/agent/prompt.ts +101 -0
- package/src/functions/discord/fetch-messages.test.ts +59 -0
- package/src/functions/discord/fetch-messages.ts +251 -0
- package/src/functions/discord/index.ts +9 -0
- package/src/functions/document/index.ts +11 -0
- package/src/functions/document/read.ts +29 -0
- package/src/functions/document/update.ts +30 -0
- package/src/functions/entity-extraction/entity-extraction.conversations.json +1 -0
- package/src/functions/entity-extraction/entity-extraction.test.ts +100 -0
- package/src/functions/entity-extraction/entity-extraction.ts +163 -0
- package/src/functions/entity-extraction/index.ts +9 -0
- package/src/functions/exa/exa.ts +37 -0
- package/src/functions/exa/index.ts +6 -0
- package/src/functions/exa/mock.ts +71 -0
- package/src/functions/github/fetch-prs.ts +30 -0
- package/src/functions/index.ts +11 -0
- package/src/functions/linear/index.ts +9 -0
- package/src/functions/linear/linear.test.ts +86 -0
- package/src/functions/linear/sync-issues.ts +189 -0
- package/src/functions/research/create-document.ts +69 -0
- package/src/functions/research/graph.test.ts +69 -0
- package/src/functions/research/graph.ts +388 -0
- package/src/functions/research/index.ts +15 -0
- package/src/functions/research/instructions-research.tpl +98 -0
- package/src/functions/research/research-graph.ts +47 -0
- package/src/functions/research/research.conversations.json +10714 -0
- package/src/functions/research/research.test.ts +240 -0
- package/src/functions/research/research.ts +155 -0
- package/src/functions/research/types.ts +24 -0
- package/src/functions/tasks/index.ts +11 -0
- package/src/functions/tasks/read.ts +34 -0
- package/src/functions/tasks/task-list.test.ts +99 -0
- package/src/functions/tasks/task-list.ts +165 -0
- package/src/functions/tasks/update.ts +52 -0
- package/src/index.ts +8 -0
- package/src/plugins.tsx +68 -0
- package/src/sync/index.ts +5 -0
- package/src/sync/sync.ts +87 -0
- package/src/testing/data/exa-search-1748337321991.ts +131 -0
- package/src/testing/data/exa-search-1748337331526.ts +144 -0
- package/src/testing/data/exa-search-1748337344119.ts +133 -0
- package/src/testing/data/index.ts +11 -0
- package/src/testing/index.ts +5 -0
- package/src/typedefs.d.ts +8 -0
- package/src/util/graphql.ts +31 -0
- package/src/util/index.ts +5 -0
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../../../src/blueprints/design/design-blueprint.ts", "../../../src/functions/agent/prompt.ts", "../../../src/functions/agent/index.ts", "../../../src/functions/discord/fetch-messages.ts", "../../../src/functions/discord/index.ts", "../../../src/functions/document/read.ts", "../../../src/functions/document/update.ts", "../../../src/functions/document/index.ts", "../../../src/functions/entity-extraction/entity-extraction.ts", "../../../src/functions/research/create-document.ts", "../../../src/functions/research/research.ts", "../../../src/functions/exa/exa.ts", "../../../src/functions/exa/mock.ts", "../../../src/testing/data/exa-search-1748337321991.ts", "../../../src/testing/data/exa-search-1748337331526.ts", "../../../src/testing/data/exa-search-1748337344119.ts", "../../../src/testing/data/index.ts", "../../../src/functions/research/graph.ts", "raw-loader:/__w/dxos/dxos/packages/core/assistant-toolkit/src/functions/research/instructions-research.tpl?raw", "../../../src/functions/research/research-graph.ts", "../../../src/functions/research/types.ts", "../../../src/functions/research/index.ts", "../../../src/functions/entity-extraction/index.ts", "../../../src/functions/linear/sync-issues.ts", "../../../src/sync/sync.ts", "../../../src/util/graphql.ts", "../../../src/functions/linear/index.ts", "../../../src/functions/tasks/read.ts", "../../../src/functions/tasks/update.ts", "../../../src/functions/tasks/task-list.ts", "../../../src/functions/tasks/index.ts", "../../../src/blueprints/design/index.ts", "../../../src/blueprints/discord/discord-blueprint.ts", "../../../src/blueprints/discord/index.ts", "../../../src/blueprints/linear/linear-blueprint.ts", "../../../src/blueprints/linear/index.ts", "../../../src/blueprints/planning/planning-blueprint.ts", "../../../src/blueprints/planning/index.ts", "../../../src/blueprints/research/research-blueprint.ts", "../../../src/blueprints/research/index.ts", "../../../src/blueprints/websearch/websearch-blueprint.ts", "../../../src/blueprints/websearch/websearch-toolkit.ts", "../../../src/blueprints/websearch/index.ts", "../../../src/plugins.tsx"],
|
|
4
|
+
"sourcesContent": ["//\n// Copyright 2025 DXOS.org\n//\n\nimport { ToolId } from '@dxos/ai';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Obj, Ref } from '@dxos/echo';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { Document } from '../../functions';\n\nconst instructions = trim`\n You manage a design spec based on the conversation.\n The design spec is a markdown document that is used to record the tasks.\n The design spec document follows a hierarchical structure, with nested markdown bulleted sections.\n Use the appropriate tools to read and write the design spec document.\n Maintain the document so that it can convey all relevant points from the conversation.\n When replying to the user, be terse with your comments about design doc handling.\n Do not announce when you read or write the design spec document.\n`;\n\nconst blueprint: Blueprint.Blueprint = Obj.make(Blueprint.Blueprint, {\n key: 'dxos.org/blueprint/design',\n name: 'Design Spec',\n description: 'Preserve the conversation in the design spec.',\n instructions: {\n source: Ref.make(DataType.makeText(instructions)),\n },\n tools: [Document.read, Document.update].map((fn) => ToolId.make(fn.key)),\n});\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Array from 'effect/Array';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { AiService, ConsolePrinter, ModelName } from '@dxos/ai';\nimport { AiSession, GenerationObserver, createToolkit } from '@dxos/assistant';\nimport { Prompt, Template } from '@dxos/blueprints';\nimport { Obj, Ref, Type } from '@dxos/echo';\nimport { DatabaseService, TracingService, defineFunction } from '@dxos/functions';\nimport { log } from '@dxos/log';\n\nconst DEFAULT_MODEL: ModelName = '@anthropic/claude-opus-4-0';\n\nexport default defineFunction({\n key: 'dxos.org/function/prompt',\n name: 'Agent',\n description: 'Agentic worker that executes a provided prompt using blueprints and tools.',\n inputSchema: Schema.Struct({\n prompt: Type.Ref(Prompt.Prompt),\n systemPrompt: Type.Ref(Prompt.Prompt).pipe(Schema.optional),\n /**\n * @default @anthropic/claude-opus-4-0\n */\n model: Schema.optional(ModelName),\n /**\n * Input object or data.\n * References get auto-resolved.\n */\n input: Schema.Record({ key: Schema.String, value: Schema.Any }),\n }),\n outputSchema: Schema.Any,\n handler: Effect.fnUntraced(function* ({ data }) {\n log.info('processing input', { input: data.input });\n\n const input = { ...data.input };\n for (const key of Object.keys(data.input)) {\n const value = data.input[key];\n if (Ref.isRef(value)) {\n const object = yield* DatabaseService.load(value);\n input[key] = Obj.toJSON(object);\n } else {\n input[key] = JSON.stringify(value);\n }\n }\n\n yield* DatabaseService.flush({ indexes: true });\n const prompt = yield* DatabaseService.load(data.prompt);\n const systemPrompt = data.systemPrompt ? yield* DatabaseService.load(data.systemPrompt) : undefined;\n yield* TracingService.emitStatus({ message: `Running ${prompt.id}` });\n\n log.info('starting agent', { prompt: prompt.id, input: data.input });\n\n const blueprints = yield* Function.pipe(\n prompt.blueprints,\n Array.appendAll(systemPrompt?.blueprints ?? []),\n Effect.forEach(DatabaseService.loadOption),\n Effect.map(Array.filter(Option.isSome)),\n Effect.map(Array.map((option) => option.value)),\n );\n const objects = yield* Function.pipe(\n prompt.context,\n Array.appendAll(systemPrompt?.context ?? []),\n Effect.forEach(DatabaseService.loadOption),\n Effect.map(Array.filter(Option.isSome)),\n Effect.map(Array.map((option) => option.value)),\n );\n const toolkit = yield* createToolkit({ blueprints });\n\n const promptInstructions = yield* DatabaseService.load(prompt.instructions.source);\n const promptText = Template.process(promptInstructions.content, input);\n\n const systemInstructions = systemPrompt ? yield* DatabaseService.load(systemPrompt.instructions.source) : undefined;\n const systemText = systemInstructions ? Template.process(systemInstructions.content, {}) : undefined;\n\n const session = new AiSession();\n const result = yield* session\n .run({\n prompt: promptText,\n system: systemText,\n blueprints,\n objects: objects as Obj.Any[],\n toolkit,\n observer: GenerationObserver.fromPrinter(new ConsolePrinter({ tag: 'agent' })),\n })\n .pipe(Effect.provide(AiService.model(data.model ?? DEFAULT_MODEL)));\n const lastBlock = result\n .at(-1)\n ?.blocks.filter((block) => block._tag === 'text')\n .at(-1);\n\n return {\n note: lastBlock?.text,\n };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { type FunctionDefinition } from '@dxos/functions';\n\nimport { default as prompt$ } from './prompt';\n\nexport namespace Agent {\n export const prompt: FunctionDefinition.Any = prompt$; // TODO(burdon): Temp fix for TS error.\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport { DiscordConfig, DiscordREST, DiscordRESTMemoryLive } from 'dfx';\nimport type {\n GuildChannelResponse,\n MessageResponse,\n PrivateChannelResponse,\n PrivateGroupChannelResponse,\n ThreadResponse,\n} from 'dfx/types';\nimport * as Array from 'effect/Array';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Layer from 'effect/Layer';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\n\nimport { Obj } from '@dxos/echo';\nimport { CredentialsService, TracingService, defineFunction } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { DataType } from '@dxos/schema';\n\n// TODO(dmaretskyi): Extract.\nconst TimeRange = class extends Schema.String.pipe(Schema.pattern(/\\d+(s|m|h|d)/)).annotations({\n description: 'Time range. 1d - 1 day, 2h - 2 hours, 30m - 30 minutes, 15s - 15 seconds.',\n examples: ['1d', '2h', '30m', '15s'],\n}) {\n static toSeconds(timeRange: Schema.Schema.Type<typeof TimeRange>) {\n const match = timeRange.match(/(\\d+)(s|m|h|d)/);\n if (!match) {\n throw new Error(`Invalid time range: ${timeRange}`);\n }\n const [_, amount, unit] = match;\n switch (unit) {\n case 's':\n return Number(amount);\n case 'm':\n return Number(amount) * 60;\n case 'h':\n return Number(amount) * 60 * 60;\n case 'd':\n return Number(amount) * 24 * 60 * 60;\n default:\n throw new Error(`Invalid time range unit: ${unit}`);\n }\n }\n};\ntype TimeRange = Schema.Schema.Type<typeof TimeRange>;\n\nconst DiscordConfigFromCredential = Layer.unwrapEffect(\n Effect.gen(function* () {\n return DiscordConfig.layer({\n token: yield* CredentialsService.getApiKey({ service: 'discord.com' }),\n rest: {\n baseUrl: 'https://api-proxy.dxos.workers.dev/discord.com/api/v10',\n },\n });\n }),\n);\n\ntype DiscordChannel = GuildChannelResponse | PrivateChannelResponse | PrivateGroupChannelResponse | ThreadResponse;\n\nconst DEFAULT_AFTER = 1704067200; // 2024-01-01\nconst DEFAULT_LIMIT = 500;\nconst DEFAULT_IGNORE_USERNAMES = ['GitHub', 'Needle'];\n\n// TODO(dmaretskyi): Align with standard thread type.\ntype Thread = {\n discordChannelId: string;\n name?: string;\n messages: DataType.Message[];\n};\n\nexport default defineFunction({\n key: 'dxos.org/function/fetch-discord-messages',\n name: 'Sync Discord messages',\n inputSchema: Schema.Struct({\n serverId: Schema.String.annotations({\n description: 'The ID of the server to fetch messages from.',\n }),\n channelId: Schema.optional(Schema.String).annotations({\n description:\n 'The ID of the channel to fetch messages from. Will crawl all channels from the server if not specified.',\n }),\n after: Schema.optional(Schema.Number).annotations({\n description:\n 'Fetch messages that were sent after a given date. Unix timestamp in seconds. Exclusive with `last`.',\n }),\n last: TimeRange.annotations({\n description:\n 'Time range to fetch most recent messages. Specifies the range in the past, from now. \"1d\" would fetch messages from the last 24 hours.',\n }),\n limit: Schema.optional(Schema.Number).annotations({\n description: 'The maximum number of messages to fetch.',\n }),\n pageSize: Schema.optional(Schema.Number).annotations({\n description: 'The number of messages to fetch per page.',\n }),\n ignoreUsernames: Schema.optional(Schema.Array(Schema.String)).annotations({\n description: 'Exclude messages from these usernames.',\n }),\n }),\n handler: Effect.fnUntraced(\n function* ({\n data: {\n serverId,\n channelId,\n after,\n last,\n pageSize = 100,\n limit = DEFAULT_LIMIT,\n ignoreUsernames = DEFAULT_IGNORE_USERNAMES,\n },\n }) {\n if (!after && !last) {\n throw new Error('cannot specify both `after` and `last`');\n }\n const afterTs = last ? Date.now() / 1000 - TimeRange.toSeconds(last) : (after ?? DEFAULT_AFTER);\n\n const rest = yield* DiscordREST;\n\n let channels: DiscordChannel[] = [];\n channels.push(...(yield* rest.listGuildChannels(serverId)));\n const { threads: guildThreads } = yield* rest.getActiveGuildThreads(serverId);\n channels.push(...guildThreads);\n if (channelId) {\n channels = channels.filter((channel) => channel.id === channelId);\n }\n if (channels.length === 0) {\n throw new Error('no channels found');\n }\n for (const channel of channels) {\n console.log(channel.id, 'name' in channel ? channel.name : undefined);\n }\n\n yield* TracingService.emitStatus({ message: `Will fetch from channels: ${channels.length}` });\n\n const threads = yield* Effect.forEach(\n channels,\n Effect.fnUntraced(function* (channel) {\n const allMessages: DataType.Message[] = [];\n\n let lastMessage: Option.Option<DataType.Message> = Option.none();\n while (true) {\n const { id: lastId = undefined } = Function.pipe(\n lastMessage,\n Option.map(Obj.getKeys('discord.com')),\n Option.flatMap(Option.fromIterable),\n Option.getOrElse(() => ({ id: undefined })),\n );\n\n const options = {\n after: !lastId ? `${generateSnowflake(afterTs)}` : lastId,\n limit: pageSize,\n };\n log.info('fetching messages', {\n lastId,\n afterTs,\n afterSnowflake: options.after,\n after: parseSnowflake(options.after),\n limit: options.limit,\n });\n const messages = yield* rest.listMessages(channel.id, options).pipe(\n Effect.map(Array.map(makeMessage)),\n Effect.map(Array.reverse),\n Effect.catchTag('ErrorResponse', (err) =>\n err.cause.code === 50001 ? Effect.succeed([]) : Effect.fail(err),\n ),\n );\n if (messages.length > 0) {\n lastMessage = Option.fromNullable(messages.at(-1));\n allMessages.push(...messages);\n } else {\n break;\n }\n yield* TracingService.emitStatus({ message: `Fetched messages: ${allMessages.length}` });\n if (allMessages.length >= limit) {\n break;\n }\n }\n\n return {\n discordChannelId: channel.id,\n name: 'name' in channel ? (channel.name ?? undefined) : undefined,\n messages: allMessages\n .filter((message) => !message.sender.name || !ignoreUsernames.includes(message.sender.name))\n .filter((message) =>\n message.blocks.some((block) => block._tag === 'text' && block.text.trim().length > 0),\n ),\n } satisfies Thread;\n }),\n { concurrency: 10 },\n );\n\n return threads\n .filter((thread) => thread.messages.length > 0)\n .map(serializeThread)\n .join('\\n');\n },\n Effect.provide(\n DiscordRESTMemoryLive.pipe(Layer.provideMerge(DiscordConfigFromCredential)).pipe(\n Layer.provide(FetchHttpClient.layer),\n ),\n ),\n Effect.orDie,\n ),\n});\n\n/**\n * @param unixTimestamp in seconds\n */\nconst generateSnowflake = (unixTimestamp: number): bigint => {\n const discordEpoch = 1420070400000n; // Discord Epoch (ms)\n return (BigInt(unixTimestamp * 1000) - discordEpoch) << 22n;\n};\n\nconst parseSnowflake = (snowflake: string): Date => {\n const discordEpoch = 1420070400000n; // Discord Epoch (ms)\n return new Date(Number((BigInt(snowflake) >> 22n) + discordEpoch));\n};\n\nconst makeMessage = (message: MessageResponse): DataType.Message =>\n Obj.make(DataType.Message, {\n [Obj.Meta]: {\n keys: [\n { id: message.id, source: 'discord.com' },\n { id: message.channel_id, source: 'discord.com/thread' },\n ],\n },\n sender: { name: message.author.username },\n created: message.timestamp,\n blocks: [{ _tag: 'text', text: message.content }],\n });\n\n/**\n * Standard JSON serialization is to verbose for large amounts of data.\n */\nconst serializeThread = (thread: Thread): string => {\n return `<thread id=${thread.discordChannelId} name=${thread.name ?? ''}>\\n${thread.messages\n .map(\n (message) =>\n ` ${message.sender.name}: ${message.blocks\n .filter((block) => block._tag === 'text')\n .map((block) => block.text)\n .join(' ')}`,\n )\n .join('\\n')}\\n</thread>`;\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { default as fetch$ } from './fetch-messages';\n\nexport namespace Discord {\n export const fetch = fetch$;\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\nimport { Markdown } from '@dxos/plugin-markdown/types';\n\nexport default defineFunction({\n key: 'dxos.org/function/markdown/read',\n name: 'Read markdown document',\n description: 'Read markdown document.',\n inputSchema: Schema.Struct({\n id: ArtifactId.annotations({\n description: 'The ID of the document to read.',\n }),\n }),\n outputSchema: Schema.Struct({\n content: Schema.String,\n }),\n handler: Effect.fn(function* ({ data: { id } }) {\n const doc = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Markdown.Document);\n const { content } = yield* DatabaseService.load(doc.content);\n return { content };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\nimport { Markdown } from '@dxos/plugin-markdown/types';\n\nexport default defineFunction({\n key: 'dxos.org/function/markdown/update',\n name: 'Update markdown',\n description: 'Updates the entire contents of the markdown document.',\n inputSchema: Schema.Struct({\n id: ArtifactId.annotations({\n description: 'The ID of the document to write.',\n }),\n content: Schema.String.annotations({\n description: 'New content to write to the document.',\n }),\n }),\n outputSchema: Schema.Void,\n handler: Effect.fn(function* ({ data: { id, content } }) {\n const doc = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Markdown.Document);\n const text = yield* DatabaseService.load(doc.content);\n text.content = content;\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { default as read$ } from './read';\nimport { default as update$ } from './update';\n\nexport namespace Document {\n export const read = read$;\n export const update = update$;\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Toolkit from '@effect/ai/Toolkit';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\nimport * as Predicate from 'effect/Predicate';\nimport * as Schema from 'effect/Schema';\n\nimport { AiService } from '@dxos/ai';\nimport { AiSession, makeToolExecutionServiceFromFunctions, makeToolResolverFromFunctions } from '@dxos/assistant';\nimport { Filter, Obj, Ref } from '@dxos/echo';\nimport { DatabaseService, FunctionInvocationService, defineFunction } from '@dxos/functions';\nimport { type DXN } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { contextQueueLayerFromResearchGraph, makeGraphWriterHandler, makeGraphWriterToolkit } from '../research';\n\nexport default defineFunction({\n key: 'dxos.org/functions/entity-extraction',\n name: 'Entity Extraction',\n description: 'Extracts entities from emails and transcripts.',\n inputSchema: Schema.Struct({\n source: DataType.Message.annotations({ description: 'Email or transcript to extract entities from.' }),\n\n // TODO(dmaretskyi): Consider making this an array of blueprints instead.\n instructions: Schema.optional(Schema.String).annotations({ description: 'Instructions extraction process.' }),\n }),\n outputSchema: Schema.Struct({\n entities: Schema.optional(\n Schema.Array(Obj.Any).annotations({\n description: 'Extracted entities.',\n }),\n ),\n }),\n handler: Effect.fnUntraced(\n function* ({ data: { source, instructions } }) {\n const contact = yield* extractContact(source);\n let organization: DataType.Organization | null = null;\n\n if (contact && !contact.organization) {\n const created: DXN[] = [];\n const GraphWriterToolkit = makeGraphWriterToolkit({ schema: [DataType.LegacyOrganization] }).pipe();\n const GraphWriterHandler = makeGraphWriterHandler(GraphWriterToolkit, {\n onAppend: (dxns) => created.push(...dxns),\n });\n const toolkit = yield* GraphWriterToolkit.pipe(\n Effect.provide(GraphWriterHandler.pipe(Layer.provide(contextQueueLayerFromResearchGraph))),\n );\n\n yield* new AiSession().run({\n system: trim`\n Extract the sender's organization from the email. If you are not sure, do nothing.\n The extracted organization URL must match the sender's email domain.\n ${instructions ? '<user_intructions>' + instructions + '</user_intructions>' : ''},\n `,\n prompt: JSON.stringify({ source, contact }),\n toolkit,\n });\n\n if (created.length > 1) {\n throw new Error('Multiple organizations created');\n } else if (created.length === 1) {\n organization = yield* DatabaseService.resolve(created[0], DataType.Organization);\n Obj.getMeta(organization).tags ??= [];\n Obj.getMeta(organization).tags!.push(...(Obj.getMeta(source)?.tags ?? []));\n contact.organization = Ref.make(organization);\n }\n }\n\n return {\n entities: [contact, organization].filter(Predicate.isNotNullable),\n };\n },\n Effect.provide(\n Layer.mergeAll(\n AiService.model('@anthropic/claude-sonnet-4-0'), // TODO(dmaretskyi): Extract.\n makeToolResolverFromFunctions([], Toolkit.make()),\n makeToolExecutionServiceFromFunctions(Toolkit.make() as any, Layer.empty as any),\n ).pipe(\n Layer.provide(\n // TODO(dmaretskyi): This should be provided by environment.\n Layer.mergeAll(FunctionInvocationService.layerTest()),\n ),\n ),\n ),\n ),\n});\n\nconst extractContact = Effect.fn('extractContact')(function* (message: DataType.Message) {\n const name = message.sender.name;\n const email = message.sender.email;\n if (!email) {\n log.warn('email is required for contact extraction', { sender: message.sender });\n return undefined;\n }\n\n const { objects: existingContacts } = yield* DatabaseService.runQuery(Filter.type(DataType.Person));\n\n // Check for existing contact\n // TODO(dmaretskyi): Query filter DSL - https://linear.app/dxos/issue/DX-541/filtercontains-should-work-with-partial-objects\n const existingContact = existingContacts.find((contact) =>\n contact.emails?.some((contactEmail) => contactEmail.value === email),\n );\n\n if (existingContact) {\n log.info('Contact already exists', { email, existingContact });\n return existingContact;\n }\n\n const newContact = Obj.make(DataType.Person, {\n [Obj.Meta]: {\n tags: Obj.getMeta(message)?.tags,\n },\n emails: [{ value: email }],\n });\n yield* DatabaseService.add(newContact);\n\n if (name) {\n newContact.fullName = name;\n }\n\n const emailDomain = email.split('@')[1]?.toLowerCase();\n if (!emailDomain) {\n log.warn('Invalid email format, cannot extract domain', { email });\n return newContact;\n }\n\n log.info('extracted email domain', { emailDomain });\n\n const { objects: existingOrganisations } = yield* DatabaseService.runQuery(Filter.type(DataType.Organization));\n const matchingOrg = existingOrganisations.find((org) => {\n if (org.website) {\n try {\n const websiteUrl =\n org.website.startsWith('http://') || org.website.startsWith('https://')\n ? org.website\n : `https://${org.website}`;\n\n const websiteDomain = new URL(websiteUrl).hostname.toLowerCase();\n return (\n websiteDomain === emailDomain ||\n websiteDomain.endsWith(`.${emailDomain}`) ||\n emailDomain.endsWith(`.${websiteDomain}`)\n );\n } catch (e) {\n log.warn('Error parsing website URL', { website: org.website, error: e });\n return false;\n }\n }\n return false;\n });\n\n if (matchingOrg) {\n log.info('found matching organization', { organization: matchingOrg });\n newContact.organization = Ref.make(matchingOrg);\n }\n\n return newContact;\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { Relation } from '@dxos/echo';\nimport { DatabaseService, TracingService, defineFunction } from '@dxos/functions';\nimport { invariant } from '@dxos/invariant';\nimport { DXN, ObjectId } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { Markdown } from '@dxos/plugin-markdown/types';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nexport default defineFunction({\n key: 'dxos.org/function/research/create-document',\n name: 'Create research document',\n description: 'Creates a note summarizing the research.',\n inputSchema: Schema.Struct({\n name: Schema.String.annotations({\n description: 'Name of the note.',\n }),\n\n content: Schema.String.annotations({\n description: trim`\n Content of the note. \n Supports (and are prefered) references to research objects using @ syntax and <object> tags (refer to research blueprint instructions).\n `,\n }),\n\n // TODO(dmaretskyi): Use a specialized type for this (e.g., ArtifactId renamed as RefFromLLM).\n target: Schema.String.annotations({\n description: trim`\n Id of the object (organization, contact, etc.) for which the research was performed. \n This must be a ulid.\n `,\n }),\n }),\n outputSchema: Schema.Struct({}), // TODO(burdon): Schema.Void?\n handler: Effect.fnUntraced(function* ({ data: { target, name, content } }) {\n log.info('Creating research document', { target, name, content });\n\n yield* DatabaseService.flush({ indexes: true });\n yield* TracingService.emitStatus({ message: 'Creating research document...' });\n invariant(ObjectId.isValid(target));\n\n const targetObj = yield* DatabaseService.resolve(DXN.fromLocalObjectId(target));\n\n const doc = yield* DatabaseService.add(\n Markdown.makeDocument({\n name,\n content,\n }),\n );\n yield* DatabaseService.add(\n Relation.make(DataType.HasSubject, {\n [Relation.Source]: doc,\n [Relation.Target]: targetObj as any,\n completedAt: new Date().toISOString(),\n }),\n );\n yield* DatabaseService.flush({ indexes: true });\n\n log.info('Created research document', { target, name, content });\n return {};\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Toolkit from '@effect/ai/Toolkit';\nimport * as AnthropicTool from '@effect/ai-anthropic/AnthropicTool';\nimport * as Array from 'effect/Array';\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\nimport * as Schema from 'effect/Schema';\n\nimport { AiService, ConsolePrinter } from '@dxos/ai';\nimport {\n AiSession,\n GenerationObserver,\n createToolkit,\n makeToolExecutionServiceFromFunctions,\n makeToolResolverFromFunctions,\n} from '@dxos/assistant';\nimport { type DXN, Obj } from '@dxos/echo';\nimport { DatabaseService, FunctionInvocationService, TracingService, defineFunction } from '@dxos/functions';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { exaFunction, exaMockFunction } from '../exa';\n\nimport { LocalSearchHandler, LocalSearchToolkit, makeGraphWriterHandler, makeGraphWriterToolkit } from './graph';\n// TODO(dmaretskyi): Vite build bug with instruction files with the same filename getting mixed-up.\nimport PROMPT from './instructions-research.tpl?raw';\nimport { contextQueueLayerFromResearchGraph } from './research-graph';\nimport { ResearchDataTypes } from './types';\n\n/**\n * Exec external service and return the results as a Subgraph.\n */\nexport default defineFunction({\n key: 'dxos.org/function/research',\n name: 'Research',\n description: trim`\n Research the web for information. \n Inserts structured data into the research graph. \n Will return research summary and the objects created.\n `,\n inputSchema: Schema.Struct({\n query: Schema.String.annotations({\n description: trim`\n The query to search for.\n If doing research on an object, load it first and pass it as a JSON string.\n `,\n }),\n\n researchInstructions: Schema.optional(Schema.String).annotations({\n description: trim`\n The instructions for the research agent. \n E.g., preference on fast responses or in-depth analysis, number of web searcher or the objects created.\n `,\n }),\n\n // TOOD(burdon): Move to context.\n mockSearch: Schema.optional(Schema.Boolean).annotations({\n description: 'Whether to use the mock search tool.',\n default: false,\n }),\n }),\n outputSchema: Schema.Struct({\n note: Schema.optional(Schema.String).annotations({\n description: 'A note from the research agent.',\n }),\n objects: Schema.Array(Schema.Unknown).annotations({\n description: 'The structured objects created as a result of the research.',\n }),\n }),\n handler: Effect.fnUntraced(\n function* ({ data: { query, mockSearch, researchInstructions } }) {\n if (mockSearch) {\n const mockPerson = yield* DatabaseService.add(\n Obj.make(DataType.Person, {\n preferredName: 'John Doe',\n emails: [{ value: 'john.doe@example.com' }],\n phoneNumbers: [{ value: '123-456-7890' }],\n }),\n );\n\n return {\n note: trim`\n The research run in test-mode and was mocked. \n Proceed as usual.\n We reference John Doe to test reference: ${Obj.getDXN(mockPerson)}\n `,\n objects: [Obj.toJSON(mockPerson)],\n };\n }\n\n yield* DatabaseService.flush({ indexes: true });\n yield* TracingService.emitStatus({ message: 'Researching...' });\n\n const objectDXNs: DXN[] = [];\n const GraphWriterToolkit = makeGraphWriterToolkit({ schema: ResearchDataTypes });\n const GraphWriterHandler = makeGraphWriterHandler(GraphWriterToolkit, {\n onAppend: (dxns) => objectDXNs.push(...dxns),\n });\n const NativeWebSearch = Toolkit.make(AnthropicTool.WebSearch_20250305({}));\n\n const toolkit = yield* createToolkit({\n toolkit: Toolkit.merge(LocalSearchToolkit, GraphWriterToolkit, NativeWebSearch),\n // toolIds: [mockSearch ? ToolId.make(exaMockFunction.key) : ToolId.make(exaFunction.key)],\n }).pipe(\n Effect.provide(\n Layer.mergeAll(\n //\n GraphWriterHandler,\n LocalSearchHandler,\n ).pipe(Layer.provide(contextQueueLayerFromResearchGraph)),\n ),\n );\n\n const session = new AiSession();\n const result = yield* session.run({\n prompt: query,\n system:\n PROMPT +\n (researchInstructions\n ? '\\n\\n' + `<research_instructions>${researchInstructions}</research_instructions>`\n : ''),\n toolkit,\n observer: GenerationObserver.fromPrinter(new ConsolePrinter({ tag: 'research' })),\n });\n const note = result\n .at(-1)\n ?.blocks.filter((block) => block._tag === 'text')\n .at(-1)?.text;\n const objects = yield* Effect.forEach(objectDXNs, (dxn) => DatabaseService.resolve(dxn)).pipe(\n Effect.map(Array.map((obj) => Obj.toJSON(obj))),\n );\n\n return {\n note,\n objects,\n };\n },\n Effect.provide(\n Layer.mergeAll(\n AiService.model('@anthropic/claude-sonnet-4-0'),\n // TODO(dmaretskyi): Extract.\n makeToolResolverFromFunctions([exaFunction, exaMockFunction], Toolkit.make()),\n makeToolExecutionServiceFromFunctions(Toolkit.make() as any, Layer.empty as any),\n ).pipe(\n Layer.provide(\n // TODO(dmaretskyi): This should be provided by environment.\n Layer.mergeAll(FunctionInvocationService.layerTestMocked({ functions: [exaFunction, exaMockFunction] })),\n ),\n ),\n ),\n ),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\nimport Exa from 'exa-js';\n\nimport { CredentialsService, defineFunction } from '@dxos/functions';\n\nexport default defineFunction({\n key: 'dxos.org/function/exa',\n name: 'Exa',\n description: 'Search the web for information',\n inputSchema: Schema.Struct({\n query: Schema.String.annotations({\n description: 'The query to search for.',\n }),\n }),\n outputSchema: Schema.Unknown,\n handler: Effect.fnUntraced(function* ({ data: { query } }) {\n const credential = yield* CredentialsService.getCredential({ service: 'exa.ai' });\n const exa = new Exa(credential.apiKey);\n\n const context = yield* Effect.promise(async () =>\n exa.searchAndContents(query, {\n type: 'auto',\n text: {\n maxCharacters: 3_000,\n },\n livecrawl: 'always',\n }),\n );\n\n return context;\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { defineFunction } from '@dxos/functions';\n\nimport { SEARCH_RESULTS } from '../../testing';\n\nexport default defineFunction({\n key: 'dxos.org/function/exa-mock',\n name: 'Exa mock',\n description: 'Search the web for information',\n inputSchema: Schema.Struct({\n query: Schema.String.annotations({\n description: 'The query to search for.',\n }),\n }),\n outputSchema: Schema.Unknown,\n handler: Effect.fnUntraced(function* ({ data: { query } }) {\n const result = SEARCH_RESULTS.reduce(\n (closest, current) => {\n if (!current.autopromptString) {\n return closest;\n }\n if (!closest) {\n return current;\n }\n\n // Calculate Levenshtein distance\n const dist1 = levenshteinDistance(query, current.autopromptString);\n const dist2 = levenshteinDistance(query, closest.autopromptString || '');\n\n // Weight by length of the longer string to normalize\n const weight1 = dist1 / Math.max(query.length, current.autopromptString.length);\n const weight2 = dist2 / Math.max(query.length, closest.autopromptString?.length || 0);\n\n return weight1 < weight2 ? current : closest;\n },\n null as (typeof SEARCH_RESULTS)[0] | null,\n );\n\n return result;\n }),\n});\n\nconst levenshteinDistance = (str1: string, str2: string): number => {\n const m = str1.length;\n const n = str2.length;\n const dp: number[][] = Array(m + 1)\n .fill(null)\n .map(() => Array(n + 1).fill(0));\n\n for (let i = 0; i <= m; i++) {\n dp[i][0] = i;\n }\n for (let j = 0; j <= n; j++) {\n dp[0][j] = j;\n }\n\n for (let i = 1; i <= m; i++) {\n for (let j = 1; j <= n; j++) {\n dp[i][j] =\n str1[i - 1] === str2[j - 1] ? dp[i - 1][j - 1] : Math.min(dp[i - 1][j - 1], dp[i - 1][j], dp[i][j - 1]) + 1;\n }\n }\n\n return dp[m][n];\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport default {\n requestId: '324936368a74f4db978982172bc18a6c',\n autopromptString: 'AI personal knowledge management tools projects 2024',\n autoDate: '2024-01-01T00:00:00.000Z',\n resolvedSearchType: 'neural',\n results: [\n {\n id: 'https://www.open-notebook.ai/',\n title: 'What is Open Notebook? | Open Notebook',\n url: 'https://www.open-notebook.ai/',\n publishedDate: '2024-01-01T00:00:00.000Z',\n author: '',\n score: 0.3995794951915741,\n text: \"Take Control of Your Learning. Privately. A powerful open-source, AI-powered note-taking/research platform that respects your privacy 🎙️ Podcast Generator Transform your notes into engaging podcasts with customizable voices, speakers, and episodes 🤖 AI-Powered Notes Leverage AI to summarize, generate insights, and manage your notes 🔒 Privacy Control Full control over what information AI can access 🔄 Content Integration Support for links, PDFs, TXT, PPT, YouTube, and more What is Open Notebook? Open Notebook is the cognitive partner you always wanted and could never explain why. It combines the power of AI with unwavering privacy controls. It's designed for researchers, students, and professionals who want to enhance their learning and abilities while maintaining complete control over workflows, models, and how their data gets used and exposed. Is this right for me? 📚 Learning Enthusiast You're constantly seeking knowledge and want to go beyond surface-level understanding. Learning for you is about building deep, lasting comprehension. 🤝 You want a learning partner You believe your learning process can improve by partnering with a tailor made AI. You want to be provoked to think more clearly. 🤯 Your learning backlog is way too big You have hundreds of links you would love to read, but there is no time for it all. You want to make sure those are catalogued for when you need them. ✍️ Independent Thinker You value both taking notes and forming your own ideas. You understand different viewpoints but believe in developing your own perspective. 🔒 You are privacy aware You don't want all your context, thoughts and plans to be all over Big Tech, if not necessary. 💁 You like things your way You want to decide how your content is handled, which AI models you want to interact with and help specifically it should help/challenge you. What is the plan for the future? There is much more that can be done to augment human knowledge. Open Notebook's first release is just a first step in that direction. The end goal is to build a Cognitive Partner for every person. A customized assistant that can help you develop your skills, knowledge, and opinions in a way that makes sense to you. Learn more about our long-term vision and roadmap in our Vision page.\",\n },\n {\n id: 'https://www.reorproject.org/',\n title: 'Reor',\n url: 'https://www.reorproject.org/',\n publishedDate: '2024-01-01T00:00:00.000Z',\n author: 'Reor',\n score: 0.39665618538856506,\n text: \"Private & local AI personal knowledge management app for high entropy thinkers. Q&A Chat with an LLM that has full context of your notes. Automatically connected ideas Never manually link your notes again. Semantic Search Search without having to remember exact phrasing. WYSIWYG Markdown Markdown is the language of thought. Local First LLMs, Embedding Models, Vector database. Everything runs and stores locally. Writing Assistant Write with the world's first local writing assistant. Trusted by individuals who may have heard of these companies\",\n image: 'https://reorhomepage-2-cwy0zagzg-reor-team.vercel.app/opengraph-image.jpg?a25ca70e900445ed',\n favicon: 'https://www.reorproject.org/favicon-16x16.png',\n },\n {\n id: 'https://mymemo.ai/blog/best-ai-personal-knowledge-management-tools-in-2024/detail',\n title: 'Best AI Personal Knowledge Management (PKM) tools in 2024 - My Framer Site',\n url: 'https://mymemo.ai/blog/best-ai-personal-knowledge-management-tools-in-2024/detail',\n publishedDate: '2025-05-21T17:17:02.000Z',\n author: '',\n score: 0.3811739385128021,\n text: \"In today's fast-paced world, managing and organizing knowledge has become increasingly challenging. With the rise of digital information and the need for efficient knowledge sharing, traditional methods of knowledge management are no longer sufficient. AI-powered tools have emerged as a game-changer in this domain, offering a more efficient and effective way to manage and organize knowledge. Efficiency Amplified: AI streamlines the organization and analysis of vast data sets, saving time and reducing manual effort. Insights Unearthed: Uncover hidden patterns, trends, and valuable insights within your data, providing a deeper understanding of your information. Personalized Experience: Tailor your knowledge management approach with AI, creating a personalized digital assistant that adapts to your unique needs. Stay Ahead in the Digital Era: Embrace the transformative power of AI to navigate the information overload and stay ahead in our rapidly evolving digital landscape. Here are 10 AI-powered tools for personal knowledge management with their product links: 1. MyMemo AI: - Introduction: MyMemo transforms personal data into wisdom using AI, offering features like targeted search, smart advice, and creative writing prompts. - Product Link: [MyMemo Website](https://www.mymemo.ai) - Features: - Collects digital knowledge from various sources into a single platform. - Processes collected information with AI to extract key insights. - Allows users to query MyMemoAI for specific info or insights from their knowledge base. - Offers targeted search, smart advice, and creative writing prompts for enhanced knowledge management. 2. Notion AI: - Introduction: Notion AI offers a customizable workspace for efficient knowledge sharing and management. - Product Link: [Notion AI Website](https://www.notion.so) - Features: - Customizable workspace for knowledge sharing. - Integration with various tools like Slack, Google Drive, and Microsoft Teams. - Robust search capabilities powered by AI and AI-based analytics. 3. ClickUp: - Introduction: ClickUp provides dedicated spaces for knowledge base organization and seamless integration with various tools. - Product Link: [ClickUp Website](https://clickup.com) - Features: - Dedicated spaces for Knowledge Base organization. - Integration with third-party software like Microsoft Teams, Jira, Slack, Zoho, and more. - AI-based analytics to track productivity and identify patterns. 4. MyMind: - Introduction: MyMind offers a private space to save notes, images, quotes, and highlights enhanced by AI to aid in memory recall without the need for manual categorization. - Product Link: [MyMind Website](https://www.mymind.com) - Features: - Private space for saving notes, images, quotes, and highlights. - Enhanced by AI for efficient memory recall without manual organization. - Tailored for designers, writers, researchers, developers, and visual minds of all kinds. Adding Mem.ai to the top 10 list of AI-powered tools for personal kn\",\n image: 'https://framerusercontent.com/images/xtRTZ9zRVH3uL1fvH2vqA6G60W8.png',\n favicon: 'https://framerusercontent.com/images/XEQTxAwueP1wc7BpbB1zrouiuoA.png',\n },\n {\n id: 'https://mymemo.ai/',\n title: 'MyMemo-Empower Your Mind with AI',\n url: 'https://mymemo.ai/',\n publishedDate: '2025-05-21T17:17:02.000Z',\n author: '',\n score: 0.3810442090034485,\n text: 'End Digital Chaos with All In One Digital Space Effortlessly Access Information with AI Chat What have I uploaded about the marketing strategy? How to raise fund as a founder for startup? Write an article about the impact of AI in our society. Compliance with Global Standards MyMemo AI adheres to international data protection regulations, ensuring your data is handled with the utmost care. Secure Storage Your data is encrypted and stored on our high-security servers, ensuring that only you have access. We maintain strict privacy protocols, and even our team cannot view your information. Private Links for Your Memos MyMemo AI ensures that all links generated for your uploaded content are private and exclusively visible to you. 100 AI chat per month 100 content uploads per month 5 memo collections Powered by GPT-4o mini Up to 5 Related Memo in AI chat Single PDF file size under 5MB 10 AI writing for notes in total AI chat unlimited 1000 content uploads per month 100 Memo Collections Supports multiple AI models Up to 5 Related Memo in AI chat Single PDF file size under 30MB 100 AI writing for notes per month Custom AI summary prompt(coming soon) AI chat unlimited Unlimited content uploads Unlimited memo collections Supports multiple AI models Up to 8 Related Memo in AI chat Single PDF file size under 50MB Unlimited AI writing for notes Custom AI summary prompt(coming soon) Free access to @GPT-4o in Chat We’re excited to partner with Inkwise to bring MyMemo users an exclusive deal! Inkwise.ai is an AI-powered platform that helps users craft professional documents by extracting and integrating key information from uploaded files. It offers industry-specific templates, intelligent content extraction, and a referencing system that ensures factual accuracy. Exclusive for MyMemo Users: Get 2 months of Inkwise Pro for free with the code INKWISE2025 at checkout! MyMemo © MyMemo 2025. All rights reserved',\n image: 'https://framerusercontent.com/images/xtRTZ9zRVH3uL1fvH2vqA6G60W8.png',\n favicon: 'https://framerusercontent.com/images/XEQTxAwueP1wc7BpbB1zrouiuoA.png',\n },\n {\n id: 'https://www.personal.ai/memory',\n title: 'Make Your Own AI with Your Unique Memory',\n url: 'https://www.personal.ai/memory',\n publishedDate: '2024-01-01T00:00:00.000Z',\n author: '',\n score: 0.3991696536540985,\n text: \"In Personal AI, version control for memory and model is managed through a systematic approach that allows users to track, manage, and revert changes made to the AI's memory and model. Memory Stack: When you store a memory in Personal AI, it goes into the memory stack for training the AI. Data Uploads: Users can add, edit, or reinforce memories by uploading authored data directly into their personal language model. The personal language model has unlimited memory and is not bound by token or context limitations. The AI's performance is as good as the memory provided to it. If it makes false statements, the memory needs to be fixed and reinforced for future learning. There will be mechanisms to download the memory and model in the future. The output of the personal AI model is entirely controlled by the user's input and training. Yes, you can automate conversations using stacked memories in your Personal AI. By leveraging the memory stacking feature, you can train your AI to recall and utilize specific information during interactions Practices for Automating Conversations: Memory Anchors: When stacking new memories, consider adding memory anchors to organize the information effectively. This practice helps structure and categorize the data within your Personal AI account. Variety of Sources: Utilize all available tools such as the chat box, document editor, file uploader, and URL uploader to stack data from various sources. This diverse input enables your AI to learn from a wide range of inputs for a more personalized experience. Application of Practices: To automate conversations effectively, ensure that you consistently add relevant information into your memory stack using different tools provided by Personal AI. By doing so, you enable your AI to access and utilize this knowledge when engaging in digital interactions on your behalf. Yes, you can absolutely use hashtags to label and recall specific memories later on with your Personal AI. When adding memories to your AI, it's beneficial to include detailed and descriptive information about the topic or subject, along with context such as people, location, and absolute time for the AI to reference. Using hashtags allows you to categorize and organize these memories effectively. By using proper placement of hashtags without spaces and maintaining uniform capitalization, you can enhance the selection of memories for generating answers. Additionally, when stacking content using the chat box or file/document uploader in Personal AI, you can utilize #hashtags for single words or :colons followed by keywords for multiple words or complete titles. This practice helps in refining the selection of memories for generating answers while ensuring effective organization and retrieval of data. Personal AI is built with a strong emphasis on data privacy and security. It operates under the principle that the data you provide is yours alone. Measures such as encryption, secure data storage, and the optio\",\n image: 'https://cdn.prod.website-files.com/5ff65c460ce39f5ec5681c6a/663d12aab1b425e1ad40d3a6_Memory-min.jpg',\n favicon:\n 'https://cdn.prod.website-files.com/5ff65c460ce39f5ec5681c6a/5ffcbe4a31309a2dcf7d1f18_Human%20AI%20Icon%2032x32-bolder.png',\n },\n {\n id: 'https://iki.ai/',\n title: 'IKI AI – Intelligent Knowledge Interface',\n url: 'https://iki.ai/',\n publishedDate: '2025-04-10T16:28:59.000Z',\n author: '',\n score: 0.38676750659942627,\n text: 'Think faster. Organize deeper. All in one place. An AI-native workspace for research, strategy, and creative work An AI-native workspace for research, strategy, and creative work Backed by 500 Global Backed by 500 Global Backed by 500 Global Capture anything. Build your thinking library. Capture anything. Build your thinking library. Capture anything. Build your thinking library. AI assistant Turn long reads into clear insights. IKI summarizes, highlights, and connects the dots. AI assistant Turn long reads into clear insights. IKI summarizes, highlights, and connects the dots. AI assistant Turn long reads into clear insights. IKI summarizes, highlights, and connects the dots. AI editor AI writing with real context. Grounded in your content, not the internet. AI editor AI writing with real context. Grounded in your content, not the internet. AI editor AI writing with real context. Grounded in your content, not the internet. Team spaces Your team’s shared brain. One space for knowledge, context, and decisions. Team spaces Your team’s shared brain. One space for knowledge, context, and decisions. Team spaces Your team’s shared brain. One space for knowledge, context, and decisions. Everything you need for smarter knowledge work AI Editor Ask IKI AI Heading 1 B U I Browser extension Download extension to save webpages in one click along with notes Author Spotify Design Youtube · 3 min read Designing Data Science Tools at Spotify: Part 2 AI Summury Methods based on the relational path have shown strong, interpretable, and transferable reasoning ability. However, paths are naturally limited in capturing local evidence in graphs...Methods based on the relational path have shown strong, interpretable LLMs powered by top-tier models you trust Multi-source insights with agent context AI Digest Everything you need for smarter knowledge work AI Editor Ask IKI AI Heading 1 B U I Browser extension Download extension to save webpages in one click along with notes Author Spotify Design Youtube · 3 min read Designing Data Science Tools at Spotify: Part 2 AI Summury Methods based on the relational path have shown strong, interpretable, and transferable reasoning ability. However, paths are naturally limited in capturing local evidence in graphs...Methods based on the relational path have shown strong, interpretable LLMs powered by top-tier models you trust Multi-source insights with agent context AI Digest Everything you need for smarter knowledge work AI Editor Ask IKI AI Heading 1 B U I Browser extension Download extension to save webpages in one click along with notes Author Spotify Design Youtube · 3 min read Designing Data Science Tools at Spotify: Part 2 AI Summury Methods based on the relational path have shown strong, interpretable, and transferable reasoning ability. However, paths are naturally limited in capturing local evidence in graphs...Methods based on the relational path have shown strong, interpretable LLMs powered by',\n image: 'https://framerusercontent.com/assets/cI6Uo7x4q0W3uxzOt2preXjv6aE.jpg',\n favicon: 'https://framerusercontent.com/images/5NLFiJq5bLl5FXOTcVQX8vhkU.png',\n },\n {\n id: 'https://supermemory.ai/',\n title: 'supermemory™',\n url: 'https://supermemory.ai/',\n publishedDate: '2025-01-01T00:00:00.000Z',\n author: '',\n score: 0.393942266702652,\n text: \"The universal memory API for the AI era Stop building retrieval from scratch. Personalise LLMs for your users. Built for developers who ship. Start building DOCS Context is everything Without it, even the smartest AI is just an expensive chatbot $ init vector_database Way too expensive. Time to switch. Painfully slow. Let's try another. Won't scale. Back to square one. Maintenance nightmare. Need alternatives. $ choose embedding_model Which model fits your use case? Confusing performance tradeoffs Can't keep up with new releases $ handle format_parsing Markdown: Tables break everything HTML: Scripts and styles interfere PDF: Layout ruins extraction Word docs: Unpredictable formatting $ calculate scaling_costs Costs explode at production scale Performance degrades as data grows Engineering hours pile up fast $ setup connection_sync Sync failures between data sources API rate limits during large syncs Images: Need vision models now? Audio/Video: Transcription costs soar $ init multimodal_support Websites: JS & rate limits are messy PDFs: OCR fails, extraction inconsistent Authentication tokens expire constantly $ init vector_database Way too expensive. Time to switch. Painfully slow. Let's try another. Won't scale. Back to square one. Maintenance nightmare. Need alternatives. $ choose embedding_model Which model fits your use case? Confusing performance tradeoffs Can't keep up with new releases $ handle format_parsing Markdown: Tables break everything HTML: Scripts and styles interfere PDF: Layout ruins extraction Word docs: Unpredictable formatting $ calculate scaling_costs Costs explode at production scale Performance degrades as data grows Engineering hours pile up fast $ setup connection_sync Sync failures between data sources API rate limits during large syncs Images: Need vision models now? Audio/Video: Transcription costs soar $ init multimodal_support Websites: JS & rate limits are messy PDFs: OCR fails, extraction inconsistent Authentication tokens expire constantly FEATURES • FEATURES • FEATURES Unlock the Full Potential of Your Data const response = await fetch( 'https://api.supermemory.ai/v3/memories', {\\n method: 'POST',\\n headers: {\\n 'Authorization': 'Bearer sm_ywdhjSbiDLkLIjjVotSegR_rsq3ZZKNRJmVr12p4ItTcf' \\n },\\n body: JSON.stringify({\\n content: 'My name is Shreyans.',\\n // or https://example.com \\n // or https://example.com/page.pdf \\n metadata: {\\n user_id: '123' \\n }\\n }),\\n})\\n const data = await response.json() const response = await fetch( 'https://api.supermemory.ai/v3/memories', {\\n method: 'GET',\\n headers: {\\n 'Authorization': 'Bearer sm_ywdhjSbiDLkLIjjVotSegR_rsq3ZZKNRJmVr12p4ItTcf',\\n },\\n body: JSON.stringify({\\n q: \\\"What's my name?\\\" \\n })\\n})\\n const data = await response.json() const response = await fetch( 'https://api.supermemory.ai/v3/connections/onedrive', {\\n method: 'POST',\\n headers: {\\n 'Authorization': 'Bearer sm_ywdhjSbiDLkLIjjVotSegR_rsq3ZZKNRJmVr12p4ItTcf',\\n }\\n});\\n const data = await response.json(); solution • sol\",\n image: 'https://cdn.prod.website-files.com/6826235ef861ed9464b064c8/6826251d65991babe21a9a9a_Frame%2031.png',\n favicon: 'https://cdn.prod.website-files.com/6826235ef861ed9464b064c8/682639813def380d7694f590_favicon.png',\n },\n {\n id: 'https://mykin.ai/',\n title: 'Kin - Private, and Emotionally Intelligent, Personal AI',\n url: 'https://mykin.ai/',\n publishedDate: '2025-05-26T00:00:00.000Z',\n author: '',\n score: 0.38142070174217224,\n text: \"Clarity and confidence. Always on hand. Kin is a new kind of personal AI companion, more emotionally intelligent and private than ever. For whatever life throws at you. Available on iPhone and Android Anytime. Anywhere. Life at work is becoming increasingly challenging to navigate Think with Kin Personalized coaching can be inaccessible and expensive Talk with Kin How can Kin help? Inspiration “Whenever I need fresh ideas or just a soundboard, I know I can quickly turn to Kin.” Inspiration “Whenever I need fresh ideas or just a soundboard, I know I can quickly turn to Kin.” Planning “I use Kin to think things through, set goals, and organize my time.” Planning “I use Kin to think things through, set goals, and organize my time.” Learning “I can learn about almost any topic, with structured lessons created in seconds.” Learning “I can learn about almost any topic, with structured lessons created in seconds.” Support “Kin helps me with everything from small tasks to processing ideas and emotions.” Support “Kin helps me with everything from small tasks to processing ideas and emotions.” Guidance “I’m more aware of my strengths and I feel better prepared for tricky conversations.” Guidance “I’m more aware of my strengths and I feel better prepared for tricky conversations.” Kin remembers, so you don’t have to. The more you interact with Kin, the more Kin learns about you and your life. Because Kin understands both the big picture and its complexities, it can provide genuinely meaningful support in your day-to-day. Learn more Private & Secure Kin encrypts and stores your data securely on you device. No one else can see or access it. Powerful features. Scandinavian design. Smart journaling Share your thoughts and notes to reflect and build a better Kin. Coming soon Powered by open source models Coming soon Semantic and Episodic memory Coming soon Private, encrypted local-first storage Coming soon Intelligent reminders Stay on top of what matters with timely reminders. Coming soon Conversational voice chat Coming soon Third party integration Connect your Kin to the apps you love like Google calendar. Coming soon Proudly made in Copenhagen, Denmark Get started with simple tutorials and big ideas Frequently asked questions Product How does Kin's memory work? Kin’s memory pulls information from your messages into a database on your device so it can always reference it. Kin’s memory is automatic, so in practice, it works just by you talking with Kin. General More than anyone else. Every word you share and every reply is stored locally on your device - unless you change your settings to allow otherwise. You have full control over deleting it at any time. General Do I need a subscription to use Kin? No - Kin is currently free and without message limits for our beta users. However, we’re expecting to transition to a subscription model once we hit full release - we’ll make sure to talk a lot about that before it happens, though. Product Can I use Kin on a d\",\n image: 'https://cdn.prod.website-files.com/67b8fb50931278cabb866969/67d2a6c56ee313becd0f482d_img-opengraph.jpg',\n favicon: 'https://cdn.prod.website-files.com/67b8fb50931278cabb866969/67c0cfc2c45ca5db9ca5c9e4_favicon.png',\n },\n {\n id: 'https://try.rememberizer.ai/blog/introducing-rememberizer-connect-knowledge-to-your-ai',\n title: 'Introducing Rememberizer - Connect Knowledge To Your AI',\n url: 'https://try.rememberizer.ai/blog/introducing-rememberizer-connect-knowledge-to-your-ai',\n publishedDate: '2024-01-28T00:00:00.000Z',\n author: '',\n score: 0.38043755292892456,\n text: \"Introduction In the rapidly evolving world of artificial intelligence (AI), Rememberizer emerges as a revolutionary platform that profoundly changes how both developers and personal consumers interact with AI, especially Generative Pre-trained Transformers (GPT). This platform is not just another tool; it's a transformative solution, making AI interactions deeply personal, intuitive, and efficient. Let’s dive into how Rememberizer is redefining AI personalization and integration, offering unique experiences for a diverse range of users, free. Part 1: Rememberizer for Personal Consumers Why Rememberizer Matters for Personal Users Generative AI apps work better when they have access to background information. They need to know what you know. A great way to achieve that is to give them access to relevant content from the documents, data and discussions you create and use. This is what Rememberizer does. Rememberizer helps by seamlessly integrating personal data with AI applications. For OpenAI GPTs users, this means transforming your interactions with AI into something deeply personal and relevant. By indexing your data just once, Rememberizer avoids wasting time performing the same process over and over again. Empowering Personal AI Experiences Whether you’re engaging in creative projects, professional tasks, or simply exploring AI for personal curiosity, Rememberizer brings a unique value proposition. It transforms your data into a powerful AI collaborator, ensuring your interactions are tailored to your specific circumstances. Imagine an AI that feels intuitively designed for you, understanding your projects, circumstances and recent discussions. That’s the personalized AI experience Rememberizer delivers. Part 2: Rememberizer for Developers Revolutionizing AI Integration in App Development For developers, Rememberizer is a game-changer. It simplifies the integration of user data into AI applications, enhancing app functionality and user experience. Rememberizer connects directly to various data sources including Slack and Google Drive, embedding their contents semantic meaning into a vector database. This process not only elevates the AI capabilities of your app but also saves vast amounts GPU processing costs and engineering resources in backend development: it’s free! The Developer's Advantage with Rememberizer Streamlined Data Integration: Rememberizer takes care of the complex process of integrating data sources into a vector database, allowing developers to focus more on creative aspects of app development. Enhanced AI Capabilities: By leveraging Rememberizer, apps gain access to rich, personalized data, leading to more intuitive and context-aware AI interactions. Personalization and Continuous Adaptation: Apps powered by Rememberizer can offer unparalleled personalization, learning, and adapting based on the user's data, thereby improving over time. Part 3: Pricing and Accessibility for All Rememberizer is committed to democratizing \",\n image:\n 'https://cdn.prod.website-files.com/656fc35f7b92e991c863ce0a/65b7523200497f3ac6391238_Rememberizer%20banner.png',\n favicon: 'https://cdn.prod.website-files.com/656fc35f7b92e991c863cdc4/657acdfb9a0ba55d8f622765_Favicon.png',\n },\n {\n id: 'https://twinmind.com/',\n title: 'TwinMind',\n url: 'https://twinmind.com/',\n publishedDate: '2025-05-23T09:12:49.000Z',\n author: '',\n score: 0.38130462169647217,\n text: '\\n Never Forget Anything with Your Never Forget Anything with Your Never Forget Anything with Your Second Brain Memory Vault Life Copilot AI Notetaker Second Brain Second Brain Memory Vault Life Copilot AI Notetaker Second Brain Second Brain Memory Vault Life Copilot AI Notetaker Second Brain Get perfect notes, to-dos, and proactive answers during meetings, lectures, interviews, and conversations. Get perfect notes, to-dos, and proactive answers during meetings, lectures, interviews, and conversations. Watch Demo Watch Demo Watch Demo Featured in Featured in Trusted by users at Trusted by users at Capture any moment, even inside your pocket Capture any moment, even inside your pocket Transcribe everything. Forget nothing. Ask anything. Transcribe everything. Forget nothing. Ask anything. Transcribe everything. Forget nothing. Ask anything. Seamlessly switch from mobile to desktop Seamlessly switch from mobile to desktop With TwinMind for Chrome, transcribe video calls or chat with tabs, PDFs, Youtube videos, and automate your work. With the TwinMind Chrome sidebar, transcribe video calls or chat with websites, PDFs, Youtube videos, and all your memories. Works with all the products you love Works with all the products you love Ask anything with context from all your favorite websites and insert answers directly into them on Chrome. Ask anything with context from all your favorite websites and insert answers directly into them on Chrome. Transcribe video calls or capture context from all your favorite websites, and insert answers into them on Chrome browser. Get Proactive Answers Get Proactive Answers Get personalized suggestions, prepare for meetings or exams based on all your notes synced with your calendar. Get personalized suggestions, prepare for meetings or exams based on all your notes synced with your calendar. Unlock Perfect Memory Unlock Perfect Memory Your brain forgets 90% of memories in 7 days but TwinMind doesn’t. Ask TwinMind anything with Deep Memory Search. Your brain forgets 90% of memories in 7 days but TwinMind doesn’t. Ask TwinMind anything with Deep Memory Search. Summarize all my meetings Ask TwinMind Summarize all my meetings Ask TwinMind Summarize all my meetings Ask TwinMind Insert Insert Insert Automate Your Work Automate Your Work Generate follow-up emails, reports, assignments based on memories. Insert anywhere on your browser in one click. Generate follow-up emails, reports, assignments based on memories. Insert anywhere on your browser in one click. 100% privacy with offline mode 100% privacy with offline mode 100% privacy with offline mode Transcribes without recording TwinMind processes your audio on-the-fly in real-time and saves only the transcripts on-device, ensuring that your audio is never stored anywhere. Transcribes without recording TwinMind processes your audio on-the-fly in real-time and saves only the transcripts on-device, ensuring that your audio is never stored anywhere. Transcribes without recording ',\n image: 'https://framerusercontent.com/assets/9u5tx2lerz0ndBVcB14sg4tNoKs.png',\n favicon: 'https://framerusercontent.com/images/zDX0zsHZ6Z2PvwK2vmkOsISWBiY.svg',\n },\n ],\n costDollars: {\n total: 0.015,\n search: {\n neural: 0.005,\n },\n contents: {\n text: 0.01,\n },\n },\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport default {\n requestId: '0dc12e344fa649884456960ca1a54954',\n autopromptString: 'PKM software artificial intelligence integration open source projects',\n resolvedSearchType: 'neural',\n results: [\n {\n id: 'https://github.com/subspace-ai/subspace',\n title: 'GitHub - subspace-ai/subspace: PKM + REPL + AI',\n url: 'https://github.com/subspace-ai/subspace',\n publishedDate: '2023-03-23T16:02:40.000Z',\n author: 'subspace-ai',\n score: 0.7530648708343506,\n text: \"subspace.ai - PKM + REPL + AI \\n The long-term goal of subspace is to be/have three things: \\n \\n PKM (Personal Knowledge Management system) like Roam Research or Tana. \\n REPL-like (Read Evaluate Print Loop) capabilities. Should be able to execute individual code cells in the JVM backend and rendered in the frontend with Electric. Similar behaviour can be achieved with other languages via Jupyter kernels (or GraalVM Polyglot) and JavaScript. \\n AI (Artificial Intelligence) integrations. Should be integrated with LLMs - e.g. write GPT queries in subspace, and incorporate the response to your personal knowledge base as a new node. Intelligent search and LLM-based summaries and reasoning over the existing knowledge base (Retrieval Oriented Generation, RAG). \\n \\n The overall design should be open-ended, allowing for easy forking and providing custom node types / rendering functions. The goal is not to be just a storage of information, but a control panel for commonly used workflows. So that you can create convenient shortcuts and informative output views with Clojure + Electric. Since you persist which actions you took over time, you can search for past outputs and interleave these with your personal notes. Later query your knowledge base with RAG in natural language, or query it with GPT by exposing subspace knowledge base as an API to GPT. \\n For example, additional customizations and use cases could be: \\n \\n Intelligent work log for day to day coding. \\n Wrappers for any babashka / shell scripts you already have. \\n Wrapper functions to MLOps platform (or some other task manager) to trigger jobs, query stats and logs from past train runs. Build dashboards as subspace nodes from the result of such queries with Electric+HTML. \\n Wrappers for common Kubernetes / AWS / GCP commands. Build ad hoc UIs on top of your cluster that make sense to you. \\n Wrappers that pull the contents of arxiv documents as subspace nodes. \\n Spaced repetition learning of content (of nodes which you mark to be remembered). \\n \\n UI/UX \\n There will be two types of UI elements: pages and nodes. Pages contain nodes, and nodes can nest other nodes. Both pages and nodes are referencable (meaning you can link to them and the page/node will get a backreference). \\n Each node contains some media, and possibly subnodes. \\n Media can be: \\n \\n Text, numeric, Markdown \\n Image, video, audio \\n Flexible spreadsheet tesserrae \\n code block, which can be executed in a jupyter kernel (runs once) \\n code block containing an e/fn (runs continuously when on the page) \\n \\n Executing an e/fn is the most powerful and flexible thing to do. It can pull data in from other nodes on the page or in the graph, and displays its own little UI within its boundaries. Crucially, when upstream info changes, your e/fn's output gets recomputed. Running tesserrae is also very powerful; you can think of subspace as a non-grid tesserae that can also embed tesserae. \\n Subnodes can be organised either by indenting or tiling. \\n \\n Indente\",\n image:\n 'https://opengraph.githubassets.com/734547dbba15cefe41b9ad9cd97ba2ac489aeebd18945d54dbf7b1931b5ed980/subspace-ai/subspace',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/khoj-ai/khoj',\n title:\n 'GitHub - khoj-ai/khoj: Your AI second brain. Self-hostable. Get answers from the web or your docs. Build custom agents, schedule automations, do deep research. Turn any online or local LLM into your personal, autonomous AI (gpt, claude, gemini, llama, qwen, mistral). Get started - free.',\n url: 'https://github.com/khoj-ai/khoj',\n publishedDate: '2021-08-16T01:48:44.000Z',\n author: 'khoj-ai',\n score: 0.33666935563087463,\n text: \"\\n \\n \\n \\n \\n Your AI second brain \\n \\n \\n \\n 🎁 New \\n \\n Start any message with /research to try out the experimental research mode with Khoj. \\n Anyone can now create custom agents with tunable personality, tools and knowledge bases. \\n Read about Khoj's excellent performance on modern retrieval and reasoning benchmarks. \\n \\n \\n Overview \\n Khoj is a personal AI app to extend your capabilities. It smoothly scales up from an on-device personal AI to a cloud-scale enterprise AI. \\n \\n Chat with any local or online LLM (e.g llama3, qwen, gemma, mistral, gpt, claude, gemini, deepseek). \\n Get answers from the internet and your docs (including image, pdf, markdown, org-mode, word, notion files). \\n Access it from your Browser, Obsidian, Emacs, Desktop, Phone or Whatsapp. \\n Create agents with custom knowledge, persona, chat model and tools to take on any role. \\n Automate away repetitive research. Get personal newsletters and smart notifications delivered to your inbox. \\n Find relevant docs quickly and easily using our advanced semantic search. \\n Generate images, talk out loud, play your messages. \\n Khoj is open-source, self-hostable. Always. \\n Run it privately on your computer or try it on our cloud app. \\n \\n \\n See it in action \\n \\n Go to https://app.khoj.dev to see Khoj live. \\n Full feature list \\n You can see the full feature list here. \\n Self-Host \\n To get started with self-hosting Khoj, read the docs. \\n Enterprise \\n Khoj is available as a cloud service, on-premises, or as a hybrid solution. To learn more about Khoj Enterprise, visit our website. \\n Frequently Asked Questions (FAQ) \\n Q: Can I use Khoj without self-hosting? \\n Yes! You can use Khoj right away at https://app.khoj.dev — no setup required. \\n Q: What kinds of documents can Khoj read? \\n Khoj supports a wide variety: PDFs, Markdown, Notion, Word docs, org-mode files, and more. \\n Q: How can I make my own agent? \\n Check out this blog post for a step-by-step guide to custom agents.\\nFor more questions, head over to our Discord! \\n Contributors \\n Cheers to our awesome contributors! 🎉 \\n \\n \\n Made with contrib.rocks. \\n Interested in Contributing? \\n Khoj is open source. It is sustained by the community and we’d love for you to join it! Whether you’re a coder, designer, writer, or enthusiast, there’s a place for you. \\n Why Contribute? \\n \\n Make an Impact: Help build, test and improve a tool used by thousands to boost productivity. \\n Learn & Grow: Work on cutting-edge AI, LLMs, and semantic search technologies. \\n \\n You can help us build new features, improve the project documentation, report issues and fix bugs. If you're a developer, please see our Contributing Guidelines and check out good first issues to work on. \\n\",\n image: 'https://repository-images.githubusercontent.com/396569538/533a8bf7-385f-427b-a03f-76795fd938ed',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/paulbricman/conceptarium',\n title: 'GitHub - paulbricman/conceptarium: A fluid medium for storing, relating, and surfacing thoughts.',\n url: 'https://github.com/paulbricman/conceptarium',\n publishedDate: '2021-08-12T04:45:29.000Z',\n author: 'paulbricman',\n score: 0.3376504182815552,\n text: \"\\n 💡 Conceptarium \\n The conceptarium is an experimental personal knowledge base designed to weave AI capabilities into knowledge work. Its main features include: \\n \\n powerful multi-modal search across ideas \\n sharing microverses of knowledge with peers \\n ranking items by Anki-like activation, so as to promote serendipity \\n \\n Installation \\n Docker \\n After installing docker and docker-compose, run: \\n # install with:\\ncurl -fsS https://raw.githubusercontent.com/paulbricman/conceptarium/main/docker-compose.yml -o docker-compose.yml\\nmkdir knowledge\\ndocker-compose up -d\\n# stop with:\\ndocker-compose stop\\n# update with:\\ndocker-compose stop\\ndocker-compose rm -f\\ndocker-compose pull\\ndocker-compose up -d\\n \\n Note that you'll have to wait a bit initially for the models to be downloaded in the docker container. Use docker logs <backend container ID> or watch the process's memory for feedback on that. Or just try using it until it via the API or UI until it works (see usage). \\n Source \\n After pulling this repo run: \\n python3 -m pip install -r frontend/requirements.txt\\npython3 -m pip install -r backend/requirements.txt\\nstreamlit run frontend/main.py\\n# in a separate session:\\ncd backend\\npython3 -m uvicorn main:app --reload\\n# update by pulling from repo again\\n \\n Missing dependencies? Please have a look at frontend/Dockerfile and backend/Dockerfile. ARM architecture (e.g. Raspberry Pi)? Remove the torch entries from requirements.txt, and install a custom-built version. \\n Usage \\n The web app should then be available at localhost:8501, while the API at localhost:8000 (with docs at localhost:8000/docs). The backend component takes a few minutes to get the ML models at first. \\n To access your local instance, enter the conceptarium URL (i.e. localhost:8000 if you ran from source, backend.docker:8000 if you used docker), and your desired token. Remember your token, as you'll have to use it to authenticate in future sessions. \\n\",\n image:\n 'https://opengraph.githubassets.com/2b454d3e4b9d69c65d465d8ec6609b3b61f34b83f1f8eece471806be32e710bc/paulbricman/conceptarium',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/mfakih/Pomegranate-PKM',\n title:\n 'GitHub - mfakih/Pomegranate-PKM: Pomegranate PKM is a new open source web-based cross-platform work and knowledge management application for productive and prolific people. PKM features text-based commands for adding, updating and searching records, thus providing powerful tools to manage information. It also allows the user to build up the navigation menu using saved searches.',\n url: 'https://github.com/mfakih/Pomegranate-PKM',\n publishedDate: '2014-03-17T06:28:12.000Z',\n author: 'mfakih',\n score: 0.7761150002479553,\n text: 'Pomegranate-PKM \\n Pomegranate PKM is a new open source web-based cross-platform work and knowledge management application for productive and prolific people. \\n PKM features text-based commands for adding, updating and searching records, thus providing powerful tools to manage information. It also allows the user to build up the navigation menu using saved searches. \\n \\n Pomegranate PKM manages: \\n \\n Goals, tasks, and plans \\n Journal and indicators \\n Writings and notes \\n Resources (books, articles, news, presentations, audiobooks, documentaries, movies etc),and book excerpts, mainly book chapters. \\n Documents e.g. Word documents, Excels \\n People \\n \\n In technical terms, Pomegranate PKM is a combination of: \\n \\n Document management system \\n Content management system \\n Research index cards and reference management \\n Bug tracking systems, applied for the software development and self development \\n Lightweight project management \\n Powerful task management \\n Time tracking \\n Blog (e.g. WordPress) client \\n \\n My in-progress book at LeanPub outlines the motivations, design principles and the features of Pomegranate PKM. \\n',\n image:\n 'https://opengraph.githubassets.com/d4afbe16f55b89cbdd3344472df483147de49f6a8a136bd1da7af7e568c16908/mfakih/Pomegranate-PKM',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/mfakih294/Nibras-PKM',\n title:\n 'GitHub - mfakih294/Nibras-PKM: A web-based self-hosted open-source system for the long-term management of personal information. It targets the needs of advanced users with serious information management needs. It is accompanied with an Android application that syncs the bookmarked records over local Wifi network.',\n url: 'https://github.com/mfakih294/Nibras-PKM',\n publishedDate: '2019-09-14T02:05:28.000Z',\n author: 'mfakih294',\n score: 0.7633954882621765,\n text: \"Nibras PKM \\n Nibras PKM is a web-based self-hosted open source system for\\nthe long-term management of personal information.\\nIt is a combination of a web-based application\\nintended for desktop use and where all the records are entered,\\nand an Android mobile reader application. \\n \\n Local \\n The user has full control over his/her data, without the need for a (fast) internet connection, and without all the distractions and information overload that the internet can cause. \\n Open source \\n The user has control over the system itself too, especially when using it on the long term to manage the important personal information and files. \\n Comprehensize \\n It manages resources (articles, books, documents), notes, writings, tasks, goals, journal, planner, payments, indicators, and (study) courses and departments. \\n Powerful \\n It was designed with large amounts of information in mind. In current usage, it manages dozens of thousands of records. With its commands and saved searches, it makes easy to navigate through all the information. \\n Main Features \\n \\n Flexible text-based commands to add, update and search records, which provides powerful ways to manage information. \\n Saved searches to save searches for later use. \\n Ability to display records on calendars and Kanban boards. \\n Full-text search of all record fields. \\n Simple file system integration so to greatly reduce the need to organize files manually. \\n \\n Documentation \\n User's guide is available online at https://mfakih294.github.io/Nibras-PKM/. \\n Releases \\n Nibras PKM is hosted on GitHub https://github.com/mfakih294/Nibras-PKM. \\n Quick start guide \\n Running Nibras requires three simple steps: \\n \\n Download the bundle file corresponding to your platform, e.g. nibras-bundle-windows.zip from the releases page on Github. \\n Extract the zipped file to a location of your choice on your local disk. \\n Launch Nibras by double clicking on ./scripts/start file. \\n \\n Once Nibras has finished launching, a message like the one below will appear. \\n * Nibras has launched. You can access it from: * \\n * https://localhost:1441/ * \\n Go to https://localhost:1441/ using Firefox or Chrome. On the login page, enter nibras for username and nibras for the password. \\n Notes: \\n \\n As it has a self-signed certificate, you need to accept and bypass the security warning that shows up at the beginning. \\n On Linux, you need to make the files inside ./scripts and ./tomcat/bin folders executable (chmod +x *). \\n To stop Nibras, you can close this window, or press ctrl+c in it, or run ./scripts/stop script. \\n \\n Technical details \\n \\n Nibras is developed in Grails framework 3.3.10, a dynamic framework on top of the Java platform. \\n Grails applications run on any platform that can run Java 8 and later, so practically all platforms, including Windows, Linux, Mac. \\n For production use, Nibras uses MySQL 5+ for its database, and the file system to store the files of the records. To testing and demonstration, it can run with h2 database, with zero ex\",\n image:\n 'https://opengraph.githubassets.com/5e45c614cd8441100a4acd0e48d8b9c15984b51e816d4d4683436dd3be25c813/mfakih294/Nibras-PKM',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/reorproject/reor',\n title: 'GitHub - reorproject/reor: Private & local AI personal knowledge management app for high entropy people.',\n url: 'https://github.com/reorproject/reor',\n publishedDate: '2023-11-27T01:30:44.000Z',\n author: 'reorproject',\n text: 'Reor Project \\n \\nPrivate & local AI personal knowledge management app. \\n \\n \\n \\n \\n \\n \\n 📢 Announcement \\n We are now on Discord! Our team is shipping very quickly right now so sharing ❤️feedback❤️ with us will really help shape the product 🚀 \\n \\n About \\n Reor is an AI-powered desktop note-taking app: it automatically links related notes, answers questions on your notes and provides semantic search. Everything is stored locally and you can edit your notes with an Obsidian-like markdown editor. \\n The hypothesis of the project is that AI tools for thought should run models locally by default. Reor stands on the shoulders of the giants Ollama, Transformers.js & LanceDB to enable both LLMs and embedding models to run locally: \\n \\n Every note you write is chunked and embedded into an internal vector database. \\n Related notes are connected automatically via vector similarity. \\n LLM-powered Q&A does RAG on your corpus of notes. \\n Everything can be searched semantically. \\n \\n One way to think about Reor is as a RAG app with two generators: the LLM and the human. In Q&A mode, the LLM is fed retrieved context from the corpus to help answer a query. Similarly, in editor mode, the human can toggle the sidebar to reveal related notes \"retrieved\" from the corpus. This is quite a powerful way of \"augmenting\" your thoughts by cross-referencing ideas in a current note against related ideas from your corpus. \\n Getting Started \\n \\n Download from reorproject.org or releases. Mac, Linux & Windows are all supported. \\n Install like a normal App. \\n \\n Running local models \\n Reor interacts directly with Ollama which means you can download and run models locally right from inside Reor. Head to Settings->Add New Local LLM then enter the name of the model you want Reor to download. You can find available models here. \\n You can also connect to an OpenAI-compatible API like Oobabooga, Ollama or OpenAI itself! \\n Importing notes from other apps \\n Reor works within a single directory in the filesystem. You choose the directory on first boot.\\nTo import notes/files from another app, you\\'ll need to populate that directory manually with markdown files. Note that if you have frontmatter in your markdown files it may not parse correctly. Integrations with other apps are hopefully coming soon! \\n Building from source \\n Make sure you have nodejs installed. \\n Clone repo \\n git clone https://github.com/reorproject/reor.git\\n \\n Install dependencies \\n Run for dev \\n Build \\n Interested in contributing? \\n We are always on the lookout for contributors keen on building the future of knowledge management. Have a feature idea? Want to squash a bug? Want to improve some styling? We\\'d love to hear it. Check out our issues page and the contributing guide to get started. \\n License \\n AGPL-3.0 license. See LICENSE for details. \\n Reor means \"to think\" in Latin. \\n',\n image:\n 'https://opengraph.githubassets.com/101249afc41e6b8729eca3c619d4c08c5c67288ab4126de16c59c1ab97c5492c/reorproject/reor',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/memex-life/memex',\n title:\n 'GitHub - memex-life/memex: Your second brain for the web browsing. An AI powered Chrome extension that constructs personal knowledge base for you.',\n url: 'https://github.com/memex-life/memex',\n publishedDate: '2023-03-16T23:48:35.000Z',\n author: 'memex-life',\n score: 0.34730345010757446,\n text: 'Memex \\n Your second brain for web browsing. Picture possessing the ultimate ability of total recall. \\n \\n Overview \\n This project aims to create a browser extension that acts like a personal memex machine.\\nIt will keep track of everything you browse online to build your own knowledge base.\\nThen it will use AI to retrieve that knowledge whenever you need it. \\n What is a Memex? \\n \\n Consider a future device for individual use, which is a sort of mechanized private file and library. It needs a name, and, to coin one at random, “memex” will do. A memex is a device in which an individual stores all his books, records, and communications, and which is mechanized so that it may be consulted with exceeding speed and flexibility. It is an enlarged intimate supplement to his memory. \\n--- “As We May Think” Vannevar Bush (1945) \\n \\n Features \\n \\n Seamlessly captures content and metadata from your web browsing. \\n Constructs your own personalized knowledge base on your local device \\n Retrive knowledge with power of AI. \\n \\n How it works \\n When you browse the web, this extension will inject a script to capture the text content on the pages you visit. It will send that content to the backend service-worker for processing\\nThe service-worker will break the content into pieces and store it in a database.\\nThe popup page acts as a chat interface to answer your questions using the information in the database. \\n Getting Started \\n Build & import Extension \\n Build extension files into dist/ folder \\n npm install\\nnpm run build # or npm run watch \\n Load extension \\n Start the Kownledge Base server \\n Currently the LangchainJs has not yet support browser runtime. The extension still needs a backend server as Knowledge Base implementaion. \\n set environments: \\n export TOKENIZERS_PARALLELISM=false\\nexport OPENAI_API_KEY=<your-api-key>\\ncd server\\nFLASK_APP=server flask run\\n \\n Start using \\n Once you have completed the above steps, you can start using the Memex browser extension to enhance your web browsing experience. \\n \\n As you browse the web, the extension will automatically capture and store the text content from the web pages you visit, along with their metadata, in your personalized knowledge base. \\n When you need to retrieve information or recall something from your browsing history, simply open the chat interface by clicking on the Memex extension icon. Type your question or query into the chat interface and press Enter or click the Send button. The Memex extension will use AI to search your knowledge base and provide you with the most relevant information based on your query. \\n \\n',\n image:\n 'https://opengraph.githubassets.com/aa7966b46e8bb10410af6cdb5af62c9095d99c4b9d17683b246641b8a1291746/memex-life/memex',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/samkeen/knowling',\n title:\n 'GitHub - samkeen/knowling: A desktop notes application leveraging AI designed for Personal Knowledge Management (PKM)',\n url: 'https://github.com/samkeen/knowling',\n publishedDate: '2024-03-08T03:28:38.000Z',\n author: 'samkeen',\n score: 0.8010122776031494,\n text: 'Knowling \\n A desktop notes application designed for Personal Knowledge Management (PKM) \\n \\n Knowling aims to provide users with an intuitive platform for gathering and organizing knowledge from various research\\nsources. By leveraging AI, Knowling assists users in categorizing their notes and highlighting connections between them,\\nthereby enhancing the overall management of their personal knowledge store. \\n Features \\n \\n Fast Performance: Knowling is developed using Rust and JavaScript, ensuring a responsive and efficient user\\nexperience. \\n WSIWIG Markdown Editor: A What-You-See-Is-What-You-Get (WSIWIG) Markdown editor for seamless and straightforward\\nnote-taking. \\n Simple, Uncluttered UI: The user interface is designed to be minimalistic and distraction-free, allowing users to\\nfocus on their content. \\n Export/Import Notes: Easily export and import notes to manage your knowledge base across different devices and\\nformats. \\n AI Integration: AI is integrated to empower users by automatically categorizing notes and identifying meaningful\\nconnections between them. \\n Open Source: Knowling is open source and licensed under the Apache 2.0 license, encouraging community\\ncontributions\\nand\\ntransparency. \\n \\n Current Development Status \\n Knowling is currently in the early stages of development, with a minimal feature set. We are actively working on\\nexpanding the application\\'s capabilities and enhancing its functionality. We welcome you to check out the open feature\\nrequests and encourage you to open new ones if you have any suggestions or ideas. \\n \\n Open Issues \\n Project view \\n \\n We hope you find Knowling valuable for managing your personal knowledge. If you have any feedback or encounter any\\nissues, please don\\'t hesitate to reach out or contribute to the project. \\n Why the name Knowling: Knowling is a play on the words \"Knowledge\" and \"Knolling\", a process of arranging objects to\\ncreate clean and organized\\nspaces. This reflects our goal of helping users keep their knowledge organized and easily accessible. \\n \\n \\n Developing Knowling \\n Knowling is built atop Tauri 1.x \\n Project setup \\n npm install\\nnpm run tauri dev\\n \\n Development \\n Build \\n https://tauri.app/v1/api/cli/ \\n Development follows the common practices of developing a Tauri application. \\n Debugging in RustRover \\n https://tauri.app/v1/guides/debugging/rustrover/ \\n',\n image:\n 'https://opengraph.githubassets.com/68a818dd653e6084907d244111f983fe2b2367dcfb8eed93ebece179892ae74c/samkeen/knowling',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/whl1207/Knowledge',\n title: 'GitHub - whl1207/Knowledge: Distributed Multi-View Intelligent Knowledge Management Platform',\n url: 'https://github.com/whl1207/Knowledge',\n publishedDate: '2023-08-26T03:26:41.000Z',\n author: 'whl1207',\n score: 0.35489749908447266,\n text: 'AI-KM Intelligent Knowledge Management Platform \\n Overview \\n AI-KM (Artificial Intelligence Knowledge Management) is a next-generation knowledge management platform that integrates cutting-edge AI technologies. Leveraging large language models and knowledge graph technologies, it helps individuals and organizations achieve efficient knowledge organization, in-depth analysis, and intelligent application. \\n \\n Core Value \\n \\n Intelligent Knowledge Processing: Automatically parses, queries, and associates knowledge content \\n Multi-dimensional Visualization: Provides 6 view modes to present knowledge relationships \\n Open Model Integration: Supports seamless switching between mainstream open-source large language models via Ollama \\n Enterprise-grade Security: All data processing is performed locally \\n \\n Key Features \\n 1. Core Technical Architecture \\n \\n \\n Multi-model Integration Engine \\n \\n Supports mainstream large language models deployed via the Ollama framework \\n Base models: Deepseek-R1, qwen3, LLaMA3.3, QWQ \\n Embedding models: nomic-embed-text, bge-m3, mxbai-embed-large \\n Multimodal models: Gemma3, Mistral-Small 3.1 \\n \\n \\n \\n Enhanced Retrieval System \\n \\n RAG (Retrieval-Augmented Generation) architecture \\n Supports knowledge base preprocessing (default segmentation by 2 line breaks) \\n Supports similarity calculations for various embedding models \\n Supports hidden information inference in knowledge bases (default: deducing potential user queries) and knowledge fragment keyword editing \\n Supports custom retrieval thresholds (can set knowledge base retrieval thresholds based on cosine similarity, quantity, characters, etc.) \\n Explainable analysis and debugging of retrieval results, displaying similarity information for each knowledge fragment \\n Supports cosine similarity calculation and MDS dimensionality reduction-based similarity calculation \\n \\n \\n \\n Visual Workflow Engine \\n \\n Drag-and-drop AI processing pipeline construction \\n Includes 3+ pre-built node templates \\n Supports workflow import/export \\n \\n \\n \\n Markdown Document Editing \\n \\n Deep Markdown parsing and editing \\n Document structure analysis (heading hierarchy recognition) \\n Code block processing \\n \\n \\n \\n Multi-view Knowledge Display Module \\n \\n \\n \\n Multi-platform Packaging & Deployment \\n \\n Electron-based packaging for Windows, Linux, macOS, and other platform clients \\n \\n \\n \\n Installation & Deployment \\n System Requirements \\n \\n OS: Windows 10+/macOS 12+/Linux (Ubuntu 20.04+) \\n Hardware:\\n \\n Minimum: 8GB RAM, 4-core CPU, 10GB storage \\n Recommended: 16GB+ RAM, dedicated GPU, 50GB+ storage \\n \\n \\n \\n Development Environment Setup \\n # Install dependencies \\nnpm install\\n # Run in development mode \\nnpm run dev\\n # Build Windows client \\nnpm run build\\n # Generate installation package \\n AI-KM 智能知识管理平台 \\n 概述 \\n AI-KM(Artificial Intelligence Knowledge Management)是一个集成了前沿AI技术的下一代知识管理平台,通过大语言模型和知识图谱技术,帮助个人和组织实现知识的高效组织、深度分析和智能应用。 \\n 核心价值 \\n \\n 智能知识处理 :自动解析、查询和关联知识内容 \\n 多维度可视化 :提供6种视图模式呈现知识关系 \\n 开放模型集成 :可以通过ollama支持主流开源',\n image:\n 'https://opengraph.githubassets.com/fc9354a52086145d1cf60e2b9c3d386a3be8fa44e2e00cbb13cd2b1af09973b7/whl1207/Knowledge',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/putaodoudou/kmagent',\n title:\n 'GitHub - putaodoudou/kmagent: KMAgent (Knowledge Management Agent),基于语义元的智能知识管理GTD工具,个人智能助理。',\n url: 'https://github.com/putaodoudou/kmagent',\n publishedDate: '2018-06-05T09:11:21.000Z',\n author: 'putaodoudou',\n score: 0.35521113872528076,\n text: 'KMAgent-个人智能助理 \\n \\n 个人 知识智能助理(KMAgent, Knowledge Management Agent)--专注智能知识管理GTD 多元融合创新 发扬传承智慧! \\n KMAgent 以 个人知识管理 GTD 应用为主的工具效率软件。基于交互区+文档的协同学习工作空间,专注于语义计算、知识工程,致力于通过自然语言处理、机器学习、知识图谱等人工智能技术,简化知识增强认知、融合支持优秀方法论模板,辅助高效学习工作,扩展个人能力,类似钢铁侠的【贾维斯】。以开源项目的形式结合产学研,支持社群协同积累创新,节省时间精力,从知识中挖掘智慧。您的私人知识引擎、秘书、智友、智囊团。 \\n 请查看网站 http://kmagent.com 获取相关安装指南及使用说明。 \\n 为什么Why? \\n \\n 特别重要的两个能力:1、制造工具;2、寻求合作。 \\n \\n 智能时代,信息爆炸,知识匮乏,辅助做减法!协同合作,降低信息熵,提高智商,极简智能知识管理! \\n \\n \\n 知识财富 ,积累知识胜过积累金钱,知识是人类进步的阶梯。是个人及企业的核心竞争力! \\n 化繁为简 ,发现模式化繁为简,挖掘本质及关联,知其然知其所以然,促进融合创新。 \\n 人类智能 ,挖掘隐性知识、理解人类多元智能,发掘利用大脑潜力,挑战认知极限。 \\n 知识传播 ,静态文本书籍的缺陷、探索新的知识存储展示分享方式,建立高效沟通协同与积累分享的基础。 \\n 实现应对人工智能 ,知识与智能相辅相成,知识管理作为核心环节,承上启下形成闭环,社群协同积累创新。 \\n 重新造轮子 ,为自己开发一个工具,自然交互降低工具学习使用成本,支持学习工作生活。 \\n 作为事业 ,值得奋斗十年的事业。 \\n \\n Do something diferent, make a change! \\n \\n 【产品简介】产品原型正火速开发中! \\n \\n 是以文档+交互区为中心的功能集成,资源事务行为的协同智能管理GTD。首先用于协同建立核心概念理论体系,知识管理业务建模,积累分享资源知识技术,应用于KM、IT、AI、数学相关领域知识的学习整理。 \\n \\n 功能及特性: \\n \\n 多媒体无限画板、实时协同文本导图编辑器,富文本和 Markdown 扩展编辑。 \\n 支持本体建模、阅读笔记、灵感便签、思维导图、各类模板。 \\n 划词翻译知识解释、搜索、百科字典。 \\n 知识可视化,多层次粒度维度去冗余,浓缩摘要、生成博客。 \\n 知识导入导出、Web 知识抽取集成。 \\n 资源管理、公共+个人+领域知识图谱。 \\n 收藏订阅评论分享、话题课程小组班级圈子。 \\n 项目事务的PDCA、GTD,日历日程安排提醒。 \\n 即时通信、实时协同、项目合作、积分系统。 \\n 个性化自学习聊天机器人、虚拟形象、语音识别生成、事务代理、主动推荐提醒引导辅助。 \\n 自然语言交互、语义化、响应式生成式、文本化、可视化、极致沉浸体验。 \\n 高级功能:自定义配置、插件、命令行、领域语言。 \\n \\n 辅助您进行极简智能知识管理:知识可视化创作展示,简化结构化已有知识资源,建立知识体系。深入本质理解知识、整体高效合作学习。个人事务的管理、原则方法论习惯的养成。语义计算,辅助推理、仿真、预测、决策。聊天解闷启发。 \\n 很高兴您 下载试用 并 回馈使用情况 。 \\n \\n 随着开发进展,会及时列出最新特性、新功能及改进情况。查看 v0.1 -> v1.0 升级信息 ,获取更多产品升级信息 。 \\n 【参与贡献】 \\n \\n 我们是一个协同学习型组织,以开源项目为中心,结合产学研,理论技术知识能力实践闭环正反馈迭代积累的过程,人与人与机器机器的合作学习!项目处于初期规划阶段, 欢迎各位有志之士的加入! \\n \\n 基于共同信念、统一基础、协同机制,自由分工合作的工作组,可选择一个或多个模块参与合作学习及开发,根据 规则 记录贡献积分,按贡献分配奖励,未来若盈利可分红,涌现集体智慧!欢迎每个人贡献力量、收获积分朋友知识工具技术。 \\n 【值得加入】知识改变命运,创新改变世界!改变自己从心而为,不忘初心方得始终! \\n 多种贡献方式 \\n \\n 可参与理论研究、业务建模、技术开发、项目管理、运营、投资、试用分享推广。 \\n 提交或投票新功能特性需求 ProductPains \\n 工具使用 情况反馈 \\n \\n 欢迎提交 pull requests 及 issue 。 \\n 若贡献源码请阅读遵循 编程风格 及 贡献说明文档 。 \\n 致谢 \\n 【源计划】KMAgent 当前是一个公开社群和免费软件,感谢所有促进其发展的 贡献者 和 [深度用户]( https://github.com/kmagent/ kmagent/fans.md)。【捐赠】如果您认同我们请支持我们快速持续发展。 \\n 主要模块 \\n 【核心重点】智能体语义元核心抽象、认知建模、知识图谱、智能知识管理GTD解决方案、产品设计开发,社群运营协同积累创新。(智能基础->智能核->智能块->智能体)群体智能->通用智能,模拟->超越。模块:km-thory km-engine km-onto km-agents km-sys km-ui、km-graph。 \\n 【领域及技术】智能知识管理(领域建模)、机器学习(tensorflow)、自然语言处理(NLTK、hanlp)、知识图谱(图数据库neo4j分布式存储ceph)、领域语言(DSL)、语义网(OWL)、web知识发现(爬虫)、检索(lucene)推理推荐、多agent集群智能(架构)、人机交互UI(vue.js、bootstrap、数据可视化)、Web网站(keystone)、桌面(webkit、electron)、移动(weex)、大数据(spark)、虚拟化云计算(Mesos、docker、Kubernetes)、安全网络通信加密权限认证(openSSL)、软件工程(项目开发管理)、区块链、VR、代码生成、认知心理、复杂系统、知识共享协议产权、社群体验经济。 \\n 【工作分解】 关键在于 :统一认识、工具支持、有效积累可持续发展。 \\n \\n 业务建模(智能知识管理GTD理论体系):核心抽象模型,人性建模。 \\n 产品设计(个人智能助理):产品规划、虚拟形象UI设计、竞品分析。 参考产品 :protege、vscode、quip、knowledgebuilder、metacademy、wiki、CSDN知识库、sketchboard、feedly、onenote画板、foxmail、京东阅读、qq音乐、NetLogo、flyinglogic、sourceinsight、幕布、Anki、wolframalpha。 \\n 技术架构(通用智能系统):分布式计算存储多智能体协同系统:普适网格语义人类计算。全平台、微服务、核心算法、技术选型、测试部署。C++、Python、js、HTML。 \\n 商业计划(SaaS 软件即服务):以软件产品为中心的增值服务、品牌运营推广营销。 \\n 项目管理(小代价达到目的):敏捷迭代、过程改进、配置管理。 \\n 社群建设(利益共同体联盟):文化理念集体智慧、扩大影响。 \\n 知识创作(知识管理等领域知识):知识管',\n image:\n 'https://opengraph.githubassets.com/935c4954d4a340aff679b550e201df566a4f53b442922a997e8a83570a564195/putaodoudou/kmagent',\n favicon: 'https://github.com/fluidicon.png',\n },\n ],\n costDollars: {\n total: 0.015,\n search: {\n neural: 0.005,\n },\n contents: {\n text: 0.01,\n },\n },\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nexport default {\n requestId: '32df0c541f9883180b35e04caece4374',\n autopromptString: 'open source AI knowledge management projects features comparison 2024',\n autoDate: '2024-01-01T00:00:00.000Z',\n resolvedSearchType: 'neural',\n results: [\n {\n id: 'https://tryfastgpt.ai/',\n title: 'FastGPT',\n url: 'https://tryfastgpt.ai/',\n publishedDate: '2024-01-01T00:00:00.000Z',\n author: 'labring',\n score: 0.36898404359817505,\n text: '20w+ Users are leveraging FastGPT to create their own specialized AI knowledge bases Empowerwith Your Expertise A free, open-source, and powerful AI knowledge base platform, offers out-of-the-box data processing, model invocation, RAG retrieval, and visual AI workflows. Easily build complex LLM applications. Features Why Choose FastGPT? Discover the advantages of FastGPT Open Source Secure and reliable open-source codebase. Optimized Q&A Enhanced question-answering accuracy for customer service. Visual Workflow Design complex workflows with ease using the Flow module. Seamless Extensibility Seamlessly integrate FastGPT into your applications via API. Debugging Tools Refine your models with comprehensive debugging features. Multi-Model Compatibility Compatible with various LLM models, with more to come. Do you find this open-source AI knowledge base platform valuable? Show your support by giving us a star 🌟 FAQ Find answers to the most common inquiries here. FastGPT allows commercial usage, such as serving as a backend service for other applications or as an application development platform for enterprises. However, when it comes to multi-tenant SaaS services or matters involving the LOGO and copyright information, you must contact the author to obtain a commercial license. FastGPT supports importing documents in various formats, including Word, PDF, Excel, Markdown, and web links. It also enables syncing data from an entire website, automatically handling text preprocessing, vectorization, and QA splitting, which saves manual training time and improves efficiency. As long as the API of the model you want to integrate aligns with the official OpenAI API, it can be used with FastGPT. You can utilize projects like One API to unify access to different models and provide an API that is compatible with the official OpenAI API. If you come across any problems while using FastGPT, please join our community or forum, create a post, and reach out to us for assistance.',\n favicon: 'https://tryfastgpt.ai/favicon-16x16.png',\n },\n {\n id: 'https://casibase.org',\n title:\n 'Casibase | Casibase · Open-Source LangChain-like AI Knowledge Database & Chat Bot with Admin UI and multi-model support (ChatGPT, Claude, Llama 3, DeepSeek R1, HuggingFace, etc.)',\n url: 'https://casibase.org',\n publishedDate: '2025-01-01T00:00:00.000Z',\n author: '',\n score: 0.354640930891037,\n text: 'Comprehensive Model Support Integrates a diverse range of AI models, including ChatGPT, Azure OpenAI, HuggingFace, and more, complemented by support for various embedding APIs like OpenAI Ada and Baidu Wenxin Yiyi. Advanced Document Handling & AI Assistance Supports multiple document formats including txt, markdown, docx, pdf with intelligent parsing, and features an embedded AI assistant for real-time online chat and manual session handover. Enterprise-Level Features & Multilingual Support Offers multi-user and multi-tenant capabilities with enterprise-grade Single Sign-On (SSO), comprehensive chat session logging for auditing, and a multilingual interface supporting Chinese, English, and more. Casibase is an open source AI knowledge base and dialogue system that combines the latest RAG (Retrieval Augmented Generation) technology, enterprise-grade Single Sign-On (SSO) functionality, and support for a wide range of mainstream AI models. Casibase is designed to provide enterprises and developers with a powerful, flexible, and easy-to-use knowledge management and intelligent dialogue platform. Casibase provides various provider configurations, such as storage providers, model providers, embedding providers, etc. To chat with AI easily, please visit the Casibase Guide for more details. Enterprise-class identity management capabilities Casibase uses Casdoor as its identity and single sign-on (SSO) provider. Through its deep integration with Casdoor, Casibase not only simplifies the user login process, but also provides a high level of security and flexibility, enabling organisations to easily manage user identities and access rights.',\n favicon: 'https://casibase.org/img/favicon.png',\n },\n {\n id: 'https://www.open-notebook.ai/',\n title: 'What is Open Notebook? | Open Notebook',\n url: 'https://www.open-notebook.ai/',\n publishedDate: '2024-01-01T00:00:00.000Z',\n author: '',\n score: 0.36405712366104126,\n text: \"Take Control of Your Learning. Privately. A powerful open-source, AI-powered note-taking/research platform that respects your privacy 🎙️ Podcast Generator Transform your notes into engaging podcasts with customizable voices, speakers, and episodes 🤖 AI-Powered Notes Leverage AI to summarize, generate insights, and manage your notes 🔒 Privacy Control Full control over what information AI can access 🔄 Content Integration Support for links, PDFs, TXT, PPT, YouTube, and more What is Open Notebook? Open Notebook is the cognitive partner you always wanted and could never explain why. It combines the power of AI with unwavering privacy controls. It's designed for researchers, students, and professionals who want to enhance their learning and abilities while maintaining complete control over workflows, models, and how their data gets used and exposed. Is this right for me? 📚 Learning Enthusiast You're constantly seeking knowledge and want to go beyond surface-level understanding. Learning for you is about building deep, lasting comprehension. 🤝 You want a learning partner You believe your learning process can improve by partnering with a tailor made AI. You want to be provoked to think more clearly. 🤯 Your learning backlog is way too big You have hundreds of links you would love to read, but there is no time for it all. You want to make sure those are catalogued for when you need them. ✍️ Independent Thinker You value both taking notes and forming your own ideas. You understand different viewpoints but believe in developing your own perspective. 🔒 You are privacy aware You don't want all your context, thoughts and plans to be all over Big Tech, if not necessary. 💁 You like things your way You want to decide how your content is handled, which AI models you want to interact with and help specifically it should help/challenge you. What is the plan for the future? There is much more that can be done to augment human knowledge. Open Notebook's first release is just a first step in that direction. The end goal is to build a Cognitive Partner for every person. A customized assistant that can help you develop your skills, knowledge, and opinions in a way that makes sense to you. Learn more about our long-term vision and roadmap in our Vision page.\",\n },\n {\n id: 'https://www.suna.so/',\n title: 'Suna - Open Source Generalist AI Agent',\n url: 'https://www.suna.so/',\n publishedDate: '2025-06-21T00:00:00.000Z',\n author: 'Kortix Team',\n score: 0.3588857054710388,\n text: '100% OPEN SOURCE Suna, your AI Employee. Suna by Kortix – is a generalist AI Agent that acts on your behalf. See Suna in action Explore real-world examples of how Suna completes complex tasks autonomously Suna is fully open source. Join our community and help shape the future of AI. The Generalist AI Agent Explore, contribute, or fork our repository. Suna is built with transparency and collaboration at its core. TypeScript Python Apache 2.0 License View on GitHub Transparency & Trust We believe AI should be open and accessible to everyone. Our open source approach ensures accountability, innovation, and community collaboration. Transparency Fully auditable codebase Community Join our developers Apache 2.0 Free to use and modify Choose the right plan for your needs Start with our free plan or upgrade to a premium plan for more usage hours Free $0 Get started with 60 min/month Public Projects Basic Model (Limited capabilities) Pro Popular $20 /month Everything in Free, plus: 2 hours/month 2 hours Private projects Access to intelligent Model (Full Suna) Custom $50 /month Everything in Pro, plus: Customize your monthly usage 6 hours/month Suited to you needs',\n image: 'https://suna.so/opengraph-image?971e689ec8d3b4eb',\n favicon: 'https://www.suna.so/favicon.png',\n },\n {\n id: 'https://github.com/AIDotNet/AntSK',\n title:\n 'GitHub - AIDotNet/AntSK: 基于.Net8+AntBlazor+SemanticKernel 和KernelMemory 打造的AI知识库/智能体,支持本地离线AI大模型。可以不联网离线运行。支持aspire观测应用数据',\n url: 'https://github.com/AIDotNet/AntSK',\n publishedDate: '2024-02-01T15:08:17.000Z',\n author: 'AIDotNet',\n score: 0.3635949492454529,\n text: '简体中文 | English \\n AntSK \\n AI Knowledge Base/Intelligent Agent built on .Net8+AntBlazor+SemanticKernel \\n ⭐Core Features \\n \\n \\n Semantic Kernel: Utilizes advanced natural language processing technology to accurately understand, process, and respond to complex semantic queries, providing users with precise information retrieval and recommendation services. \\n \\n \\n Kernel Memory: Capable of continuous learning and storing knowledge points, AntSK has long-term memory function, accumulates experience, and provides a more personalized interaction experience. \\n \\n \\n Knowledge Base: Import knowledge base through documents (Word, PDF, Excel, Txt, Markdown, Json, PPT) and perform knowledge base Q&A. \\n \\n \\n GPT Generation: This platform supports creating personalized GPT models, enabling users to build their own GPT models. \\n \\n \\n API Interface Publishing: Exposes internal functions in the form of APIs, enabling developers to integrate AntSK into other applications and enhance application intelligence. \\n \\n \\n API Plugin System: Open API plugin system that allows third-party developers or service providers to easily integrate their services into AntSK, continuously enhancing application functionality. \\n \\n \\n.Net Plugin System: Open dll plugin system that allows third-party developers or service providers to easily integrate their business functions by generating dll in standard format code, continuously enhancing application functionality. \\n \\n \\n Online Search: AntSK, real-time access to the latest information, ensuring users receive the most timely and relevant data. \\n \\n \\n Model Management: Adapts and manages integration of different models from different manufacturers, models offline running supported by llamafactory and ollama. \\n \\n \\n Domestic Innovation: AntSK supports domestic models and databases and can run under domestic innovation conditions. \\n \\n \\n Model Fine-Tuning: Planned based on llamafactory for model fine-tuning. \\n \\n \\n ⛪Application Scenarios \\n AntSK is suitable for various business scenarios, such as: \\n \\n Enterprise knowledge management system \\n Automatic customer service and chatbots \\n Enterprise search engine \\n Personalized recommendation system \\n Intelligent writing assistance \\n Education and online learning platforms \\n Other interesting AI Apps \\n \\n ✏️Function Examples \\n Online Demo \\n document \\n demo \\nand\\n demo1 \\n Default account: test\\nDefault password: test\\nDue to the low configuration of the cloud server, the local model cannot be run, so the system settings permissions have been closed. You can simply view the interface. If you want to use the local model, please download and use it on your own.\\n \\n Other Function Examples \\n Video Demonstration \\n ❓How to get started? \\n Here I am using Postgres as the data and vector storage because Semantic Kernel and Kernel Memory support it, but you can also use other options. \\n The model by default supports the local model of openai, azure openai, and llama. If you need to use other models, you can integrate t',\n image:\n 'https://opengraph.githubassets.com/945bd786b32bfe02a9a537c511d768696a91e155dc07052bba541d1b3e6517c0/AIDotNet/AntSK',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://www.cognee.ai/',\n title: 'Improve your AI infrastructure - AI memory engine',\n url: 'https://www.cognee.ai/',\n publishedDate: '2025-05-21T00:00:00.000Z',\n author: '',\n score: 0.3653402328491211,\n text: 'AI agent responses you can rely on AI Memory Python SDK. 90% accuracy out of the box. People use cognee to sort out their data and improve AI answers Ask cognee 89.4% answer relevancy Vector store Ask RAG Potato answer relevancy ChatGPT Ask ChatGPT 5% answer relevancy Improve responses from LLM applications Text generation Content summaries Customer analysis Chatbot responses Code generation Translations Why choose Cognee 1 It’s free and open-source We’re all about building in the open. Just install the Python library, or clone the repo from GitHub and start playing around. Super flexible for developers and hobbyists. 2 Totally customisable storage Want to use a different database provider? No problem. cognee supports many out of the box (like vector and graph databases), but you can easily plug in your own by following the docs. 3 Smart data with ontologies Cognee isn’t just storing random chunks of data - everything is related! RDF-based ontologies define the structure with publicly available rules and ontologies to make your data even smarter. 4 Actual reasoning (no guessing here!) Instead of just guessing based on patterns, cognee can use real reasoners. You can use existing ones, or build your own for your specific case. 5 Built for your servers You can run everything on your own servers, so if you’re dealing with sensitive data there’s no third-party risk. 6 Handles loads of data Need to analyse a lot of data? Whether it’s gigabytes (or terabytes :hushed:) cognee’s distributed system can handle it. It scales exactly when you need it to. 1 It’s free and open-source We’re all about building in the open. Just install the Python library, or clone the repo from GitHub and start playing around. Super flexible for developers and hobbyists. 3 Smart data with ontologies Cognee isn’t just storing random chunks of data - everything is related! RDF-based ontologies define the structure with publicly available rules and ontologies to make your data even smarter. 5 Built for your servers You can run everything on your own servers, so if you’re dealing with sensitive data there’s no third-party risk. 2 Totally customisable storage Want to use a different database provider? No problem. cognee supports many out of the box (like vector and graph databases), but you can easily plug in your own by following the docs. 4 Actual reasoning (no guessing here!) Instead of just guessing based on patterns, cognee can use real reasoners. You can use existing ones, or build your own for your specific case. 6 Handles loads of data Need to analyse a lot of data? Whether it’s gigabytes (or terabytes :hushed:) cognee’s distributed system can handle it. It scales exactly when you need it to. Success case Increased answer relevancy with more support agents using the tool. Helping Dynamo increase customer engagement Problem Dynamo helps gaming companies interact with their user base. Agents communicate via messenger to offer bonuses and encourage participation in tournaments a',\n image: 'https://www.cognee.ai/images/meta/cognee-logo-text-on-gradient.png',\n favicon: 'https://www.cognee.ai/favicon.ico',\n },\n {\n id: 'https://github.com/AI4WA/Docs2KG',\n title:\n 'GitHub - AI4WA/Docs2KG: Docs2KG: A Human-LLM Collaborative Approach to Unified Knowledge Graph Construction from Heterogeneous Documents',\n url: 'https://github.com/AI4WA/Docs2KG',\n publishedDate: '2024-05-08T15:21:54.000Z',\n author: 'AI4WA',\n score: 0.36111196875572205,\n text: 'Docs2KG \\n A Human-LLM Collaborative Approach to Unified Knowledge Graph Construction from Heterogeneous Documents \\n \\n \\n \\n \\n \\n \\n Installation \\n We have published the package to PyPi: Docs2KG, \\n You can install it via: \\n pip install Docs2KG\\npython -m spacy download en_core_web_sm \\n \\n \\n \\n Setup and Tutorial \\n Detailed setup and tutorial can be found in the documentation. \\n You have two ways to run the package: \\n \\n import the package in the code, and hook it with your own code \\n run the package in the command line \\n \\n Command Line \\n # first setup the CONFIG_FILE environment variable to local one \\n export CONFIG_FILE=config.yml # or any other path for the configuration file \\ndocs2kg # this command will tell you how to use the package \\n # we currently support the following commands \\ndocs2kg process-document your_input_file --agent-name phi3.5 --agent-type ollama --project-id your_project_id\\ndocs2kg batch-process your_input_dir --agent-name phi3.5 --agent-type ollama --project-id your_project_id\\ndocs2kg list-formats # list all the supported formats \\n Usage: docs2kg [OPTIONS] COMMAND [ARGS]...\\n Docs2KG - Document to Knowledge Graph conversion tool.\\n Supports multiple document formats: PDF, DOCX, HTML, and EPUB.\\nOptions:\\n -c, --config PATH Path to the configuration file (default: ./config.yml)\\n --help Show this message and exit.\\nCommands:\\n batch-process Process all supported documents in a directory.\\n list-formats List all supported document formats.\\n neo4j Load data to Neo4j database.\\n process-document Process a single document file.\\n \\n Usage: docs2kg process-document [OPTIONS] FILE_PATH\\n Process a single document file.\\n FILE_PATH: Path to the document file (PDF, DOCX, HTML, or EPUB)\\nOptions:\\n -p, --project-id TEXT Project ID for the knowledge graph construction\\n -n, --agent-name TEXT Name of the agent to use for NER extraction\\n -t, --agent-type TEXT Type of the agent to use for NER extraction\\n --help Show this message and exit.\\n \\n Usage: docs2kg neo4j [OPTIONS] PROJECT_ID\\n Load data to Neo4j database.\\nOptions:\\n -m, --mode [import|export|load|docker_start|docker_stop]\\n Mode of operation (import or export)\\n -u, --neo4j-uri TEXT URI for the Neo4j database\\n -U, --neo4j-user TEXT Username for the Neo4j database\\n -P, --neo4j-password TEXT Password for the Neo4j database\\n -r, --reset_db Reset the database before loading data\\n --help \\n \\n Motivation \\n To digest diverse unstructured documents into a unified knowledge graph, there are two main challenges: \\n \\n How to get the documents to be digitized? \\n \\n With the dual-path data processing\\n \\n For image based documents, like scanned PDF, images, etc., we can process them through the layout analysis and\\nOCR, etc. Docling and MinerU are focusing on this part. \\n For native digital documents, like ebook, docx, html, etc., we can process them through the programming parser \\n \\n \\n It is promising that we will have a robust solution soon. \\n \\n \\n How to construct a high-quality unified knowledge graph with less effort? \\n \\n Fo',\n image:\n 'https://opengraph.githubassets.com/170da8210f59c1e9bb44ebe1ee84b35e1fd9d3d74d1aec22323534770d4921af/AI4WA/Docs2KG',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://github.com/RoboZoom/knowledge_management',\n title: 'GitHub - RoboZoom/knowledge_management',\n url: 'https://github.com/RoboZoom/knowledge_management',\n publishedDate: '2024-02-08T02:20:22.000Z',\n author: 'RoboZoom',\n score: 0.37371376156806946,\n text: '\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\nGitHub Copilot\\n \\nWrite better code with AI\\n \\n \\n \\n \\n \\n \\nGitHub Models\\n \\nNew\\n \\n \\nManage and compare prompts\\n \\n \\n \\n \\n \\n \\nGitHub Advanced Security\\n \\nFind and fix vulnerabilities\\n \\n \\n \\n \\n \\n \\nActions\\n \\nAutomate any workflow\\n \\n \\n \\n \\n \\n \\nCodespaces\\n \\nInstant dev environments\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\nIssues\\n \\nPlan and track work\\n \\n \\n \\n \\n \\n \\nCode Review\\n \\nManage code changes\\n \\n \\n \\n \\n \\n \\nDiscussions\\n \\nCollaborate outside of code\\n \\n \\n \\n \\n \\n \\nCode Search\\n \\nFind more, search less\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n Explore \\n \\n \\nLearning Pathways\\n \\n \\n \\nEvents & Webinars\\n \\n \\n \\nEbooks & Whitepapers\\n \\n \\n \\nCustomer Stories\\n \\n \\n \\nPartners\\n \\n \\n \\nExecutive Insights\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\nGitHub Sponsors\\n \\nFund open source developers\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\nThe ReadME Project\\n \\nGitHub community articles\\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\n \\nEnterprise platform\\n \\nAI-powered developer platform\\n \\n \\n \\n \\n \\n \\n Pricing \\n \\n \\n \\n \\n \\nSign up\\n \\n \\n',\n image:\n 'https://opengraph.githubassets.com/2388498497e355faeecdd0ebc0ae18ac0680ba329b5f7030aa21bc38ddaa6b8b/RoboZoom/knowledge_management',\n favicon: 'https://github.com/fluidicon.png',\n },\n {\n id: 'https://creati.ai/ai-tools/sciphi/',\n title: 'SciPhi: Build, Deploy, and Optimize AI Systems | Creati.ai',\n url: 'https://creati.ai/ai-tools/sciphi/',\n publishedDate: '2024-07-01T00:00:00.000Z',\n author: '',\n score: 0.37101393938064575,\n text: \"SciPhi simplifies building, deploying, and optimizing Retrieval-Augmented Generation (RAG) systems, empowering developers to focus on AI innovation. Added on: Social & Email: Platform: SciPhi SciPhi simplifies building, deploying, and optimizing Retrieval-Augmented Generation (RAG) systems, empowering developers to focus on AI innovation. Added on: Social & Email: Platform: What is SciPhi? SciPhi is an open-source platform designed to simplify the building, deploying, and scaling of Retrieval-Augmented Generation (RAG) systems. It provides an end-to-end solution for developers, enabling them to focus on AI innovation without worrying about the underlying infrastructure. With tools for automated knowledge graph extraction, document and user management, and robust observability, SciPhi ensures efficient and optimized RAG system deployment. Who will use SciPhi? Developers AI Engineers Data Scientists Tech Startups Research Institutions How to use the SciPhi? Step1: Visit the SciPhi website. Step2: Sign up for an account or log in. Step3: Access the platform's dashboard. Step4: Follow guides to build and deploy your RAG system. Step5: Use tools for knowledge graph extraction and management. Step6: Optimize and monitor your system using provided observability features. SciPhi's Core Features & Benefits The Core Features of SciPhi End-to-End RAG System Deployment Automated Knowledge Graph Extraction Document and User Management Robust Observability Tools The Benefits of SciPhi Simplifies AI Development Speeds Up Deployment Time Enhances System Optimization Reduces Infrastructure Complexity SciPhi's Main Use Cases & Applications Building RAG Systems for AI Applications Deploying Knowledge Graphs Managing Large Document Repositories Optimizing AI System Performance FAQs of SciPhi SciPhi is an open-source platform designed to simplify building, deploying, and optimizing Retrieval-Augmented Generation (RAG) systems. SciPhi is intended for developers, AI engineers, data scientists, tech startups, and research institutions. Core features include end-to-end RAG system deployment, automated knowledge graph extraction, document and user management, and robust observability tools. Visit the SciPhi website, sign up for an account, and follow the guides to build and deploy your RAG system. SciPhi supports web platforms. SciPhi simplifies AI development, speeds up deployment time, enhances system optimization, and reduces infrastructure complexity. Yes, alternatives include LangChain, LlamaIndex, Haystack, and Flower. SciPhi supports building RAG systems for AI applications, deploying knowledge graphs, managing large document repositories, and optimizing AI system performance. You can reach out to their support team via their support email provided on the website. SciPhi offers both free and paid plans. Details on pricing can be found on their website. SciPhi Company Information Website: https://www.sciphi.ai Company Name: SciPhi Support Email: [ema\",\n image: 'https://cdn-image.creati.ai/ai-tools/product-image/sciphi.webp',\n favicon: 'https://cdn-image.creati.ai/image/Creatiai.ico',\n },\n {\n id: 'https://helpjuice.com/blog/open-source-knowledge-base',\n title: 'The 12 Best Open Source Knowledge Base Software for 2024',\n url: 'https://helpjuice.com/blog/open-source-knowledge-base',\n author: 'Zeeshan Khan',\n text: \"\\n \\n \\n \\n \\n At Helpjuice / \\n \\n #Software & Alternatives\\n May 15 2025 \\n 11m read \\n \\n \\n \\n \\n On the hunt for the perfect knowledge base software that’s open source? This post will walk you through the best options for your business. \\n \\n \\n \\n \\n There’s no denying that a knowledge base can make a major impact on your organization. Whether it's to help provide better support to your customers or to enable your employees to find the information they need to do their job, a finely-tuned knowledge base can make all the difference when it comes to how knowledge and information flows through your business. And with plenty of options on the market out there, there’s certainly no shortage of open source knowledge base software. But how can you tell you’re not investing time into installing and learning new software that your team won't use anyway? How can you avoid the time and effort put into an open source option that you later determine to not be a good fit for your needs? It’s simple—do a little research beforehand. We know, we know—you don’t have endless time to invest in that kind of thing (what with a business to run and all). That’s why we’ve created a helpful list of the must-consider open source knowledge base software that companies of all niches, industries, and sizes should consider. We’re even throwing in a little helpful knowledge that should equip you with the information needed to choose the right software for you—like what knowledge base software is in the first place, the benefits of open source software, and how to address your unique needs as a company to choose the right software for you. Want to skip ahead on some of the basics of open-source knowledge base software? Be our guest. The best open source knowledge base software includes: \\n BookStack \\n OpenKM \\n myBase \\n eXo \\n PHPKB \\n Documize \\n DocuWiki \\n phpMyFAQ \\n MediaWiki \\n xWiki \\n TWiki \\n TiddlyWiki \\n What is an Open Source Knowledge Base? Before we dive into which open-source knowledge base software you should consider for your business, we should probably ensure we’re on the same page about what exactly open-source knowledge base software is. First things first, let’s start with the term knowledge base. A knowledge base is a central place that allows structured storage of information where users can search for and access this information. Knowledge base software should be the key tool that helps make this process seamless, simplified, and efficient. Knowledge base software is designed to help you create and manage your knowledge base to the best of your ability. this usually includes setting up the knowledge base architecture, creating and editing documentation, searching, and analyzing your knowledge base, and more. Ideally, this is the irreplaceable piece of the puzzle that operates your entire knowledge management system that helps orchestrate, manage, and optimize the flow of knowledge within your organization. That part seems pretty clear, right? Next, we’ll move on to\",\n image:\n 'https://static.helpjuice.com/helpjuice_production/uploads/upload/image/4752/direct/1636499945090-Open%20Source%20Knowledge%20Base%20Software.jpg',\n favicon:\n 'https://static.helpjuice.com/assets/favicon-32x32-161f2153235b710a8ed7b9233ed6b195936bdb57bf1310e720f7fea79547cf9d.png',\n },\n ],\n costDollars: {\n total: 0.015,\n search: {\n neural: 0.005,\n },\n contents: {\n text: 0.01,\n },\n },\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport type { SearchResponse } from 'exa-js';\n\nimport Search1 from './exa-search-1748337321991';\nimport Search2 from './exa-search-1748337331526';\nimport Search3 from './exa-search-1748337344119';\n\nexport const SEARCH_RESULTS: SearchResponse<any>[] = [Search1, Search2, Search3];\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Tool from '@effect/ai/Tool';\nimport * as Toolkit from '@effect/ai/Toolkit';\nimport * as Context from 'effect/Context';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Option from 'effect/Option';\nimport * as Schema from 'effect/Schema';\nimport * as SchemaAST from 'effect/SchemaAST';\n\nimport { Obj, type Relation } from '@dxos/echo';\nimport { Filter, Query } from '@dxos/echo';\nimport {\n EntityKind,\n ObjectId,\n ReferenceAnnotationId,\n RelationSourceDXNId,\n RelationSourceId,\n RelationTargetDXNId,\n RelationTargetId,\n create,\n getEntityKind,\n getSchemaDXN,\n getSchemaTypename,\n getTypeAnnotation,\n getTypeIdentifierAnnotation,\n} from '@dxos/echo/internal';\nimport { type EchoDatabase, type Queue } from '@dxos/echo-db';\nimport { isEncodedReference } from '@dxos/echo-protocol';\nimport { mapAst } from '@dxos/effect';\nimport { ContextQueueService, DatabaseService } from '@dxos/functions';\nimport { DXN } from '@dxos/keys';\nimport { log } from '@dxos/log';\nimport { deepMapValues, isNonNullable, trim } from '@dxos/util';\n\n// TODO(burdon): Unify with the graph schema.\nexport const Subgraph = Schema.Struct({\n /** Objects and relations. */\n objects: Schema.Array(Schema.Any),\n});\n\nexport interface Subgraph extends Schema.Schema.Type<typeof Subgraph> {}\n\nexport type RelatedSchema = {\n schema: Schema.Schema.AnyNoContext;\n kind: 'reference' | 'relation';\n};\n\n/**\n * Find all schemas that are related to the given schema.\n *\n * @param db\n * @param schema\n * @returns\n */\nexport const findRelatedSchema = async (\n db: EchoDatabase,\n anchor: Schema.Schema.AnyNoContext,\n): Promise<RelatedSchema[]> => {\n // TODO(dmaretskyi): Query stored schemas.\n const allSchemas = [...db.graph.schemaRegistry.schemas];\n\n // TODO(dmaretskyi): Also do references.\n return allSchemas\n .filter((schema) => {\n if (getTypeAnnotation(schema)?.kind !== EntityKind.Relation) {\n return false;\n }\n\n return (\n isSchemaAddressableByDxn(anchor, DXN.parse(getTypeAnnotation(schema)!.sourceSchema!)) ||\n isSchemaAddressableByDxn(anchor, DXN.parse(getTypeAnnotation(schema)!.targetSchema!))\n );\n })\n .map(\n (schema): RelatedSchema => ({\n schema,\n kind: 'relation',\n }),\n );\n};\n\n/**\n * Non-strict DXN comparison.\n * Returns true if the DXN could be resolved to the schema.\n */\nconst isSchemaAddressableByDxn = (schema: Schema.Schema.AnyNoContext, dxn: DXN): boolean => {\n if (getTypeIdentifierAnnotation(schema) === dxn.toString()) {\n return true;\n }\n\n const t = dxn.asTypeDXN();\n if (t) {\n return t.type === getSchemaTypename(schema);\n }\n\n return false;\n};\n\n/**\n * Perform vector search in the local database.\n */\n// TODO(dmaretskyi): Rename `GraphReadToolkit`.\nexport const LocalSearchToolkit = Toolkit.make(\n Tool.make('search_local_search', {\n description: 'Search the local database for information using a vector index',\n parameters: {\n query: Schema.String.annotations({\n description: 'The query to search for. Could be a question or a topic or a set of keywords.',\n }),\n },\n success: Schema.Unknown,\n failure: Schema.Never,\n dependencies: [DatabaseService],\n }),\n);\n\nexport const LocalSearchHandler = LocalSearchToolkit.toLayer({\n search_local_search: Effect.fn(function* ({ query }) {\n const { objects } = yield* DatabaseService.runQuery(Query.select(Filter.text(query, { type: 'vector' })));\n const results = [...objects];\n\n const option = yield* Effect.serviceOption(ContextQueueService);\n if (Option.isSome(option)) {\n const queueObjects = yield* Effect.promise(() => option.value.queue.queryObjects());\n // TODO(dmaretskyi): Text search on the queue.\n results.push(...queueObjects);\n }\n\n return trim`\n <local_context>\n ${JSON.stringify(results, null, 2)}\n </local_context>\n `;\n }),\n});\n\n/**\n * Attached as an annotation to the writer tool.\n */\nclass GraphWriterSchema extends Context.Tag('@dxos/assistant/GraphWriterSchema')<\n GraphWriterSchema,\n {\n schema: Schema.Schema.AnyNoContext[];\n }\n>() {}\n\n/**\n * Forms typed objects that can be written to the graph database.\n */\nexport const makeGraphWriterToolkit = ({ schema }: { schema: Schema.Schema.AnyNoContext[] }) => {\n return Toolkit.make(\n Tool.make('graph_writer', {\n description: 'Write to the local graph database',\n parameters: createExtractionSchema(schema).fields,\n success: Schema.Unknown,\n failure: Schema.Never,\n dependencies: [DatabaseService, ContextQueueService],\n }).annotateContext(Context.make(GraphWriterSchema, { schema })),\n );\n};\n\nexport const makeGraphWriterHandler = (\n toolkit: ReturnType<typeof makeGraphWriterToolkit>,\n {\n onAppend,\n }: {\n onAppend?: (object: DXN[]) => void;\n } = {},\n) => {\n const { schema } = Context.get(\n toolkit.tools.graph_writer.annotations as Context.Context<GraphWriterSchema>,\n GraphWriterSchema,\n );\n\n return toolkit.toLayer({\n graph_writer: Effect.fn(function* (input) {\n const { db } = yield* DatabaseService;\n const { queue } = yield* ContextQueueService;\n const data = yield* Effect.promise(() => sanitizeObjects(schema, input as any, db, queue));\n yield* Effect.promise(() => queue.append(data as Obj.Any[]));\n\n const dxns = data.map((obj) => Obj.getDXN(obj));\n onAppend?.(dxns);\n return dxns;\n }),\n });\n};\n\n/**\n * Create a schema for structured data extraction.\n */\nexport const createExtractionSchema = (types: Schema.Schema.AnyNoContext[]) => {\n return Schema.Struct({\n ...Object.fromEntries(\n types.map(preprocessSchema).map((schema, index) => [\n `objects_${getSanitizedSchemaName(types[index])}`,\n Schema.optional(Schema.Array(schema)).annotations({\n description: `The objects of type: ${getSchemaDXN(types[index])?.asTypeDXN()!.type}. ${SchemaAST.getDescriptionAnnotation(types[index].ast).pipe(Option.getOrElse(() => ''))}`,\n }),\n ]),\n ),\n });\n};\n\nexport const getSanitizedSchemaName = (schema: Schema.Schema.AnyNoContext) => {\n return getSchemaDXN(schema)!\n .asTypeDXN()!\n .type.replaceAll(/[^a-zA-Z0-9]+/g, '_');\n};\n\nexport const sanitizeObjects = async (\n types: Schema.Schema.AnyNoContext[],\n data: Record<string, readonly unknown[]>,\n db: EchoDatabase,\n queue?: Queue,\n): Promise<Obj.Any[]> => {\n const entries = types\n .map(\n (type) =>\n data[`objects_${getSanitizedSchemaName(type)}`]?.map((object: any) => ({\n data: object,\n schema: type,\n })) ?? [],\n )\n .flat();\n\n const idMap = new Map<string, string>();\n const existingIds = new Set<ObjectId>();\n const enitties = new Map<ObjectId, Obj.Any | Relation.Any>();\n\n const resolveId = (id: string): DXN | undefined => {\n if (ObjectId.isValid(id)) {\n existingIds.add(id);\n return DXN.fromLocalObjectId(id);\n }\n\n const mappedId = idMap.get(id);\n if (mappedId) {\n return DXN.fromLocalObjectId(mappedId);\n }\n\n return undefined;\n };\n\n const res = entries\n .map((entry) => {\n // This entry mutates existing object.\n if (ObjectId.isValid(entry.data.id)) {\n return entry;\n }\n\n idMap.set(entry.data.id, ObjectId.random());\n entry.data.id = idMap.get(entry.data.id);\n return entry;\n })\n .map((entry) => {\n const data = deepMapValues(entry.data, (value, recurse) => {\n if (isEncodedReference(value)) {\n const ref = value['/'];\n const id = resolveId(ref);\n\n if (id) {\n // Link to an existing object.\n return { '/': id.toString() };\n } else {\n // Search URIs?\n return { '/': `search:?q=${encodeURIComponent(ref)}` };\n }\n }\n\n return recurse(value);\n });\n\n if (getEntityKind(entry.schema) === 'relation') {\n const sourceDxn = resolveId(data.source);\n if (!sourceDxn) {\n log.warn('source not found', { source: data.source });\n }\n const targetDxn = resolveId(data.target);\n if (!targetDxn) {\n log.warn('target not found', { target: data.target });\n }\n delete data.source;\n delete data.target;\n data[RelationSourceDXNId] = sourceDxn;\n data[RelationTargetDXNId] = targetDxn;\n }\n\n return {\n data,\n schema: entry.schema,\n };\n })\n .filter((object) => !existingIds.has(object.data.id)); // TODO(dmaretskyi): This dissallows updating existing objects.\n\n // TODO(dmaretskyi): Use ref resolver.\n const { objects: dbObjects } = await db.query(Query.select(Filter.ids(...existingIds))).run();\n const queueObjects = (await queue?.getObjectsById([...existingIds])) ?? [];\n const objects = [...dbObjects, ...queueObjects].filter(isNonNullable);\n\n // TODO(dmaretskyi): Returns everything if IDs are empty!\n log.info('objects', { dbObjects, queueObjects, existingIds });\n const missing = Array.from(existingIds).filter((id) => !objects.some((object) => object.id === id));\n if (missing.length > 0) {\n throw new Error(`Object IDs do not point to existing objects: ${missing.join(', ')}`);\n }\n\n return res.flatMap(({ data, schema }) => {\n let skip = false;\n if (RelationSourceDXNId in data) {\n const id = (data[RelationSourceDXNId] as DXN).asEchoDXN()?.echoId;\n const obj = objects.find((object) => object.id === id) ?? enitties.get(id!);\n if (obj) {\n delete data[RelationSourceDXNId];\n data[RelationSourceId] = obj;\n } else {\n skip = true;\n }\n }\n if (RelationTargetDXNId in data) {\n const id = (data[RelationTargetDXNId] as DXN).asEchoDXN()?.echoId;\n const obj = objects.find((object) => object.id === id) ?? enitties.get(id!);\n if (obj) {\n delete data[RelationTargetDXNId];\n data[RelationTargetId] = obj;\n } else {\n skip = true;\n }\n }\n if (!skip) {\n const obj = create(schema, data);\n enitties.set(obj.id, obj);\n return [obj];\n }\n return [];\n });\n};\n\nconst SoftRef = Schema.Struct({\n '/': Schema.String,\n}).annotations({\n description: 'Reference to another object.',\n});\n\nconst preprocessSchema = (schema: Schema.Schema.AnyNoContext) => {\n const isRelationSchema = getEntityKind(schema) === 'relation';\n\n const go = (ast: SchemaAST.AST, visited = new Set<SchemaAST.AST>()): SchemaAST.AST => {\n if (visited.has(ast)) {\n // Already visited this node, prevent infinite recursion.\n return ast;\n }\n visited.add(ast);\n\n if (SchemaAST.getAnnotation(ast, ReferenceAnnotationId).pipe(Option.isSome)) {\n return SoftRef.ast;\n }\n\n return mapAst(ast, (child) => go(child, visited));\n };\n\n return Schema.make<any, any, never>(mapAst(schema.ast, (ast) => go(ast))).pipe(\n Schema.omit('id'),\n Schema.extend(\n Schema.Struct({\n id: Schema.String.annotations({\n description: 'The id of this object. Come up with a unique id based on your judgement.',\n }),\n }),\n ),\n isRelationSchema\n ? Schema.extend(\n Schema.Struct({\n source: Schema.String.annotations({\n description: 'The id of the source object for this relation.',\n }),\n target: Schema.String.annotations({\n description: 'The id of the target object for this relation.',\n }),\n }),\n )\n : Function.identity<Schema.Schema.AnyNoContext>,\n );\n};\n", "You are the Research Agent.\n\nThe Research Agent is an expert assistant that conducts in-depth research using real-time web search.\nThe Research Agent outputs results in a structured format matching the schema provided.\n\nThe Research Agent is equipped with the ability to:\n\n- Generate precise and effective search queries \n- Request web pages by query (through a `web_search` tool)\n- Read the full content of retrieved pages\n- Synthesize accurate, clear, and structured answers using reliable information from the retrieved content\n- Search the local database for information using a vector index (through a `local_search` tool)\n\nThe Research Agent always follows these principles:\n\n- Relevance First: The Research Agent only returns facts supported by content in retrieved web pages. The Research Agent never fabricates or guesses information.\n- Summarize, Don't Copy: The Research Agent synthesizes and rephrases content in its own words. The Research Agent quotes only when necessary.\n- Multiple Sources: The Research Agent cross-references at least 2 sources before drawing conclusions, unless the information is directly stated and non-controversial.\n- Transparency: The Research Agent mentions which sources were used and explains how it arrived at conclusions.\n- Accuracy Over Brevity: The Research Agent prefers detailed, technically accurate explanations over shallow summaries.\n- The Research Agent admits uncertainty rather than misleading.\n- The Research Agent picks the most concrete schema types for extracted information.\n- The Research Agent fills schema fields completely with information it is confident about, and omits fields it is not confident about.\n- When outputting results, the Research Agent adds extra data that fits the schema even if not directly related to the user's question.\n- The Research Agent creates relations and references between new objects found and what's already in the database.\n- The Research Agent does not create objects that are already in the database.\n- The Research Agent re-uses existing object IDs as references when enriching existing objects.\n- The Research Agent ALWAYS calls the `graph_writer` at the end to save the data. This conversation will be deleted, so only the data written to the graph will be preserved.\n\nThe Research Agent may be asked for:\n\n- Technical explanations\n- Literature reviews \n- Comparisons\n- Emerging trends\n- Implementation strategies\n\nThe Research Agent begins by interpreting the user's request, then:\n\nThe Research Agent breaks it into sub-questions (if applicable).\n\nFor each sub-question, the Research Agent generates a clear, concise web search query.\n\nThe Research Agent uses `web_search`(query) to retrieve information.\n\nThe Research Agent extracts and synthesizes relevant answers.\n\nThe Research Agent's output includes:\n\n- A clear, structured answer to the user's question\n- A citation list or link list of sources used\n\nOptionally, the Research Agent provides follow-up suggestions or questions for deeper inquiry.\n\nHere's how the Research Agent operates:\n\n1. The Research Agent analyzes the user's request and identifies key topics to search for (3 or more), printing them out.\n2. The Research Agent performs a web search for each topic.\n3. The Research Agent reads and analyzes results, cross references information from multiple sources, and represents conflicting information as ranges of possible values.\n\n4. The Research Agent searches the local database for information using a vector index that might link to the user's question.\n6. The Research Agent creates relations and references between new objects and existing database objects when related, using existing object IDs as references.\n7. The Research Agent selects the most concrete schema types for extracted information, using multiple types as needed, and prints its decision and reasoning.\n5. The Research Agent creates a clear, structured answer to the user's question.\n8. The Research Agent submits results using the specific schema.\n\nIMPORTANT:\n\n- The Research Agent always runs the `local_search` tool to search the local database at least once before submitting results.\n- The Research Agent does not create objects that already exist in the database.\n- Ids that are not in the database are human-readable strings like `ivan_zhao_1`.\n\nStatus reporting:\n\nThe Research Agent reports its status frequently using the `<status>` tags: <status>Searching for Google Founders</status>\nThe Research Agent reports its status in-between each tool call and before submitting results.\n\n<example>\n\nBased on my research, I can now provide information about Google and it's founders.\n\nThe following objects are already in the database, I will not submit them again, but I'll re-use their IDs as references:\n\n- 01JWRDEHPB5TT2JQQQC15038BT Google\n- 01JWRDEHPA14CYW2NW9FAH6DJJ Larry Page\n- 01JWRDEHPBN0BBJP57B9S108W6 Sergey Brin\n\nI will use the following schema to construct new objects:\n\n- type:dxos.org/type/Organization for Alphabet Inc.\n- type:dxos.org/type/Person for Ivan Zhao\n- type:dxos.org/type/Person for Simon Last\n- dxn:type:dxos.org/relation/Employer for Ivan's employer\n- dxn:type:dxos.org/relation/Employer for Simon's employer\n\n<status>Formatting results</status>\n\n</example>", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Layer from 'effect/Layer';\nimport * as Schema from 'effect/Schema';\n\nimport { Obj, Query, Ref, Type } from '@dxos/echo';\nimport { Queue } from '@dxos/echo-db';\nimport { ContextQueueService, DatabaseService, QueueService } from '@dxos/functions';\n\n/**\n * Container for a set of ephemeral research results.\n */\nexport const ResearchGraph = Schema.Struct({\n queue: Type.Ref(Queue),\n}).pipe(\n Type.Obj({\n typename: 'dxos.org/type/ResearchGraph',\n version: '0.1.0',\n }),\n);\n\nexport interface ResearchGraph extends Schema.Schema.Type<typeof ResearchGraph> {}\n\nexport const queryResearchGraph: () => Effect.Effect<ResearchGraph | undefined, never, DatabaseService> = Effect.fn(\n 'queryResearchGraph',\n)(function* () {\n const { objects } = yield* DatabaseService.runQuery(Query.type(ResearchGraph));\n return objects.at(0);\n});\n\nexport const createResearchGraph: () => Effect.Effect<ResearchGraph, never, DatabaseService | QueueService> = Effect.fn(\n 'createResearchGraph',\n)(function* () {\n const queue = yield* QueueService.createQueue();\n return yield* DatabaseService.add(Obj.make(ResearchGraph, { queue: Ref.fromDXN(queue.dxn) }));\n});\n\nexport const contextQueueLayerFromResearchGraph = Layer.unwrapEffect(\n Effect.gen(function* () {\n const researchGraph = (yield* queryResearchGraph()) ?? (yield* createResearchGraph());\n const researchQueue = yield* DatabaseService.load(researchGraph.queue);\n return ContextQueueService.layer(researchQueue);\n }),\n);\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { DataType } from '@dxos/schema';\n\n/**\n * Data types for research.\n */\nexport const ResearchDataTypes = [\n // Objects\n DataType.Event,\n DataType.LegacyOrganization,\n DataType.LegacyPerson,\n DataType.Project,\n DataType.Task,\n DataType.Text,\n\n // Relations\n // TODO(wittjosiah): Until views (e.g. table) support relations this needs to be expressed via organization ref.\n // DataType.Employer,\n DataType.HasRelationship,\n DataType.HasConnection,\n];\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { default as create$ } from './create-document';\nimport { default as research$ } from './research';\n\nexport * from './graph';\nexport * from './research-graph';\nexport * from './types';\n\nexport namespace Research {\n export const create = create$;\n export const research = research$;\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { default as extract$ } from './entity-extraction';\n\nexport namespace EntityExtraction {\n export const extract = extract$;\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as FetchHttpClient from '@effect/platform/FetchHttpClient';\nimport * as HttpClient from '@effect/platform/HttpClient';\nimport * as Array from 'effect/Array';\nimport * as Effect from 'effect/Effect';\nimport * as Function from 'effect/Function';\nimport * as Schema from 'effect/Schema';\n\nimport { Filter, Obj, Query, Ref, type Type } from '@dxos/echo';\nimport { DatabaseService, defineFunction, withAuthorization } from '@dxos/functions';\nimport { log } from '@dxos/log';\nimport { DataType } from '@dxos/schema';\n\nimport { syncObjects } from '../../sync';\nimport { graphqlRequestBody } from '../../util';\n\nconst queryIssues = `\nquery Issues($teamId: String!, $after: DateTimeOrDuration!) {\n team(id: $teamId) {\n id\n name\n\n\n issues(last: 150, orderBy: updatedAt, filter: {\n updatedAt: { gt: $after }\n }) {\n edges {\n node {\n id\n title\n createdAt\n updatedAt\n description\n assignee { id, name }\n state { \n name\n }\n project {\n id\n name\n }\n }\n cursor\n }\n pageInfo {\n hasNextPage\n endCursor\n }\n }\n }\n}\n`;\n\ntype LinearIssue = {\n id: string;\n title: string;\n createdAt: string;\n updatedAt: string;\n description: string;\n assignee: LinearPerson;\n state: { name: string };\n project: { id: string; name: string };\n};\n\ntype LinearPerson = {\n id: string;\n name: string;\n};\n\nexport const LINEAR_ID_KEY = 'linear.app/id';\nexport const LINEAR_TEAM_ID_KEY = 'linear.app/teamId';\nexport const LINEAR_UPDATED_AT_KEY = 'linear.app/updatedAt';\n\nexport default defineFunction({\n key: 'dxos.org/function/linear/sync-issues',\n name: 'Linear',\n description: 'Sync issues from Linear.',\n inputSchema: Schema.Struct({\n team: Schema.String.annotations({\n description: 'Linear team id.',\n }),\n }),\n handler: Effect.fnUntraced(function* ({ data }) {\n const client = yield* HttpClient.HttpClient.pipe(Effect.map(withAuthorization({ service: 'linear.app' })));\n\n // Get the timestamp that was previosly synced.\n const after = yield* getLatestUpdateTimestamp(data.team, DataType.Task);\n log.info('will fetch', { after });\n\n // Fetch the issues that have changed since the last sync.\n const response = yield* client.post('https://api.linear.app/graphql', {\n body: yield* graphqlRequestBody(queryIssues, {\n teamId: data.team,\n after,\n }),\n });\n const json: any = yield* response.json;\n const tasks = (json.data.team.issues.edges as any[]).map((edge: any) =>\n mapLinearIssue(edge.node as LinearIssue, { teamId: data.team }),\n );\n log.info('Fetched tasks', { count: tasks.length });\n\n // Synchronize new objects with ECHO.\n return {\n objects: yield* syncObjects(tasks, { foreignKeyId: LINEAR_ID_KEY }),\n syncComplete: tasks.length < 150,\n };\n }, Effect.provide(FetchHttpClient.layer)),\n});\n\nconst getLatestUpdateTimestamp: (\n teamId: string,\n dataType: Type.Obj.Any,\n) => Effect.Effect<string, never, DatabaseService> = Effect.fnUntraced(function* (teamId, dataType) {\n const { objects: existingTasks } = yield* DatabaseService.runQuery(\n Query.type(dataType).select(Filter.foreignKeys(dataType, [{ source: LINEAR_TEAM_ID_KEY, id: teamId }])),\n );\n return Function.pipe(\n existingTasks,\n Array.map((task) => Obj.getKeys(task, LINEAR_UPDATED_AT_KEY).at(0)?.id),\n Array.filter((x) => x !== undefined),\n Array.reduce('2025-01-01T00:00:00.000Z', (acc: string, x: string) => (x > acc ? x : acc)),\n );\n});\n\nconst mapLinearPerson = (person: LinearPerson, { teamId }: { teamId: string }): DataType.Person =>\n Obj.make(DataType.Person, {\n [Obj.Meta]: {\n keys: [\n {\n id: person.id,\n source: LINEAR_ID_KEY,\n },\n {\n id: teamId,\n source: LINEAR_TEAM_ID_KEY,\n },\n ],\n },\n nickname: person.name,\n });\n\nconst mapLinearIssue = (issue: LinearIssue, { teamId }: { teamId: string }): DataType.Task =>\n Obj.make(DataType.Task, {\n [Obj.Meta]: {\n keys: [\n {\n id: issue.id,\n source: LINEAR_ID_KEY,\n },\n {\n id: issue.updatedAt,\n source: LINEAR_UPDATED_AT_KEY,\n },\n {\n id: teamId,\n source: LINEAR_TEAM_ID_KEY,\n },\n ],\n },\n title: issue.title ?? undefined,\n description: issue.description ?? undefined,\n assigned: !issue.assignee ? undefined : Ref.make(mapLinearPerson(issue.assignee, { teamId })),\n // TODO(dmaretskyi): Sync those (+ linear team as org?).\n // state: issue.state.name,\n\n project: !issue.project\n ? undefined\n : Ref.make(\n DataType.makeProject({\n [Obj.Meta]: {\n keys: [\n {\n id: issue.project.id,\n source: LINEAR_ID_KEY,\n },\n {\n id: teamId,\n source: LINEAR_TEAM_ID_KEY,\n },\n ],\n },\n name: issue.project.name,\n }),\n ),\n });\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\n\nimport { Filter, Obj, Query, Ref } from '@dxos/echo';\nimport { DatabaseService } from '@dxos/functions';\nimport { failedInvariant } from '@dxos/invariant';\nimport { log } from '@dxos/log';\n\n/**\n * Syncs objects to the database.\n * If there's an object with a matching foreign key in the database, it will be updated.\n * Otherwise, a new object will be added.\n * Recursively syncs top-level refs.\n *\n * @param opts.foreignKeyId - The key to use for matching objects.\n */\nexport const syncObjects: (\n objs: Obj.Any[],\n opts: { foreignKeyId: string },\n) => Effect.Effect<Obj.Any[], never, DatabaseService> = Effect.fn('syncObjects')(function* (objs, { foreignKeyId }) {\n return yield* Effect.forEach(\n objs,\n Effect.fnUntraced(function* (obj) {\n // Sync referenced objects.\n for (const key of Object.keys(obj)) {\n if (typeof key !== 'string' || key === 'id') continue;\n if (!Ref.isRef((obj as any)[key])) continue;\n const ref: Ref.Any = (obj as any)[key];\n if (!ref.target) continue;\n if (Obj.getDXN(ref.target).isLocalObjectId()) {\n // obj not persisted to db.\n const [target] = yield* syncObjects([ref.target], { foreignKeyId });\n (obj as any)[key] = Ref.make(target);\n }\n }\n\n const schema = Obj.getSchema(obj) ?? failedInvariant('No schema.');\n const foreignId = Obj.getKeys(obj, foreignKeyId)[0]?.id ?? failedInvariant('No foreign key.');\n const {\n objects: [existing],\n } = yield* DatabaseService.runQuery(\n Query.select(Filter.foreignKeys(schema, [{ source: foreignKeyId, id: foreignId }])),\n );\n log('sync object', {\n type: Obj.getTypename(obj),\n foreignId,\n existing: existing ? Obj.getDXN(existing) : undefined,\n });\n if (!existing) {\n yield* DatabaseService.add(obj);\n return obj;\n } else {\n copyObjectData(existing, obj);\n return existing;\n }\n }),\n { concurrency: 1 },\n );\n});\n\nconst copyObjectData = (existing: Obj.Any, newObj: Obj.Any) => {\n for (const key of Object.keys(newObj)) {\n if (typeof key !== 'string' || key === 'id') continue;\n if (\n typeof (newObj as any)[key] !== 'string' &&\n typeof (newObj as any)[key] !== 'number' &&\n typeof (newObj as any)[key] !== 'boolean' &&\n !Ref.isRef((newObj as any)[key])\n )\n continue;\n (existing as any)[key] = (newObj as any)[key];\n }\n for (const key of Object.keys(existing)) {\n if (typeof key !== 'string' || key === 'id') continue;\n if (!(key in newObj)) {\n delete (existing as any)[key];\n }\n }\n for (const foreignKey of Obj.getMeta(newObj).keys) {\n Obj.deleteKeys(existing, foreignKey.source);\n // TODO(dmaretskyi): Doesn't work: `Obj.getMeta(existing).keys.push(foreignKey);`\n Obj.getMeta(existing).keys.push({ ...foreignKey });\n }\n};\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as HttpBody from '@effect/platform/HttpBody';\n\n/**\n * Template tag literal to get syntax highlighting for the query.\n *\n * @example\n * ```ts\n * const query = gql`\n * query Team($teamId: String!) {\n * team(id: $teamId) {\n * id\n * name\n * }\n * }\n * `;\n * ```\n */\nexport const gql = (query: string) => query;\n\n/**\n * @returns JSON body for the graphql request.\n */\nexport const graphqlRequestBody = (query: string, variables: Record<string, any> = {}) =>\n HttpBody.json({\n query,\n variables,\n });\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { default as sync$ } from './sync-issues';\n\nexport namespace Linear {\n export const sync = sync$;\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\nimport { Markdown } from '@dxos/plugin-markdown/types';\n\nexport default defineFunction({\n key: 'dxos.org/function/markdown/read-tasks',\n name: 'Read',\n description: 'Read markdown tasks.',\n inputSchema: Schema.Struct({\n id: ArtifactId.annotations({\n description: 'The ID of the document to read.',\n }),\n }),\n outputSchema: Schema.Struct({\n content: Schema.String,\n }),\n handler: Effect.fn(function* ({ data: { id } }) {\n const doc = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Markdown.Document);\n\n // Return content with line numbers prefixed.\n const { content } = yield* DatabaseService.load(doc.content);\n const lines = content.split('\\n');\n const len = String(lines.length).length;\n const numbered = lines.map((line, i) => `${String(i + 1).padStart(len, ' ')}. ${line}`).join('\\n');\n return { content: numbered };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Effect from 'effect/Effect';\nimport * as Schema from 'effect/Schema';\n\nimport { ArtifactId } from '@dxos/assistant';\nimport { DatabaseService, defineFunction } from '@dxos/functions';\nimport { Markdown } from '@dxos/plugin-markdown/types';\n\nimport { MarkdownTasks, type TaskOperation } from './task-list';\n\nexport default defineFunction({\n key: 'dxos.org/function/markdown/update-tasks',\n name: 'Update markdown',\n description: 'Creates and updates tasks in markdown documents.',\n inputSchema: Schema.Struct({\n id: ArtifactId.annotations({\n description: 'The ID of the document to update.',\n }),\n operations: Schema.optional(\n Schema.Array(\n Schema.Any.annotations({\n description: 'Task operations to apply.',\n }),\n ),\n ),\n }),\n outputSchema: Schema.Struct({\n content: Schema.String,\n numberedContent: Schema.String.annotations({\n description: 'Content with line numbers for agent reference.',\n }),\n }),\n handler: Effect.fn(function* ({ data: { id, operations = [] } }) {\n const doc = yield* DatabaseService.resolve(ArtifactId.toDXN(id), Markdown.Document);\n\n // Create task manager and apply operations if provided.\n const { content } = yield* DatabaseService.load(doc.content);\n const taskManager = new MarkdownTasks(content);\n if (operations.length > 0) {\n taskManager.applyOperations(operations as TaskOperation[]);\n // TODO: Update the document content when database operations are fixed.\n }\n\n return {\n content: taskManager.getRawContent(),\n numberedContent: taskManager.getNumberedContent(),\n };\n }),\n});\n", "//\n// Copyright 2025 DXOS.org\n//\n\n/**\n * Hierarchical Task List Manager.\n *\n * A framework for managing hierarchical task lists where each line is a task.\n * Designed to work with language model agents that receive documents with line numbers.\n */\nexport class MarkdownTasks {\n private _lineEndings: string;\n private _content: string[];\n\n constructor(initialContent: string = '') {\n // Detect line endings.\n this._lineEndings = initialContent.includes('\\r\\n') ? '\\r\\n' : '\\n';\n this._content = initialContent ? initialContent.split(this._lineEndings) : [];\n }\n\n /**\n * Get the current document content with line numbers prefixed.\n */\n getNumberedContent(): string {\n return this._content\n .map((line, index) => `${(index + 1).toString().padStart(3, ' ')}→${line}`)\n .join(this._lineEndings);\n }\n\n /**\n * Get the raw document content without line numbers.\n */\n getRawContent(): string {\n return this._content.join(this._lineEndings);\n }\n\n /**\n * Insert a new task at the specified line number (1-based).\n * Indentation level determines hierarchy (0, 2, 4, 6 spaces etc.)\n */\n insertTask(lineNumber: number, taskText: string, completed: boolean = false, indent: number = 0): void {\n const indentStr = ' '.repeat(indent);\n const taskLine = completed ? `${indentStr}- [x] ${taskText}` : `${indentStr}- [ ] ${taskText}`;\n const insertIndex = Math.max(0, Math.min(lineNumber - 1, this._content.length));\n this._content.splice(insertIndex, 0, taskLine);\n }\n\n /**\n * Delete a task at the specified line number (1-based).\n */\n deleteTask(lineNumber: number): boolean {\n if (lineNumber < 1 || lineNumber > this._content.length) {\n return false;\n }\n this._content.splice(lineNumber - 1, 1);\n return true;\n }\n\n /**\n * Update the text of a task at the specified line number (1-based).\n */\n updateTaskText(lineNumber: number, newText: string): boolean {\n if (lineNumber < 1 || lineNumber > this._content.length) {\n return false;\n }\n\n const currentLine = this._content[lineNumber - 1];\n const taskMatch = currentLine.match(/^(\\s*- \\[[x ]\\] )(.*)$/);\n\n if (taskMatch) {\n this._content[lineNumber - 1] = `${taskMatch[1]}${newText}`;\n return true;\n }\n return false;\n }\n\n /**\n * Mark a task as complete or incomplete at the specified line number (1-based).\n */\n toggleTaskCompletion(lineNumber: number, completed?: boolean): boolean {\n if (lineNumber < 1 || lineNumber > this._content.length) {\n return false;\n }\n\n const currentLine = this._content[lineNumber - 1];\n const taskMatch = currentLine.match(/^(\\s*- \\[)([x ])(.*)$/);\n if (taskMatch) {\n const isCurrentlyComplete = taskMatch[2] === 'x';\n const newStatus = completed !== undefined ? completed : !isCurrentlyComplete;\n const statusChar = newStatus ? 'x' : ' ';\n this._content[lineNumber - 1] = `${taskMatch[1]}${statusChar}${taskMatch[3]}`;\n return true;\n }\n\n return false;\n }\n\n /**\n * Change the indentation level of a task (for hierarchy).\n */\n setTaskIndent(lineNumber: number, indent: number): boolean {\n if (lineNumber < 1 || lineNumber > this._content.length) {\n return false;\n }\n\n const currentLine = this._content[lineNumber - 1];\n const taskMatch = currentLine.match(/^\\s*- (\\[[x ]\\] .*)$/);\n if (taskMatch) {\n const indentStr = ' '.repeat(indent);\n this._content[lineNumber - 1] = `${indentStr}- ${taskMatch[1]}`;\n return true;\n }\n\n return false;\n }\n\n /**\n * Get the total number of lines in the document.\n */\n getLineCount(): number {\n return this._content.length;\n }\n\n /**\n * Apply multiple operations atomically.\n */\n applyOperations(operations: TaskOperation[]): void {\n // Sort operations by line number in descending order to avoid index shifts.\n const sortedOps = [...operations].sort((a, b) => {\n const aLine = 'lineNumber' in a ? a.lineNumber : 0;\n const bLine = 'lineNumber' in b ? b.lineNumber : 0;\n return bLine - aLine;\n });\n\n for (const op of sortedOps) {\n switch (op.type) {\n case 'insertTask':\n this.insertTask(op.lineNumber, op.text, op.completed, op.indent);\n break;\n case 'deleteTask':\n this.deleteTask(op.lineNumber);\n break;\n case 'updateTaskText':\n this.updateTaskText(op.lineNumber, op.text);\n break;\n case 'toggleTaskCompletion':\n this.toggleTaskCompletion(op.lineNumber, op.completed);\n break;\n case 'setTaskIndent':\n this.setTaskIndent(op.lineNumber, op.indent);\n break;\n }\n }\n }\n}\n\n/**\n * Operation types for batch task updates.\n */\nexport type TaskOperation =\n | { type: 'insertTask'; lineNumber: number; text: string; completed?: boolean; indent?: number }\n | { type: 'deleteTask'; lineNumber: number }\n | { type: 'updateTaskText'; lineNumber: number; text: string }\n | { type: 'toggleTaskCompletion'; lineNumber: number; completed?: boolean }\n | { type: 'setTaskIndent'; lineNumber: number; indent: number };\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { default as read$ } from './read';\nimport { default as update$ } from './update';\n\nexport namespace Tasks {\n export const read = read$;\n export const update = update$;\n}\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport blueprint from './design-blueprint';\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ToolId } from '@dxos/ai';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Obj, Ref } from '@dxos/echo';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { Discord } from '../../functions';\n\n/**\n * Agent prompt instructions for managing hierarchical task lists.\n */\nconst instructions = trim`\n You are able to fetch messages from Discord servers.\n\n Known servers:\n\n DXOS serverId: 837138313172353095\n`;\n\nexport const blueprint = Obj.make(Blueprint.Blueprint, {\n key: 'dxos.org/blueprint/discord',\n name: 'Discord',\n description: 'Discord integration.',\n instructions: {\n source: Ref.make(DataType.makeText(instructions)),\n },\n tools: [ToolId.make(Discord.fetch.key)],\n});\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport blueprint from './discord-blueprint';\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ToolId } from '@dxos/ai';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Obj, Ref } from '@dxos/echo';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { Linear } from '../../functions';\n\n/**\n * Agent prompt instructions for managing hierarchical task lists.\n */\nconst instructions = trim`\n You are able to sync Linear workspaces.\n Sometimes sync does not complete in one go and you need to call the function again.\n\n Known workspaces:\n\n DXOS teamId: 1127c63a-6f77-4725-9229-50f6cd47321c\n`;\n\nexport const blueprint = Obj.make(Blueprint.Blueprint, {\n key: 'dxos.org/blueprint/linear',\n name: 'Linear',\n description: 'Syncs Linear workspaces.',\n instructions: {\n source: Ref.make(DataType.makeText(instructions)),\n },\n tools: [Linear.sync].map((tool) => ToolId.make(tool.key)),\n});\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport blueprint from './linear-blueprint';\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ToolId } from '@dxos/ai';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Obj, Ref } from '@dxos/echo';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { Tasks } from '../../functions';\n\n/**\n * Agent prompt instructions for managing hierarchical task lists.\n */\nconst instructions = trim`\n You are a task management agent that maintains hierarchical task lists where each line is a task.\n\n ## Document Format\n You will receive task lists with line numbers prefixed like:\n \n ${'```'}\n 1. - [ ] First main task\n 2. - [ ] Subtask 1: Research phase\n 3. - [x] Literature review\n 4. - [ ] Stakeholder interviews\n 5. - [ ] Subtask 2: Implementation\n 6. - [ ] Setup infrastructure\n 7. - [ ] Write core functionality\n 8. - [ ] Another main task\n ${'```'}\n\n ## Task Hierarchy\n - 0 spaces: Top-level tasks\n - 2 spaces: First-level subtasks\n - 4 spaces: Second-level subtasks\n - 6 spaces: Third-level subtasks (and so on)\n\n ## Available Operations\n You can modify the task list using these operations:\n\n 1. **insertTask(lineNumber, text, completed?, indent?)** - Insert a new task\n 2. **deleteTask(lineNumber)** - Delete a task\n 3. **updateTaskText(lineNumber, text)** - Change task description\n 4. **toggleTaskCompletion(lineNumber, completed?)** - Mark task complete/incomplete\n 5. **setTaskIndent(lineNumber, indent)** - Change task hierarchy level\n\n ## Examples\n\n ### Example 1: Adding a subtask\n **User:** \"Add a subtask 'Code review' under the task on line 1\"\n **Response:** \\`insertTask(2, \"Code review\", false, 2)\\`\n\n ### Example 2: Marking a task complete\n **User:** \"Mark the task on line 3 as complete\"\n **Response:** \\`toggleTaskCompletion(3, true)\\`\n\n ### Example 3: Updating task text\n **User:** \"Change the task on line 5 to 'Backend implementation'\"\n **Response:** \\`updateTaskText(5, \"Backend implementation\")\\`\n\n ### Example 4: Creating a task hierarchy\n **User:** \"Add a main task 'Testing phase' with two subtasks\"\n **Response:**\n \\`\\`\\`\n insertTask(999, \"Testing phase\", false, 0)\n insertTask(999, \"Unit tests\", false, 2)\n insertTask(999, \"Integration tests\", false, 2)\n \\`\\`\\`\n\n ### Example 5: Reorganizing hierarchy\n **User:** \"Move the task on line 4 to be a main task (top level)\"\n **Response:** \\`setTaskIndent(4, 0)\\`\n\n ### Example 6: Adding nested subtasks\n **User:** \"Add a sub-subtask 'Write test cases' under line 6\"\n **Response:** \\`insertTask(7, \"Write test cases\", false, 4)\\`\n\n ## Guidelines\n - Always reference line numbers from the numbered document you receive\n - Use line number 999 to append to the end of the document\n - Maintain logical hierarchy (subtasks should be indented under their parent)\n - Use appropriate indentation levels (0, 2, 4, 6, etc. spaces)\n - When creating subtasks, consider the parent task's completion status\n - Be precise with task descriptions and hierarchy levels\n`;\n\nexport const blueprint: Blueprint.Blueprint = Obj.make(Blueprint.Blueprint, {\n key: 'dxos.org/blueprint/planning',\n name: 'Planning',\n description: 'Plans and tracks complex tasks with artifact management.',\n instructions: {\n source: Ref.make(DataType.makeText(instructions)),\n },\n tools: [Tasks.read, Tasks.update].map((fn) => ToolId.make(fn.key)),\n});\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport blueprint from './planning-blueprint';\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ToolId } from '@dxos/ai';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Obj, Ref } from '@dxos/echo';\nimport { DataType } from '@dxos/schema';\nimport { trim } from '@dxos/util';\n\nimport { Research } from '../../functions';\n\n/**\n * Agent prompt instructions for managing hierarchical task lists.\n */\nconst instructions = trim`\n {{! Research }}\n\n You are an analyst that does research tasks using tools that scrape the web and create structured data.\n The result of the research is a set of structured entities forming an interconnected graph.\n When you are done, reply with the created objects.\n Do not print the data, instead reply with inline references to the created objects.\n Those will be later substituted with the pills representing the created objects.\n Print the rest of the created objects as block references after the main note.\n\n <example>\n Based on my research, Google was founded by @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M and @dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ\n\n <object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK464FSCKVQJAB2H662M</dxn></object>\n <object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW9H2ZQ</dxn></object>\n <object><dxn>dxn:queue:data:B6INSIBY3CBEF4M5VZRYBCMAHQMPYK5AJ:01K24XMVHSZHS97SG1VTVQDM5Z:01K24XPK46K31DDW62PBW92333</dxn></object>\n </example>\n`;\n\nexport const blueprint: Blueprint.Blueprint = Obj.make(Blueprint.Blueprint, {\n key: 'dxos.org/blueprint/research',\n name: 'Research',\n description: 'Researches the web and creates structured data.',\n instructions: {\n source: Ref.make(DataType.makeText(instructions)),\n },\n tools: [Research.create, Research.research].map((fn) => ToolId.make(fn.key)),\n});\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport blueprint from './research-blueprint';\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport { ToolId } from '@dxos/ai';\nimport { Blueprint } from '@dxos/blueprints';\nimport { Obj, Ref } from '@dxos/echo';\nimport { DataType } from '@dxos/schema';\n\nconst blueprint: Blueprint.Blueprint = Obj.make(Blueprint.Blueprint, {\n key: 'dxos.org/blueprint/web-search',\n name: 'Web Search',\n description: 'Search the web.',\n instructions: {\n source: Ref.make(DataType.makeText('')), // No instructions required.\n },\n tools: [ToolId.make('AnthropicWebSearch')],\n});\n\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Toolkit from '@effect/ai/Toolkit';\nimport * as AnthropicTool from '@effect/ai-anthropic/AnthropicTool';\n\nexport const WebSearchToolkit = Toolkit.make(AnthropicTool.WebSearch_20250305({}));\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport blueprint from './websearch-blueprint';\n\nexport { WebSearchToolkit } from './websearch-toolkit';\nexport default blueprint;\n", "//\n// Copyright 2025 DXOS.org\n//\n\nimport * as Schema from 'effect/Schema';\nimport React from 'react';\n\nimport { type AnyCapability, Capabilities, contributes, createSurface } from '@dxos/app-framework';\nimport { type Obj, Type } from '@dxos/echo';\nimport { JsonFilter } from '@dxos/react-ui-syntax-highlighter';\n\nexport const MapSchema = Schema.Struct({\n coordinates: Type.Format.GeoPoint,\n}).pipe(\n Type.Obj({\n typename: 'example.com/type/Map',\n version: '0.1.0',\n }),\n);\n\nexport type MapSchema = Schema.Schema.Type<typeof MapSchema>;\n\n// TODO(burdon): Move to ECHO def.\nexport type ArtifactsContext = {\n items: Obj.Any[];\n getArtifacts: () => Obj.Any[];\n addArtifact: (artifact: Obj.Any) => void;\n};\n\ndeclare global {\n interface ToolContextExtensions {\n artifacts?: ArtifactsContext;\n }\n}\n\n// TODO(dmaretskyi): Removed images from conductor GPT implementation.\nconst isImage = (data: any): data is any => false;\n\nexport const capabilities: AnyCapability[] = [\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: 'plugin-image',\n role: 'card--extrinsic',\n filter: (data: any): data is any => isImage(data.value),\n component: ({ data }) => (\n <img\n className='grow object-cover'\n src={`data:image/jpeg;base64,${data.value.source.data}`}\n alt={data.value.prompt ?? `Generated image [id=${data.value.id}]`}\n />\n ),\n }),\n ),\n\n //\n // Default\n //\n contributes(\n Capabilities.ReactSurface,\n createSurface({\n id: 'plugin-default',\n role: 'card--extrinsic',\n position: 'fallback',\n component: ({ role, data }) => <JsonFilter data={data} />,\n }),\n ),\n];\n"],
|
|
5
|
+
"mappings": ";;;AAIA,SAASA,cAAc;AACvB,SAASC,iBAAiB;AAC1B,SAASC,OAAAA,MAAKC,OAAAA,YAAW;AACzB,SAASC,YAAAA,iBAAgB;AACzB,SAASC,QAAAA,aAAY;;;ACJrB,YAAYC,YAAW;AACvB,YAAYC,YAAY;AACxB,YAAYC,cAAc;AAC1B,YAAYC,YAAY;AACxB,YAAYC,YAAY;AAExB,SAASC,WAAWC,gBAAgBC,iBAAiB;AACrD,SAASC,WAAWC,oBAAoBC,qBAAqB;AAC7D,SAASC,QAAQC,gBAAg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ACxB,YAAYC,aAAY;AAExB,SAASC,kBAAAA,uBAAsB;;;ACH/B,IAAA,mCAAe;EACbC,WAAW;EACXC,kBAAkB;EAClBC,UAAU;EACVC,oBAAoB;EACpBC,SAAS;IACP;MACEC,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;IACR;IACA;MACEN,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SACE;IACJ;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MACNC,OAAO;MACPC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SAAS;IACX;;EAEFC,aAAa;IACXC,OAAO;IACPC,QAAQ;MACNC,QAAQ;IACV;IACAC,UAAU;MACRP,MAAM;IACR;EACF;AACF;;;AC9HA,IAAA,mCAAe;EACbQ,WAAW;EACXC,kBAAkB;EAClBC,oBAAoB;EACpBC,SAAS;IACP;MACEC,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OAAO;MACPC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRE,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;IACA;MACER,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,OACE;MACFC,SAAS;IACX;;EAEFC,aAAa;IACXC,OAAO;IACPC,QAAQ;MACNC,QAAQ;IACV;IACAC,UAAU;MACRP,MAAM;IACR;EACF;AACF;;;AC3IA,IAAA,mCAAe;EACbQ,WAAW;EACXC,kBAAkB;EAClBC,UAAU;EACVC,oBAAoB;EACpBC,SAAS;IACP;MACEC,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,SAAS;IACX;IACA;MACEP,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNC,SAAS;IACX;IACA;MACEP,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;IACR;IACA;MACEN,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNE,OAAO;MACPD,SAAS;IACX;IACA;MACEP,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNE,OACE;MACFD,SAAS;IACX;IACA;MACEP,IAAI;MACJC,OAAO;MACPC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO;MACPC,MAAM;MACNE,OAAO;MACPD,SAAS;IACX;IACA;MACEP,IAAI;MACJC,OACE;MACFC,KAAK;MACLC,eAAe;MACfC,QAAQ;MACRC,OAAO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MAAMO,UAAU,uBAAuBhB,KAAKS,MAAMH,EAAE;;EAGpE,CAAA,CAAA;;;;EAMFJ,YACEC,aAAaC,cACbC,cAAc;IACZC,IAAI;IACJC,MAAM;IACNU,UAAU;IACVP,WAAW,CAAC,EAAEH,MAAMP,KAAI,MAAO,sBAAA,cAACkB,YAAAA;MAAWlB;;EAC7C,CAAA,CAAA;;",
|
|
6
|
+
"names": ["ToolId", "Blueprint", "Obj", "Ref", "DataType", "trim", "Array", "Effect", "Function", "Option", "Schema", "AiService", "ConsolePrinter", "ModelName", "AiSession", "GenerationObserver", "createToolkit", "Prompt", "Template", "Obj", "Ref", "Type", "DatabaseService", "TracingService", "defineFunction", "log", "DEFAULT_MODEL", "key", "name", "description", "inputSchema", "Struct", "prompt", "systemPrompt", "pipe", "optional", "model", "input", "Record", "String", "value", "Any", "outputSchema", "handler", "fnUntraced", "data", "info", "Object", "keys", "isRef", "object", "load", "toJSON", "JSON", "stringify", "flush", "indexes", "undefined", "emitStatus", "message", "id", "blueprints", "appendAll", "forEach", "loadOption", "map", "filter", "isSome", "option", "objects", "context", "toolkit", "promptInstructions", "instructions", "source", "promptText", "process", "content", "systemInstructions", "systemText", "session", "result", "run", "system", "observer", "fromPrinter", "tag", "provide", "lastBlock", "at", "blocks", "block", "_tag", "note", "text", "Agent", "prompt", "prompt$", "FetchHttpClient", "DiscordConfig", "DiscordREST", "DiscordRESTMemoryLive", "Array", "Effect", "Function", "Layer", "Option", "Schema", "Obj", "CredentialsService", "TracingService", "defineFunction", "log", "DataType", "TimeRange", "String", "pipe", "pattern", "annotations", "description", "examples", "toSeconds", "timeRange", "match", "Error", "_", "amount", "unit", "Number", "DiscordConfigFromCredential", "unwrapEffect", "gen", "layer", "token", "getApiKey", "service", "rest", "baseUrl", "DEFAULT_AFTER", "DEFAULT_LIMIT", "DEFAULT_IGNORE_USERNAMES", "key", "name", "inputSchema", "Struct", "serverId", "channelId", "optional", "after", "last", "limit", "pageSize", "ignoreUsernames", "handler", "fnUntraced", "data", "afterTs", "Date", "now", "channels", "push", "listGuildChannels", "threads", "guildThreads", "getActiveGuildThreads", "filter", "channel", "id", "length", "console", "undefined", "emitStatus", "message", "forEach", "allMessages", "lastMessage", "none", "lastId", "map", "getKeys", "flatMap", "fromIterable", "getOrElse", "options", "generateSnowflake", "info", "afterSnowflake", "parseSnowflake", "messages", "listMessages", "makeMessage", "reverse", "catchTag", "err", "cause", "code", "succeed", "fail", "fromNullable", "at", "discordChannelId", "sender", "includes", "blocks", "some", "block", "_tag", "text", "trim", "concurrency", "thread", "serializeThread", "join", "provide", "provideMerge", "orDie", "unixTimestamp", "discordEpoch", "BigInt", "snowflake", "make", "Message", "Meta", "keys", "source", "channel_id", "author", "username", "created", "timestamp", "content", "Discord", "fetch", "fetch$", "Effect", "Schema", "ArtifactId", "DatabaseService", "defineFunction", "Markdown", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "id", "ArtifactId", "annotations", "outputSchema", "content", "String", "handler", "fn", "data", "doc", "DatabaseService", "resolve", "toDXN", "Markdown", "Document", "load", "Effect", "Schema", "ArtifactId", "DatabaseService", "defineFunction", "Markdown", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "id", "ArtifactId", "annotations", "content", "String", "outputSchema", "Void", "handler", "fn", "data", "doc", "DatabaseService", "resolve", "toDXN", "Markdown", "Document", "text", "load", "Document", "read", "read$", "update", "update$", "Toolkit", "Effect", "Layer", "Predicate", "Schema", "AiService", "AiSession", "makeToolExecutionServiceFromFunctions", "makeToolResolverFromFunctions", "Filter", "Obj", "Ref", "DatabaseService", "FunctionInvocationService", "defineFunction", "log", "DataType", "trim", "Effect", "Schema", "Relation", "DatabaseService", "TracingService", "defineFunction", "invariant", "DXN", "ObjectId", "log", "Markdown", "DataType", "trim", "key", "name", "description", "inputSchema", "Struct", "String", "annotations", "content", "target", "outputSchema", "handler", "fnUntraced", "data", "info", "flush", "indexes", "emitStatus", "message", "isValid", "targetObj", "resolve", "fromLocalObjectId", "doc", "add", "makeDocument", "make", "HasSubject", "Source", "Target", "completedAt", "Date", "toISOString", "Toolkit", "AnthropicTool", "Array", "Effect", "Layer", "Schema", "AiService", "ConsolePrinter", "AiSession", "GenerationObserver", "createToolkit", "makeToolExecutionServiceFromFunctions", "makeToolResolverFromFunctions", "Obj", "DatabaseService", "FunctionInvocationService", "TracingService", "defineFunction", "DataType", "trim", "Effect", "Schema", "Exa", "CredentialsService", "defineFunction", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "query", "String", "annotations", "outputSchema", "Unknown", "handler", "fnUntraced", "data", "credential", "CredentialsService", "getCredential", "service", "exa", "Exa", "apiKey", "context", "promise", "searchAndContents", "type", "text", "maxCharacters", "livecrawl", "Effect", "Schema", "defineFunction", "requestId", "autopromptString", "autoDate", "resolvedSearchType", "results", "id", "title", "url", "publishedDate", "author", "score", "text", "image", "favicon", "costDollars", "total", "search", "neural", "contents", "requestId", "autopromptString", "resolvedSearchType", "results", "id", "title", "url", "publishedDate", "author", "score", "text", "image", "favicon", "costDollars", "total", "search", "neural", "contents", "requestId", "autopromptString", "autoDate", "resolvedSearchType", "results", "id", "title", "url", "publishedDate", "author", "score", "text", "favicon", "image", "costDollars", "total", "search", "neural", "contents", "SEARCH_RESULTS", "Search1", "Search2", "Search3", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "query", "String", "annotations", "outputSchema", "Unknown", "handler", "fnUntraced", "data", "result", "SEARCH_RESULTS", "reduce", "closest", "current", "autopromptString", "dist1", "levenshteinDistance", "dist2", "weight1", "Math", "max", "length", "weight2", "str1", "str2", "m", "n", "dp", "Array", "fill", "map", "i", "j", "min", "Tool", "Toolkit", "Context", "Effect", "Function", "Option", "Schema", "SchemaAST", "Obj", "Filter", "Query", "EntityKind", "ObjectId", "ReferenceAnnotationId", "RelationSourceDXNId", "RelationSourceId", "RelationTargetDXNId", "RelationTargetId", "create", "getEntityKind", "getSchemaDXN", "getSchemaTypename", "getTypeAnnotation", "getTypeIdentifierAnnotation", "isEncodedReference", "mapAst", "ContextQueueService", "DatabaseService", "DXN", "log", "deepMapValues", "isNonNullable", "trim", "Subgraph", "Struct", "objects", "Array", "Any", "findRelatedSchema", "db", "anchor", "allSchemas", "graph", "schemaRegistry", "schemas", "filter", "schema", "kind", "Relation", "isSchemaAddressableByDxn", "parse", "sourceSchema", "targetSchema", "map", "dxn", "toString", "t", "asTypeDXN", "type", "LocalSearchToolkit", "make", "description", "parameters", "query", "String", "annotations", "success", "Unknown", "failure", "Never", "dependencies", "LocalSearchHandler", "toLayer", "search_local_search", "fn", "runQuery", "select", "text", "results", "option", "serviceOption", "isSome", "queueObjects", "promise", "value", "queue", "queryObjects", "push", "JSON", "stringify", "GraphWriterSchema", "Tag", "makeGraphWriterToolkit", "createExtractionSchema", "fields", "annotateContext", "makeGraphWriterHandler", "toolkit", "onAppend", "get", "tools", "graph_writer", "input", "data", "sanitizeObjects", "append", "dxns", "obj", "getDXN", "types", "Object", "fromEntries", "preprocessSchema", "index", "getSanitizedSchemaName", "optional", "getDescriptionAnnotation", "ast", "pipe", "getOrElse", "replaceAll", "entries", "object", "flat", "idMap", "Map", "existingIds", "Set", "enitties", "resolveId", "id", "isValid", "add", "fromLocalObjectId", "mappedId", "undefined", "res", "entry", "set", "random", "recurse", "ref", "encodeURIComponent", "sourceDxn", "source", "warn", "targetDxn", "target", "has", "dbObjects", "ids", "run", "getObjectsById", "info", "missing", "from", "some", "length", "Error", "join", "flatMap", "skip", "asEchoDXN", "echoId", "find", "SoftRef", "isRelationSchema", "go", "visited", "getAnnotation", "child", "omit", "extend", "identity", "Effect", "Layer", "Schema", "Obj", "Query", "Ref", "Type", "Queue", "ContextQueueService", "DatabaseService", "QueueService", "ResearchGraph", "Struct", "queue", "Type", "Ref", "Queue", "pipe", "Obj", "typename", "version", "queryResearchGraph", "fn", "objects", "DatabaseService", "runQuery", "Query", "type", "at", "createResearchGraph", "QueueService", "createQueue", "add", "make", "fromDXN", "dxn", "contextQueueLayerFromResearchGraph", "unwrapEffect", "gen", "researchGraph", "researchQueue", "load", "ContextQueueService", "layer", "DataType", "ResearchDataTypes", "DataType", "Event", "LegacyOrganization", "LegacyPerson", "Project", "Task", "Text", "HasRelationship", "HasConnection", "defineFunction", "key", "name", "description", "trim", "inputSchema", "Struct", "query", "String", "annotations", "researchInstructions", "optional", "mockSearch", "Boolean", "default", "outputSchema", "note", "objects", "Array", "Unknown", "handler", "fnUntraced", "data", "mockPerson", "DatabaseService", "add", "Obj", "make", "DataType", "Person", "preferredName", "emails", "value", "phoneNumbers", "getDXN", "toJSON", "flush", "indexes", "TracingService", "emitStatus", "message", "objectDXNs", "GraphWriterToolkit", "makeGraphWriterToolkit", "schema", "ResearchDataTypes", "GraphWriterHandler", "makeGraphWriterHandler", "onAppend", "dxns", "push", "NativeWebSearch", "WebSearch_20250305", "toolkit", "createToolkit", "merge", "LocalSearchToolkit", "pipe", "provide", "mergeAll", "LocalSearchHandler", "contextQueueLayerFromResearchGraph", "session", "AiSession", "result", "run", "prompt", "system", "PROMPT", "observer", "GenerationObserver", "fromPrinter", "ConsolePrinter", "tag", "at", "blocks", "filter", "block", "_tag", "text", "forEach", "dxn", "resolve", "map", "obj", "AiService", "model", "makeToolResolverFromFunctions", "exaFunction", "exaMockFunction", "makeToolExecutionServiceFromFunctions", "empty", "FunctionInvocationService", "layerTestMocked", "functions", "Research", "create", "create$", "research", "research$", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "source", "DataType", "Message", "annotations", "instructions", "optional", "String", "outputSchema", "entities", "Array", "Obj", "Any", "handler", "fnUntraced", "data", "contact", "extractContact", "organization", "created", "GraphWriterToolkit", "makeGraphWriterToolkit", "schema", "LegacyOrganization", "pipe", "GraphWriterHandler", "makeGraphWriterHandler", "onAppend", "dxns", "push", "toolkit", "provide", "contextQueueLayerFromResearchGraph", "AiSession", "run", "system", "trim", "prompt", "JSON", "stringify", "length", "Error", "DatabaseService", "resolve", "Organization", "getMeta", "tags", "Ref", "make", "filter", "isNotNullable", "mergeAll", "AiService", "model", "makeToolResolverFromFunctions", "makeToolExecutionServiceFromFunctions", "empty", "FunctionInvocationService", "layerTest", "fn", "message", "sender", "email", "log", "warn", "undefined", "objects", "existingContacts", "runQuery", "Filter", "type", "Person", "existingContact", "find", "emails", "some", "contactEmail", "value", "info", "newContact", "Meta", "add", "fullName", "emailDomain", "split", "toLowerCase", "existingOrganisations", "matchingOrg", "org", "website", "websiteUrl", "startsWith", "websiteDomain", "URL", "hostname", "endsWith", "e", "error", "EntityExtraction", "extract", "extract$", "FetchHttpClient", "HttpClient", "Array", "Effect", "Function", "Schema", "Filter", "Obj", "Query", "Ref", "DatabaseService", "defineFunction", "withAuthorization", "log", "DataType", "Effect", "Filter", "Obj", "Query", "Ref", "DatabaseService", "failedInvariant", "log", "syncObjects", "fn", "objs", "foreignKeyId", "forEach", "fnUntraced", "obj", "key", "Object", "keys", "isRef", "ref", "target", "getDXN", "isLocalObjectId", "make", "schema", "getSchema", "foreignId", "getKeys", "id", "objects", "existing", "runQuery", "select", "foreignKeys", "source", "type", "getTypename", "undefined", "add", "copyObjectData", "concurrency", "newObj", "foreignKey", "getMeta", "deleteKeys", "push", "HttpBody", "graphqlRequestBody", "query", "variables", "json", "queryIssues", "LINEAR_ID_KEY", "LINEAR_TEAM_ID_KEY", "LINEAR_UPDATED_AT_KEY", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "team", "String", "annotations", "handler", "fnUntraced", "data", "client", "HttpClient", "pipe", "map", "withAuthorization", "service", "after", "getLatestUpdateTimestamp", "DataType", "Task", "log", "info", "response", "post", "body", "graphqlRequestBody", "teamId", "json", "tasks", "issues", "edges", "edge", "mapLinearIssue", "node", "count", "length", "objects", "syncObjects", "foreignKeyId", "syncComplete", "provide", "layer", "dataType", "existingTasks", "DatabaseService", "runQuery", "Query", "type", "select", "Filter", "foreignKeys", "source", "id", "task", "Obj", "getKeys", "at", "filter", "x", "undefined", "reduce", "acc", "mapLinearPerson", "person", "make", "Person", "Meta", "keys", "nickname", "issue", "updatedAt", "title", "assigned", "assignee", "Ref", "project", "makeProject", "Linear", "sync", "sync$", "Effect", "Schema", "ArtifactId", "DatabaseService", "defineFunction", "Markdown", "read_default", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "id", "ArtifactId", "annotations", "outputSchema", "content", "String", "handler", "fn", "data", "doc", "DatabaseService", "resolve", "toDXN", "Markdown", "Document", "load", "lines", "split", "len", "length", "numbered", "map", "line", "i", "padStart", "join", "Effect", "Schema", "ArtifactId", "DatabaseService", "defineFunction", "Markdown", "MarkdownTasks", "_lineEndings", "_content", "initialContent", "includes", "split", "getNumberedContent", "map", "line", "index", "toString", "padStart", "join", "getRawContent", "insertTask", "lineNumber", "taskText", "completed", "indent", "indentStr", "repeat", "taskLine", "insertIndex", "Math", "max", "min", "length", "splice", "deleteTask", "updateTaskText", "newText", "currentLine", "taskMatch", "match", "toggleTaskCompletion", "isCurrentlyComplete", "newStatus", "undefined", "statusChar", "setTaskIndent", "getLineCount", "applyOperations", "operations", "sortedOps", "sort", "a", "b", "aLine", "bLine", "op", "type", "text", "update_default", "defineFunction", "key", "name", "description", "inputSchema", "Struct", "id", "ArtifactId", "annotations", "operations", "optional", "Array", "Any", "outputSchema", "content", "String", "numberedContent", "handler", "fn", "data", "doc", "DatabaseService", "resolve", "toDXN", "Markdown", "Document", "load", "taskManager", "MarkdownTasks", "length", "applyOperations", "getRawContent", "getNumberedContent", "Tasks", "read", "read$", "update", "update$", "instructions", "trim", "blueprint", "Obj", "make", "Blueprint", "key", "name", "description", "source", "Ref", "DataType", "makeText", "tools", "Document", "read", "update", "map", "fn", "ToolId", "blueprint", "ToolId", "Blueprint", "Obj", "Ref", "DataType", "trim", "instructions", "trim", "blueprint", "Obj", "make", "Blueprint", "key", "name", "description", "source", "Ref", "DataType", "makeText", "tools", "ToolId", "Discord", "fetch", "blueprint", "ToolId", "Blueprint", "Obj", "Ref", "DataType", "trim", "instructions", "trim", "blueprint", "Obj", "make", "Blueprint", "key", "name", "description", "source", "Ref", "DataType", "makeText", "tools", "Linear", "sync", "map", "tool", "ToolId", "blueprint", "ToolId", "Blueprint", "Obj", "Ref", "DataType", "trim", "instructions", "trim", "blueprint", "Obj", "make", "Blueprint", "key", "name", "description", "source", "Ref", "DataType", "makeText", "tools", "Tasks", "read", "update", "map", "fn", "ToolId", "blueprint", "ToolId", "Blueprint", "Obj", "Ref", "DataType", "trim", "instructions", "trim", "blueprint", "Obj", "make", "Blueprint", "key", "name", "description", "source", "Ref", "DataType", "makeText", "tools", "Research", "create", "research", "map", "fn", "ToolId", "research_default", "blueprint", "ToolId", "Blueprint", "Obj", "Ref", "DataType", "blueprint", "Obj", "make", "Blueprint", "key", "name", "description", "instructions", "source", "Ref", "DataType", "makeText", "tools", "ToolId", "Toolkit", "AnthropicTool", "WebSearchToolkit", "make", "WebSearch_20250305", "blueprint", "Schema", "React", "Capabilities", "contributes", "createSurface", "Type", "JsonFilter", "MapSchema", "Struct", "coordinates", "Type", "Format", "GeoPoint", "pipe", "Obj", "typename", "version", "isImage", "data", "capabilities", "contributes", "Capabilities", "ReactSurface", "createSurface", "id", "role", "filter", "value", "component", "img", "className", "src", "source", "alt", "prompt", "position", "JsonFilter"]
|
|
7
|
+
}
|