mirror of
https://github.com/memohai/Memoh.git
synced 2026-04-27 07:16:19 +09:00
feat: enable memory search tool
This commit is contained in:
@@ -8,6 +8,7 @@ import { getWebTools } from './tools/web'
|
||||
import { subagentSystem } from './prompts/subagent'
|
||||
import { getSubagentTools } from './tools/subagent'
|
||||
import { getSkillTools } from './tools/skill'
|
||||
import { getMemoryTools } from './tools/memory'
|
||||
|
||||
export enum AgentAction {
|
||||
WebSearch = 'web_search',
|
||||
@@ -15,6 +16,7 @@ export enum AgentAction {
|
||||
Subagent = 'subagent',
|
||||
Schedule = 'schedule',
|
||||
Skill = 'skill',
|
||||
Memory = 'memory',
|
||||
}
|
||||
|
||||
export interface AgentParams extends BaseModelConfig {
|
||||
@@ -98,6 +100,11 @@ export const createAgent = (
|
||||
})
|
||||
Object.assign(tools, subagentTools)
|
||||
}
|
||||
|
||||
if (allowedActions.includes(AgentAction.Memory)) {
|
||||
const memoryTools = getMemoryTools({ fetch: fetcher })
|
||||
Object.assign(tools, memoryTools)
|
||||
}
|
||||
|
||||
return tools
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user