Agent store
The methods of the agent store from @intentface/latch-agent-builder, for agents kept in a database, with versions and candidates.
The store behind agents in a database. Create one with createPostgresAgentBuilderStore or createSqliteAgentBuilderStore from @intentface/latch-drizzle, and pass its resolve and list to createRuntime's dynamicAgents.
Agents have a scope: "org" agents are shared by an organization, "user" agents belong to one person. A name can pin a version or candidate: support@7 runs version 7, support@c_… a candidate.
| Option | Type | Default | Details |
|---|---|---|---|
resolve | function | — | |
list | (principal: P) => AgentInfo[] | Promise<AgentInfo[]> | — | |
listRecords | (p: P) => Promise<AgentRecord[]> | — | |
getRecord | (p: P, name: string) => Promise<AgentRecord | undefined> | — | |
upsert | function | — | |
remove | (p: P, scope: AgentScope, name: string) => Promise<void> | — | |
listVersions | function | — | |
getVersion | function | — | |
activateVersion | function | — | |
listActivations | function | — | |
getDraft | function | — | |
saveDraft | function | — | |
discardDraft | (p: P, name: string, scope: AgentScope) => Promise<void> | — | |
listDrafts | (p: P) => Promise<AgentDraftSummary[]> | — | |
listCandidates | function | — | |
getCandidate | function | — | |
saveCandidate | function | — | |
closeCandidate | function | — | |
listMemoryEnabledNames | () => Promise<string[]> | — | |
purgeOwner? | function | — |