Interface: IDatabaseAdapter
Properties
db
db:
any
Defined in
packages/core/src/types.ts:363
Methods
addParticipant()
addParticipant(
userId
,roomId
):Promise
<boolean
>
Parameters
• userId: `${string}-${string}-${string}-${string}-${string}`
• roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<boolean
>
Defined in
packages/core/src/types.ts:445
countMemories()
countMemories(
roomId
,unique
?,tableName
?):Promise
<number
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
• unique?: boolean
• tableName?: string
Returns
Promise
<number
>
Defined in
packages/core/src/types.ts:425
createAccount()
createAccount(
account
):Promise
<boolean
>
Parameters
• account: Account
Returns
Promise
<boolean
>
Defined in
packages/core/src/types.ts:365
createGoal()
createGoal(
goal
):Promise
<void
>
Parameters
• goal: Goal
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:437
createMemory()
createMemory(
memory
,tableName
,unique
?):Promise
<void
>
Parameters
• memory: Memory
• tableName: string
• unique?: boolean
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:418
createRelationship()
createRelationship(
params
):Promise
<boolean
>
Parameters
• params
• params.userA: `${string}-${string}-${string}-${string}-${string}`
• params.userB: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<boolean
>
Defined in
packages/core/src/types.ts:458
createRoom()
createRoom(
roomId
?):Promise
<`${string}-${string}-${string}-${string}-${string}`>
Parameters
• roomId?: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<`${string}-${string}-${string}-${string}-${string}`>
Defined in
packages/core/src/types.ts:441
getAccountById()
getAccountById(
userId
):Promise
<Account
>
Parameters
• userId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Account
>
Defined in
packages/core/src/types.ts:364
getActorDetails()
getActorDetails(
params
):Promise
<Actor
[]>
Parameters
• params
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Actor
[]>
Defined in
packages/core/src/types.ts:394
getCachedEmbeddings()
getCachedEmbeddings(
params
):Promise
<object
[]>
Parameters
• params
• params.query_field_name: string
• params.query_field_sub_name: string
• params.query_input: string
• params.query_match_count: number
• params.query_table_name: string
• params.query_threshold: number
Returns
Promise
<object
[]>
Defined in
packages/core/src/types.ts:380
getGoals()
getGoals(
params
):Promise
<Goal
[]>
Parameters
• params
• params.count?: number
• params.onlyInProgress?: boolean
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.userId?: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Goal
[]>
Defined in
packages/core/src/types.ts:430
getMemories()
getMemories(
params
):Promise
<Memory
[]>
Parameters
• params
• params.agentId?: `${string}-${string}-${string}-${string}-${string}`
• params.count?: number
• params.end?: number
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.start?: number
• params.tableName: string
• params.unique?: boolean
Returns
Promise
<Memory
[]>
Defined in
packages/core/src/types.ts:366
getMemoriesByRoomIds()
getMemoriesByRoomIds(
params
):Promise
<Memory
[]>
Parameters
• params
• params.agentId?: `${string}-${string}-${string}-${string}-${string}`
• params.roomIds: `${string}-${string}-${string}-${string}-${string}`[]
Returns
Promise
<Memory
[]>
Defined in
packages/core/src/types.ts:376
getMemoryById()
getMemoryById(
id
):Promise
<Memory
>
Parameters
• id: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Memory
>
Defined in
packages/core/src/types.ts:375
getParticipantsForAccount()
getParticipantsForAccount(
userId
):Promise
<Participant
[]>
Parameters
• userId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Participant
[]>
Defined in
packages/core/src/types.ts:447
getParticipantsForRoom()
getParticipantsForRoom(
roomId
):Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
Defined in
packages/core/src/types.ts:448
getParticipantUserState()
getParticipantUserState(
roomId
,userId
):Promise
<"FOLLOWED"
|"MUTED"
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
• userId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<"FOLLOWED"
| "MUTED"
>
Defined in
packages/core/src/types.ts:449
getRelationship()
getRelationship(
params
):Promise
<Relationship
>
Parameters
• params
• params.userA: `${string}-${string}-${string}-${string}-${string}`
• params.userB: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Relationship
>
Defined in
packages/core/src/types.ts:459
getRelationships()
getRelationships(
params
):Promise
<Relationship
[]>
Parameters
• params
• params.userId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<Relationship
[]>
Defined in
packages/core/src/types.ts:463
getRoom()
getRoom(
roomId
):Promise
<`${string}-${string}-${string}-${string}-${string}`>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<`${string}-${string}-${string}-${string}-${string}`>
Defined in
packages/core/src/types.ts:440
getRoomsForParticipant()
getRoomsForParticipant(
userId
):Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
Parameters
• userId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
Defined in
packages/core/src/types.ts:443
getRoomsForParticipants()
getRoomsForParticipants(
userIds
):Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
Parameters
• userIds: `${string}-${string}-${string}-${string}-${string}`[]
Returns
Promise
<`${string}-${string}-${string}-${string}-${string}`[]>
Defined in
packages/core/src/types.ts:444
log()
log(
params
):Promise
<void
>
Parameters
• params
• params.body
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.type: string
• params.userId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:388
removeAllGoals()
removeAllGoals(
roomId
):Promise
<void
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:439
removeAllMemories()
removeAllMemories(
roomId
,tableName
):Promise
<void
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
• tableName: string
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:424
removeGoal()
removeGoal(
goalId
):Promise
<void
>
Parameters
• goalId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:438
removeMemory()
removeMemory(
memoryId
,tableName
):Promise
<void
>
Parameters
• memoryId: `${string}-${string}-${string}-${string}-${string}`
• tableName: string
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:423
removeParticipant()
removeParticipant(
userId
,roomId
):Promise
<boolean
>
Parameters
• userId: `${string}-${string}-${string}-${string}-${string}`
• roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<boolean
>
Defined in
packages/core/src/types.ts:446
removeRoom()
removeRoom(
roomId
):Promise
<void
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:442
searchMemories()
searchMemories(
params
):Promise
<Memory
[]>
Parameters
• params
• params.embedding: number
[]
• params.match_count: number
• params.match_threshold: number
• params.roomId: `${string}-${string}-${string}-${string}-${string}`
• params.tableName: string
• params.unique: boolean
Returns
Promise
<Memory
[]>
Defined in
packages/core/src/types.ts:395
searchMemoriesByEmbedding()
searchMemoriesByEmbedding(
embedding
,params
):Promise
<Memory
[]>
Parameters
• embedding: number
[]
• params
• params.agentId?: `${string}-${string}-${string}-${string}-${string}`
• params.count?: number
• params.match_threshold?: number
• params.roomId?: `${string}-${string}-${string}-${string}-${string}`
• params.tableName: string
• params.unique?: boolean
Returns
Promise
<Memory
[]>
Defined in
packages/core/src/types.ts:407
setParticipantUserState()
setParticipantUserState(
roomId
,userId
,state
):Promise
<void
>
Parameters
• roomId: `${string}-${string}-${string}-${string}-${string}`
• userId: `${string}-${string}-${string}-${string}-${string}`
• state: "FOLLOWED"
| "MUTED"
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:453
updateGoal()
updateGoal(
goal
):Promise
<void
>
Parameters
• goal: Goal
Returns
Promise
<void
>
Defined in
packages/core/src/types.ts:436
updateGoalStatus()
updateGoalStatus(
params
):Promise
<void
>
Parameters
• params
• params.goalId: `${string}-${string}-${string}-${string}-${string}`
• params.status: GoalStatus
Returns
Promise
<void
>