@letta-ai/letta-client 0.1.5 → 0.1.7
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/Client.d.ts +3 -0
- package/Client.js +5 -0
- package/api/resources/agents/client/Client.d.ts +14 -106
- package/api/resources/agents/client/Client.js +31 -495
- package/{dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts → api/resources/agents/client/requests/AgentsSearchRequest.d.ts} +3 -3
- package/api/resources/agents/client/requests/index.d.ts +1 -4
- package/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
- package/api/resources/agents/resources/context/client/Client.js +1 -1
- package/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
- package/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
- package/api/resources/agents/resources/index.d.ts +6 -2
- package/api/resources/agents/resources/index.js +7 -3
- package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
- package/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
- package/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
- package/api/resources/agents/resources/memoryVariables/index.js +18 -0
- package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
- package/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
- package/api/resources/agents/resources/memoryVariables/types/index.js +17 -0
- package/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
- package/api/resources/agents/resources/sources/client/Client.js +1 -1
- package/api/resources/agents/resources/templates/client/Client.d.ts +82 -0
- package/{dist/api/resources/agents/resources/memoryBlocks → api/resources/agents/resources/templates}/client/Client.js +126 -45
- package/api/resources/agents/resources/templates/client/index.d.ts +1 -0
- package/api/resources/agents/resources/templates/client/index.js +17 -0
- package/api/resources/agents/{client/requests/AgentsCreateTemplateFromAgentRequest.d.ts → resources/templates/client/requests/TemplatesCreateRequest.d.ts} +1 -1
- package/api/resources/agents/{client/requests/AgentsCreateVersionRequest.d.ts → resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts} +1 -1
- package/api/resources/agents/{client/requests/AgentsMigrateRequest.d.ts → resources/templates/client/requests/TemplatesMigrateRequest.d.ts} +1 -1
- package/api/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
- package/api/resources/agents/resources/templates/index.d.ts +2 -0
- package/api/resources/agents/resources/templates/index.js +18 -0
- package/api/resources/agents/{types/AgentsMigrateResponse.d.ts → resources/templates/types/TemplatesMigrateResponse.d.ts} +1 -1
- package/api/resources/agents/resources/templates/types/index.d.ts +1 -0
- package/api/resources/agents/resources/templates/types/index.js +17 -0
- package/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +8 -0
- package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestCombinator.js} +2 -2
- package/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +16 -0
- package/api/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +8 -0
- package/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +9 -0
- package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemNameOperator.js} +2 -2
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +8 -0
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +8 -0
- package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js → api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
- package/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +8 -0
- package/{dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js → api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js} +2 -2
- package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts → AgentsSearchRequestSearchItemVersion.d.ts} +1 -1
- package/api/resources/agents/types/index.d.ts +8 -10
- package/api/resources/agents/types/index.js +8 -10
- package/api/resources/blocks/client/Client.js +7 -7
- package/api/resources/health/client/Client.js +1 -1
- package/api/resources/index.d.ts +2 -0
- package/api/resources/index.js +3 -1
- package/api/resources/jobs/client/Client.js +4 -4
- package/api/resources/models/client/Client.js +2 -2
- package/api/resources/providers/client/Client.d.ts +86 -0
- package/api/resources/providers/client/Client.js +336 -0
- package/api/resources/providers/client/index.d.ts +1 -0
- package/api/resources/providers/client/index.js +17 -0
- package/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +15 -0
- package/api/resources/providers/client/requests/ListProvidersRequest.d.ts +11 -0
- package/api/resources/providers/client/requests/ProviderCreate.d.ts +16 -0
- package/api/resources/providers/client/requests/ProviderUpdate.d.ts +16 -0
- package/api/resources/providers/client/requests/index.d.ts +4 -0
- package/api/resources/sources/client/Client.js +8 -8
- package/api/resources/sources/resources/files/client/Client.js +3 -3
- package/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/api/resources/tools/client/Client.d.ts +3 -1
- package/api/resources/tools/client/Client.js +15 -13
- package/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
- package/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/api/types/AgentType.d.ts +1 -2
- package/api/types/AgentType.js +0 -1
- package/api/types/LettaSchemasToolTool.d.ts +4 -1
- package/api/types/Provider.d.ts +13 -0
- package/api/types/ToolType.d.ts +9 -0
- package/api/types/ToolType.js +11 -0
- package/api/types/index.d.ts +2 -0
- package/api/types/index.js +2 -0
- package/dist/Client.d.ts +3 -0
- package/dist/Client.js +5 -0
- package/dist/api/resources/agents/client/Client.d.ts +14 -106
- package/dist/api/resources/agents/client/Client.js +31 -495
- package/{api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts → dist/api/resources/agents/client/requests/AgentsSearchRequest.d.ts} +3 -3
- package/dist/api/resources/agents/client/requests/index.d.ts +1 -4
- package/dist/api/resources/agents/resources/archivalMemory/client/Client.js +4 -4
- package/dist/api/resources/agents/resources/context/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/coreMemory/client/Client.d.ts +123 -0
- package/dist/api/resources/agents/resources/coreMemory/client/Client.js +525 -0
- package/dist/api/resources/agents/resources/index.d.ts +6 -2
- package/dist/api/resources/agents/resources/index.js +7 -3
- package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.d.ts +11 -13
- package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/Client.js +15 -25
- package/dist/api/resources/agents/resources/memoryVariables/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/memoryVariables/index.js +18 -0
- package/dist/api/resources/agents/{types/AgentsGetAgentVariablesResponse.d.ts → resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts} +1 -1
- package/dist/api/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/memoryVariables/types/index.js +17 -0
- package/dist/api/resources/agents/resources/messages/client/Client.js +5 -5
- package/dist/api/resources/agents/resources/recallMemory/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/sources/client/Client.js +1 -1
- package/dist/api/resources/agents/resources/templates/client/Client.d.ts +82 -0
- package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/templates}/client/Client.js +126 -45
- package/dist/api/resources/agents/resources/templates/client/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/templates/client/index.js +17 -0
- package/dist/api/resources/agents/{client/requests/AgentsCreateTemplateFromAgentRequest.d.ts → resources/templates/client/requests/TemplatesCreateRequest.d.ts} +1 -1
- package/dist/api/resources/agents/{client/requests/AgentsCreateVersionRequest.d.ts → resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts} +1 -1
- package/dist/api/resources/agents/{client/requests/AgentsMigrateRequest.d.ts → resources/templates/client/requests/TemplatesMigrateRequest.d.ts} +1 -1
- package/dist/api/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
- package/dist/api/resources/agents/resources/templates/client/requests/index.js +2 -0
- package/dist/api/resources/agents/resources/templates/index.d.ts +2 -0
- package/dist/api/resources/agents/resources/templates/index.js +18 -0
- package/dist/api/resources/agents/{types/AgentsMigrateResponse.d.ts → resources/templates/types/TemplatesMigrateResponse.d.ts} +1 -1
- package/dist/api/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +5 -0
- package/dist/api/resources/agents/resources/templates/types/index.d.ts +1 -0
- package/dist/api/resources/agents/resources/templates/types/index.js +17 -0
- package/dist/api/resources/agents/resources/tools/client/Client.js +3 -3
- package/dist/api/resources/agents/types/AgentsSearchRequestCombinator.d.ts +8 -0
- package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestCombinator.js} +2 -2
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +16 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItem.js +5 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemName.js +5 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +9 -0
- package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js → AgentsSearchRequestSearchItemNameOperator.js} +2 -2
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +8 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +5 -0
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +8 -0
- package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +8 -0
- package/{api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js → dist/api/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js} +2 -2
- package/dist/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts → AgentsSearchRequestSearchItemVersion.d.ts} +1 -1
- package/dist/api/resources/agents/types/AgentsSearchRequestSearchItemVersion.js +5 -0
- package/dist/api/resources/agents/types/index.d.ts +8 -10
- package/dist/api/resources/agents/types/index.js +8 -10
- package/dist/api/resources/blocks/client/Client.js +7 -7
- package/dist/api/resources/health/client/Client.js +1 -1
- package/dist/api/resources/index.d.ts +2 -0
- package/dist/api/resources/index.js +3 -1
- package/dist/api/resources/jobs/client/Client.js +4 -4
- package/dist/api/resources/models/client/Client.js +2 -2
- package/dist/api/resources/providers/client/Client.d.ts +86 -0
- package/dist/api/resources/providers/client/Client.js +336 -0
- package/dist/api/resources/providers/client/index.d.ts +1 -0
- package/dist/api/resources/providers/client/index.js +17 -0
- package/dist/api/resources/providers/client/requests/DeleteProviderRequest.d.ts +15 -0
- package/dist/api/resources/providers/client/requests/DeleteProviderRequest.js +5 -0
- package/dist/api/resources/providers/client/requests/ListProvidersRequest.d.ts +11 -0
- package/dist/api/resources/providers/client/requests/ListProvidersRequest.js +5 -0
- package/dist/api/resources/providers/client/requests/ProviderCreate.d.ts +16 -0
- package/dist/api/resources/providers/client/requests/ProviderCreate.js +5 -0
- package/dist/api/resources/providers/client/requests/ProviderUpdate.d.ts +16 -0
- package/dist/api/resources/providers/client/requests/ProviderUpdate.js +5 -0
- package/dist/api/resources/providers/client/requests/index.d.ts +4 -0
- package/dist/api/resources/providers/client/requests/index.js +2 -0
- package/dist/api/resources/sources/client/Client.js +8 -8
- package/dist/api/resources/sources/resources/files/client/Client.js +3 -3
- package/dist/api/resources/sources/resources/passages/client/Client.js +1 -1
- package/dist/api/resources/tools/client/Client.d.ts +3 -1
- package/dist/api/resources/tools/client/Client.js +15 -13
- package/dist/api/resources/tools/client/requests/ToolRunFromSource.d.ts +7 -3
- package/dist/api/resources/tools/client/requests/ToolUpdate.d.ts +2 -0
- package/dist/api/types/AgentType.d.ts +1 -2
- package/dist/api/types/AgentType.js +0 -1
- package/dist/api/types/LettaSchemasToolTool.d.ts +4 -1
- package/dist/api/types/Provider.d.ts +13 -0
- package/dist/api/types/Provider.js +5 -0
- package/dist/api/types/ToolType.d.ts +9 -0
- package/dist/api/types/ToolType.js +11 -0
- package/dist/api/types/index.d.ts +2 -0
- package/dist/api/types/index.js +2 -0
- package/dist/serialization/resources/agents/client/index.d.ts +0 -1
- package/dist/serialization/resources/agents/client/index.js +1 -2
- package/dist/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
- package/{serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → dist/serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
- package/dist/serialization/resources/agents/client/requests/index.d.ts +1 -4
- package/dist/serialization/resources/agents/client/requests/index.js +3 -9
- package/dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
- package/{serialization/resources/agents/client/getAgentMemoryBlocks.js → dist/serialization/resources/agents/resources/coreMemory/client/getBlocks.js} +2 -2
- package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
- package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
- package/dist/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
- package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
- package/dist/serialization/resources/agents/resources/index.d.ts +6 -1
- package/dist/serialization/resources/agents/resources/index.js +7 -2
- package/dist/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
- package/dist/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
- package/dist/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
- package/dist/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
- package/dist/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/templates/client/index.js +17 -0
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
- package/{serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js} +3 -3
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
- package/dist/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
- package/dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
- package/{serialization/resources/agents/client/requests/AgentsMigrateRequest.js → dist/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
- package/dist/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
- package/dist/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
- package/dist/serialization/resources/agents/resources/templates/index.d.ts +2 -0
- package/dist/serialization/resources/agents/resources/templates/index.js +18 -0
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
- package/dist/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
- package/dist/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
- package/dist/serialization/resources/agents/resources/templates/types/index.js +17 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
- package/dist/serialization/resources/agents/types/{AgentsMigrateResponse.js → AgentsSearchRequestCombinator.js} +2 -4
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItem.js} +13 -6
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItemOrderBy.js} +6 -5
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestCombinator.js → AgentsSearchRequestSearchItemOrderByDirection.js} +2 -2
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
- package/dist/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
- package/dist/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
- package/dist/serialization/resources/agents/types/index.d.ts +8 -10
- package/dist/serialization/resources/agents/types/index.js +8 -10
- package/dist/serialization/resources/index.d.ts +2 -0
- package/dist/serialization/resources/index.js +3 -1
- package/dist/serialization/resources/providers/client/index.d.ts +2 -0
- package/dist/serialization/resources/{agents/resources/memory/resources → providers/client}/index.js +6 -2
- package/dist/serialization/resources/{agents/client/getAgentMemoryBlocks.d.ts → providers/client/listProviders.d.ts} +3 -3
- package/{serialization/resources/agents/types/AgentsMigrateResponse.js → dist/serialization/resources/providers/client/listProviders.js} +3 -4
- package/dist/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
- package/dist/serialization/resources/providers/client/requests/ProviderCreate.js +34 -0
- package/dist/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
- package/dist/serialization/resources/providers/client/requests/ProviderUpdate.js +34 -0
- package/dist/serialization/resources/providers/client/requests/index.d.ts +2 -0
- package/dist/serialization/resources/providers/client/requests/index.js +7 -0
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
- package/dist/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -0
- package/dist/serialization/resources/tools/client/requests/ToolUpdate.js +1 -0
- package/dist/serialization/types/AgentType.d.ts +1 -1
- package/dist/serialization/types/AgentType.js +1 -7
- package/dist/serialization/types/LettaSchemasToolTool.d.ts +3 -1
- package/dist/serialization/types/LettaSchemasToolTool.js +3 -1
- package/dist/serialization/types/Provider.d.ts +15 -0
- package/dist/serialization/types/Provider.js +36 -0
- package/dist/serialization/types/ToolType.d.ts +10 -0
- package/dist/serialization/types/ToolType.js +35 -0
- package/dist/serialization/types/index.d.ts +2 -0
- package/dist/serialization/types/index.js +2 -0
- package/dist/version.d.ts +1 -1
- package/dist/version.js +1 -1
- package/package.json +1 -1
- package/reference.md +591 -317
- package/serialization/resources/agents/client/index.d.ts +0 -1
- package/serialization/resources/agents/client/index.js +1 -2
- package/serialization/resources/agents/client/requests/AgentsSearchRequest.d.ts +18 -0
- package/{dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → serialization/resources/agents/client/requests/AgentsSearchRequest.js} +6 -6
- package/serialization/resources/agents/client/requests/index.d.ts +1 -4
- package/serialization/resources/agents/client/requests/index.js +3 -9
- package/serialization/resources/agents/resources/coreMemory/client/getBlocks.d.ts +11 -0
- package/{dist/serialization/resources/agents/client/getAgentMemoryBlocks.js → serialization/resources/agents/resources/coreMemory/client/getBlocks.js} +2 -2
- package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.d.ts +1 -0
- package/{dist/serialization/resources/agents/resources/memory/resources/messages → serialization/resources/agents/resources/coreMemory}/client/index.js +2 -1
- package/serialization/resources/agents/resources/coreMemory/client/listInContext.d.ts +11 -0
- package/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/client/listInContext.js +2 -2
- package/serialization/resources/agents/resources/coreMemory/index.d.ts +1 -0
- package/serialization/resources/agents/resources/coreMemory/index.js +17 -0
- package/serialization/resources/agents/resources/index.d.ts +6 -1
- package/serialization/resources/agents/resources/index.js +7 -2
- package/serialization/resources/agents/resources/memoryVariables/index.d.ts +1 -0
- package/serialization/resources/agents/resources/memoryVariables/index.js +17 -0
- package/serialization/resources/agents/resources/memoryVariables/types/MemoryVariablesGetResponse.d.ts +12 -0
- package/serialization/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +3 -3
- package/serialization/resources/agents/resources/memoryVariables/types/index.d.ts +1 -0
- package/serialization/resources/agents/resources/memoryVariables/types/index.js +17 -0
- package/serialization/resources/agents/resources/templates/client/index.d.ts +1 -0
- package/serialization/resources/agents/resources/templates/client/index.js +17 -0
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.d.ts +12 -0
- package/{dist/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → serialization/resources/agents/resources/templates/client/requests/TemplatesCreateRequest.js} +3 -3
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesCreateVersionRequest.d.ts +12 -0
- package/serialization/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +3 -3
- package/serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.d.ts +14 -0
- package/{dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.js → serialization/resources/agents/resources/templates/client/requests/TemplatesMigrateRequest.js} +3 -3
- package/serialization/resources/agents/resources/templates/client/requests/index.d.ts +3 -0
- package/serialization/resources/agents/resources/templates/client/requests/index.js +9 -0
- package/serialization/resources/agents/resources/templates/index.d.ts +2 -0
- package/serialization/resources/agents/resources/templates/index.js +18 -0
- package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.d.ts +12 -0
- package/serialization/resources/agents/resources/templates/types/TemplatesMigrateResponse.js +33 -0
- package/serialization/resources/agents/resources/templates/types/index.d.ts +1 -0
- package/serialization/resources/agents/resources/templates/types/index.js +17 -0
- package/serialization/resources/agents/types/AgentsSearchRequestCombinator.d.ts +10 -0
- package/serialization/resources/agents/types/AgentsSearchRequestCombinator.js +31 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.d.ts +22 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItem.js +43 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.d.ts +14 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemName.js +35 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.d.ts +10 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemNameOperator.js +31 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.d.ts +15 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderBy.js +36 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.d.ts +10 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByDirection.js +31 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.d.ts +10 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemOrderByValue.js +31 -0
- package/serialization/resources/agents/types/AgentsSearchRequestSearchItemVersion.d.ts +12 -0
- package/serialization/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +2 -2
- package/serialization/resources/agents/types/index.d.ts +8 -10
- package/serialization/resources/agents/types/index.js +8 -10
- package/serialization/resources/index.d.ts +2 -0
- package/serialization/resources/index.js +3 -1
- package/serialization/resources/providers/client/index.d.ts +2 -0
- package/{api/resources/agents/resources/memory/resources → serialization/resources/providers/client}/index.js +6 -2
- package/serialization/resources/{agents/client/getAgentMemoryBlocks.d.ts → providers/client/listProviders.d.ts} +3 -3
- package/serialization/resources/providers/client/listProviders.js +32 -0
- package/serialization/resources/providers/client/requests/ProviderCreate.d.ts +13 -0
- package/serialization/resources/providers/client/requests/ProviderCreate.js +34 -0
- package/serialization/resources/providers/client/requests/ProviderUpdate.d.ts +13 -0
- package/serialization/resources/providers/client/requests/ProviderUpdate.js +34 -0
- package/serialization/resources/providers/client/requests/index.d.ts +2 -0
- package/serialization/resources/providers/client/requests/index.js +7 -0
- package/serialization/resources/providers/index.d.ts +1 -0
- package/serialization/resources/providers/index.js +17 -0
- package/serialization/resources/tools/client/requests/ToolRunFromSource.d.ts +2 -1
- package/serialization/resources/tools/client/requests/ToolRunFromSource.js +2 -1
- package/serialization/resources/tools/client/requests/ToolUpdate.d.ts +1 -0
- package/serialization/resources/tools/client/requests/ToolUpdate.js +1 -0
- package/serialization/types/AgentType.d.ts +1 -1
- package/serialization/types/AgentType.js +1 -7
- package/serialization/types/LettaSchemasToolTool.d.ts +3 -1
- package/serialization/types/LettaSchemasToolTool.js +3 -1
- package/serialization/types/Provider.d.ts +15 -0
- package/serialization/types/Provider.js +36 -0
- package/serialization/types/ToolType.d.ts +10 -0
- package/serialization/types/ToolType.js +35 -0
- package/serialization/types/index.d.ts +2 -0
- package/serialization/types/index.js +2 -0
- package/version.d.ts +1 -1
- package/version.js +1 -1
- package/api/resources/agents/resources/memory/index.d.ts +0 -2
- package/api/resources/agents/resources/memory/index.js +0 -18
- package/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
- package/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
- package/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
- package/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
- package/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
- package/dist/api/resources/agents/resources/memory/index.d.ts +0 -2
- package/dist/api/resources/agents/resources/memory/index.js +0 -18
- package/dist/api/resources/agents/resources/memory/resources/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/memory/resources/index.js +0 -27
- package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.d.ts +0 -42
- package/dist/api/resources/agents/resources/memory/resources/messages/client/Client.js +0 -124
- package/dist/api/resources/agents/resources/memory/resources/messages/client/index.d.ts +0 -1
- package/dist/api/resources/agents/resources/memoryBlocks/client/Client.d.ts +0 -59
- package/dist/api/resources/agents/resources/memoryBlocks/client/index.d.ts +0 -1
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -8
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -16
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -8
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -9
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -8
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -8
- package/dist/api/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -8
- package/dist/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
- package/dist/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
- package/dist/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
- package/dist/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
- package/dist/serialization/resources/agents/resources/memory/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/memory/index.js +0 -17
- package/dist/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
- package/dist/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
- package/dist/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
- package/dist/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
- package/dist/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
- package/serialization/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.d.ts +0 -12
- package/serialization/resources/agents/client/requests/AgentsCreateVersionRequest.d.ts +0 -12
- package/serialization/resources/agents/client/requests/AgentsMigrateRequest.d.ts +0 -14
- package/serialization/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.d.ts +0 -18
- package/serialization/resources/agents/resources/memory/index.d.ts +0 -1
- package/serialization/resources/agents/resources/memory/index.js +0 -17
- package/serialization/resources/agents/resources/memory/resources/index.d.ts +0 -1
- package/serialization/resources/agents/resources/memory/resources/index.js +0 -27
- package/serialization/resources/agents/resources/memory/resources/messages/client/listInContext.d.ts +0 -11
- package/serialization/resources/agents/types/AgentsGetAgentVariablesResponse.d.ts +0 -12
- package/serialization/resources/agents/types/AgentsMigrateResponse.d.ts +0 -12
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.d.ts +0 -10
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestCombinator.js +0 -31
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.d.ts +0 -22
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItem.js +0 -43
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.d.ts +0 -14
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemName.js +0 -35
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.d.ts +0 -10
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemNameOperator.js +0 -31
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.d.ts +0 -15
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js +0 -36
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.d.ts +0 -10
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByDirection.js +0 -31
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.d.ts +0 -10
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemOrderByValue.js +0 -31
- package/serialization/resources/agents/types/AgentsSearchDeployedAgentsRequestSearchItemVersion.d.ts +0 -12
- /package/api/resources/agents/client/requests/{AgentsCreateTemplateFromAgentRequest.js → AgentsSearchRequest.js} +0 -0
- /package/api/resources/agents/resources/{memory → coreMemory}/client/index.d.ts +0 -0
- /package/api/resources/agents/resources/{memory → coreMemory}/client/index.js +0 -0
- /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
- /package/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
- /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.d.ts +0 -0
- /package/api/resources/agents/resources/{memory/resources/messages → memoryVariables}/client/index.js +0 -0
- /package/api/resources/agents/{client/requests/AgentsCreateVersionRequest.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +0 -0
- /package/api/resources/agents/{client/requests/AgentsMigrateRequest.js → resources/templates/client/requests/TemplatesCreateRequest.js} +0 -0
- /package/api/resources/agents/{client/requests/AgentsSearchDeployedAgentsRequest.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +0 -0
- /package/api/resources/agents/{types/AgentsGetAgentVariablesResponse.js → resources/templates/client/requests/TemplatesMigrateRequest.js} +0 -0
- /package/api/resources/agents/resources/{memoryBlocks/client → templates/client/requests}/index.js +0 -0
- /package/api/resources/agents/{types/AgentsMigrateResponse.js → resources/templates/types/TemplatesMigrateResponse.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItem.js → AgentsSearchRequestSearchItem.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemName.js → AgentsSearchRequestSearchItemName.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → AgentsSearchRequestSearchItemOrderBy.js} +0 -0
- /package/api/resources/agents/types/{AgentsSearchDeployedAgentsRequestSearchItemVersion.js → AgentsSearchRequestSearchItemVersion.js} +0 -0
- /package/{dist/api/resources/agents/client/requests/AgentsCreateTemplateFromAgentRequest.js → api/resources/providers/client/requests/DeleteProviderRequest.js} +0 -0
- /package/{dist/api/resources/agents/client/requests/AgentsCreateVersionRequest.js → api/resources/providers/client/requests/ListProvidersRequest.js} +0 -0
- /package/{dist/api/resources/agents/client/requests/AgentsMigrateRequest.js → api/resources/providers/client/requests/ProviderCreate.js} +0 -0
- /package/{dist/api/resources/agents/client/requests/AgentsSearchDeployedAgentsRequest.js → api/resources/providers/client/requests/ProviderUpdate.js} +0 -0
- /package/{dist/api/resources/agents/resources/memory/client → api/resources/providers/client/requests}/index.js +0 -0
- /package/api/resources/{agents/resources/memoryBlocks → providers}/index.d.ts +0 -0
- /package/api/resources/{agents/resources/memoryBlocks → providers}/index.js +0 -0
- /package/{dist/api/resources/agents/types/AgentsGetAgentVariablesResponse.js → api/types/Provider.js} +0 -0
- /package/dist/api/resources/agents/{types/AgentsMigrateResponse.js → client/requests/AgentsSearchRequest.js} +0 -0
- /package/{api/resources/agents/resources/memoryBlocks → dist/api/resources/agents/resources/coreMemory}/client/index.d.ts +0 -0
- /package/dist/api/resources/agents/resources/{memory/resources/messages → coreMemory}/client/index.js +0 -0
- /package/dist/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
- /package/dist/api/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
- /package/dist/api/resources/agents/resources/{memory → memoryVariables}/client/index.d.ts +0 -0
- /package/dist/api/resources/agents/resources/{memoryBlocks → memoryVariables}/client/index.js +0 -0
- /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItem.js → resources/memoryVariables/types/MemoryVariablesGetResponse.js} +0 -0
- /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemName.js → resources/templates/client/requests/TemplatesCreateRequest.js} +0 -0
- /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemOrderBy.js → resources/templates/client/requests/TemplatesCreateVersionRequest.js} +0 -0
- /package/dist/api/resources/agents/{types/AgentsSearchDeployedAgentsRequestSearchItemVersion.js → resources/templates/client/requests/TemplatesMigrateRequest.js} +0 -0
- /package/dist/api/resources/{agents/resources/memoryBlocks → providers}/index.d.ts +0 -0
- /package/dist/api/resources/{agents/resources/memoryBlocks → providers}/index.js +0 -0
- /package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/index.d.ts +0 -0
- /package/dist/serialization/resources/agents/resources/{memory/resources/messages → coreMemory}/index.js +0 -0
- /package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/providers}/index.d.ts +0 -0
- /package/{serialization/resources/agents/resources/memory/resources/messages → dist/serialization/resources/providers}/index.js +0 -0
|
@@ -34,17 +34,6 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
|
|
|
34
34
|
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
35
35
|
});
|
|
36
36
|
};
|
|
37
|
-
var __rest = (this && this.__rest) || function (s, e) {
|
|
38
|
-
var t = {};
|
|
39
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p) && e.indexOf(p) < 0)
|
|
40
|
-
t[p] = s[p];
|
|
41
|
-
if (s != null && typeof Object.getOwnPropertySymbols === "function")
|
|
42
|
-
for (var i = 0, p = Object.getOwnPropertySymbols(s); i < p.length; i++) {
|
|
43
|
-
if (e.indexOf(p[i]) < 0 && Object.prototype.propertyIsEnumerable.call(s, p[i]))
|
|
44
|
-
t[p[i]] = s[p[i]];
|
|
45
|
-
}
|
|
46
|
-
return t;
|
|
47
|
-
};
|
|
48
37
|
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
49
38
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
50
39
|
};
|
|
@@ -59,11 +48,12 @@ const errors = __importStar(require("../../../../errors/index"));
|
|
|
59
48
|
const Client_1 = require("../resources/context/client/Client");
|
|
60
49
|
const Client_2 = require("../resources/tools/client/Client");
|
|
61
50
|
const Client_3 = require("../resources/sources/client/Client");
|
|
62
|
-
const Client_4 = require("../resources/
|
|
63
|
-
const Client_5 = require("../resources/
|
|
64
|
-
const Client_6 = require("../resources/
|
|
65
|
-
const Client_7 = require("../resources/
|
|
66
|
-
const Client_8 = require("../resources/
|
|
51
|
+
const Client_4 = require("../resources/coreMemory/client/Client");
|
|
52
|
+
const Client_5 = require("../resources/recallMemory/client/Client");
|
|
53
|
+
const Client_6 = require("../resources/archivalMemory/client/Client");
|
|
54
|
+
const Client_7 = require("../resources/messages/client/Client");
|
|
55
|
+
const Client_8 = require("../resources/templates/client/Client");
|
|
56
|
+
const Client_9 = require("../resources/memoryVariables/client/Client");
|
|
67
57
|
class Agents {
|
|
68
58
|
constructor(_options = {}) {
|
|
69
59
|
this._options = _options;
|
|
@@ -80,25 +70,29 @@ class Agents {
|
|
|
80
70
|
var _a;
|
|
81
71
|
return ((_a = this._sources) !== null && _a !== void 0 ? _a : (this._sources = new Client_3.Sources(this._options)));
|
|
82
72
|
}
|
|
83
|
-
get
|
|
84
|
-
var _a;
|
|
85
|
-
return ((_a = this._memory) !== null && _a !== void 0 ? _a : (this._memory = new Client_4.Memory(this._options)));
|
|
86
|
-
}
|
|
87
|
-
get memoryBlocks() {
|
|
73
|
+
get coreMemory() {
|
|
88
74
|
var _a;
|
|
89
|
-
return ((_a = this.
|
|
75
|
+
return ((_a = this._coreMemory) !== null && _a !== void 0 ? _a : (this._coreMemory = new Client_4.CoreMemory(this._options)));
|
|
90
76
|
}
|
|
91
77
|
get recallMemory() {
|
|
92
78
|
var _a;
|
|
93
|
-
return ((_a = this._recallMemory) !== null && _a !== void 0 ? _a : (this._recallMemory = new
|
|
79
|
+
return ((_a = this._recallMemory) !== null && _a !== void 0 ? _a : (this._recallMemory = new Client_5.RecallMemory(this._options)));
|
|
94
80
|
}
|
|
95
81
|
get archivalMemory() {
|
|
96
82
|
var _a;
|
|
97
|
-
return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new
|
|
83
|
+
return ((_a = this._archivalMemory) !== null && _a !== void 0 ? _a : (this._archivalMemory = new Client_6.ArchivalMemory(this._options)));
|
|
98
84
|
}
|
|
99
85
|
get messages() {
|
|
100
86
|
var _a;
|
|
101
|
-
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new
|
|
87
|
+
return ((_a = this._messages) !== null && _a !== void 0 ? _a : (this._messages = new Client_7.Messages(this._options)));
|
|
88
|
+
}
|
|
89
|
+
get templates() {
|
|
90
|
+
var _a;
|
|
91
|
+
return ((_a = this._templates) !== null && _a !== void 0 ? _a : (this._templates = new Client_8.Templates(this._options)));
|
|
92
|
+
}
|
|
93
|
+
get memoryVariables() {
|
|
94
|
+
var _a;
|
|
95
|
+
return ((_a = this._memoryVariables) !== null && _a !== void 0 ? _a : (this._memoryVariables = new Client_9.MemoryVariables(this._options)));
|
|
102
96
|
}
|
|
103
97
|
/**
|
|
104
98
|
* List all agents associated with a given user.
|
|
@@ -140,7 +134,7 @@ class Agents {
|
|
|
140
134
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
141
135
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
|
|
142
136
|
method: "GET",
|
|
143
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
137
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
144
138
|
contentType: "application/json",
|
|
145
139
|
queryParameters: _queryParams,
|
|
146
140
|
requestType: "json",
|
|
@@ -211,7 +205,7 @@ class Agents {
|
|
|
211
205
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
212
206
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/"),
|
|
213
207
|
method: "POST",
|
|
214
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
208
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
215
209
|
contentType: "application/json",
|
|
216
210
|
requestType: "json",
|
|
217
211
|
body: serializers.CreateAgentRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -277,7 +271,7 @@ class Agents {
|
|
|
277
271
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
278
272
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
279
273
|
method: "GET",
|
|
280
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
274
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
281
275
|
contentType: "application/json",
|
|
282
276
|
requestType: "json",
|
|
283
277
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -342,7 +336,7 @@ class Agents {
|
|
|
342
336
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
343
337
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
344
338
|
method: "DELETE",
|
|
345
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
339
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
346
340
|
contentType: "application/json",
|
|
347
341
|
requestType: "json",
|
|
348
342
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
@@ -402,7 +396,7 @@ class Agents {
|
|
|
402
396
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
403
397
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}`),
|
|
404
398
|
method: "PATCH",
|
|
405
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
399
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
406
400
|
contentType: "application/json",
|
|
407
401
|
requestType: "json",
|
|
408
402
|
body: serializers.UpdateAgent.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
@@ -452,225 +446,26 @@ class Agents {
|
|
|
452
446
|
});
|
|
453
447
|
}
|
|
454
448
|
/**
|
|
455
|
-
*
|
|
456
|
-
*
|
|
457
|
-
* @param {string} agentId
|
|
458
|
-
* @param {string} blockLabel
|
|
459
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
460
|
-
*
|
|
461
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
462
|
-
*
|
|
463
|
-
* @example
|
|
464
|
-
* await client.agents.getAgentMemoryBlock("agent_id", "block_label")
|
|
465
|
-
*/
|
|
466
|
-
getAgentMemoryBlock(agentId, blockLabel, requestOptions) {
|
|
467
|
-
var _a, _b;
|
|
468
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
469
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
470
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
|
|
471
|
-
method: "GET",
|
|
472
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
473
|
-
contentType: "application/json",
|
|
474
|
-
requestType: "json",
|
|
475
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
476
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
477
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
478
|
-
});
|
|
479
|
-
if (_response.ok) {
|
|
480
|
-
return serializers.Block.parseOrThrow(_response.body, {
|
|
481
|
-
unrecognizedObjectKeys: "passthrough",
|
|
482
|
-
allowUnrecognizedUnionMembers: true,
|
|
483
|
-
allowUnrecognizedEnumValues: true,
|
|
484
|
-
skipValidation: true,
|
|
485
|
-
breadcrumbsPrefix: ["response"],
|
|
486
|
-
});
|
|
487
|
-
}
|
|
488
|
-
if (_response.error.reason === "status-code") {
|
|
489
|
-
switch (_response.error.statusCode) {
|
|
490
|
-
case 422:
|
|
491
|
-
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
492
|
-
unrecognizedObjectKeys: "passthrough",
|
|
493
|
-
allowUnrecognizedUnionMembers: true,
|
|
494
|
-
allowUnrecognizedEnumValues: true,
|
|
495
|
-
skipValidation: true,
|
|
496
|
-
breadcrumbsPrefix: ["response"],
|
|
497
|
-
}));
|
|
498
|
-
default:
|
|
499
|
-
throw new errors.LettaError({
|
|
500
|
-
statusCode: _response.error.statusCode,
|
|
501
|
-
body: _response.error.body,
|
|
502
|
-
});
|
|
503
|
-
}
|
|
504
|
-
}
|
|
505
|
-
switch (_response.error.reason) {
|
|
506
|
-
case "non-json":
|
|
507
|
-
throw new errors.LettaError({
|
|
508
|
-
statusCode: _response.error.statusCode,
|
|
509
|
-
body: _response.error.rawBody,
|
|
510
|
-
});
|
|
511
|
-
case "timeout":
|
|
512
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/block/{block_label}.");
|
|
513
|
-
case "unknown":
|
|
514
|
-
throw new errors.LettaError({
|
|
515
|
-
message: _response.error.errorMessage,
|
|
516
|
-
});
|
|
517
|
-
}
|
|
518
|
-
});
|
|
519
|
-
}
|
|
520
|
-
/**
|
|
521
|
-
* Removes a memory block from an agent by unlnking it. If the block is not linked to any other agent, it is deleted.
|
|
522
|
-
*
|
|
523
|
-
* @param {string} agentId
|
|
524
|
-
* @param {string} blockLabel
|
|
525
|
-
* @param {Letta.BlockUpdate} request
|
|
526
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
527
|
-
*
|
|
528
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
529
|
-
*
|
|
530
|
-
* @example
|
|
531
|
-
* await client.agents.updateAgentMemoryBlockByLabel("agent_id", "block_label", {})
|
|
532
|
-
*/
|
|
533
|
-
updateAgentMemoryBlockByLabel(agentId, blockLabel, request, requestOptions) {
|
|
534
|
-
var _a, _b;
|
|
535
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
536
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
537
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block/${encodeURIComponent(blockLabel)}`),
|
|
538
|
-
method: "PATCH",
|
|
539
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
540
|
-
contentType: "application/json",
|
|
541
|
-
requestType: "json",
|
|
542
|
-
body: serializers.BlockUpdate.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
543
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
544
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
545
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
546
|
-
});
|
|
547
|
-
if (_response.ok) {
|
|
548
|
-
return serializers.Block.parseOrThrow(_response.body, {
|
|
549
|
-
unrecognizedObjectKeys: "passthrough",
|
|
550
|
-
allowUnrecognizedUnionMembers: true,
|
|
551
|
-
allowUnrecognizedEnumValues: true,
|
|
552
|
-
skipValidation: true,
|
|
553
|
-
breadcrumbsPrefix: ["response"],
|
|
554
|
-
});
|
|
555
|
-
}
|
|
556
|
-
if (_response.error.reason === "status-code") {
|
|
557
|
-
switch (_response.error.statusCode) {
|
|
558
|
-
case 422:
|
|
559
|
-
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
560
|
-
unrecognizedObjectKeys: "passthrough",
|
|
561
|
-
allowUnrecognizedUnionMembers: true,
|
|
562
|
-
allowUnrecognizedEnumValues: true,
|
|
563
|
-
skipValidation: true,
|
|
564
|
-
breadcrumbsPrefix: ["response"],
|
|
565
|
-
}));
|
|
566
|
-
default:
|
|
567
|
-
throw new errors.LettaError({
|
|
568
|
-
statusCode: _response.error.statusCode,
|
|
569
|
-
body: _response.error.body,
|
|
570
|
-
});
|
|
571
|
-
}
|
|
572
|
-
}
|
|
573
|
-
switch (_response.error.reason) {
|
|
574
|
-
case "non-json":
|
|
575
|
-
throw new errors.LettaError({
|
|
576
|
-
statusCode: _response.error.statusCode,
|
|
577
|
-
body: _response.error.rawBody,
|
|
578
|
-
});
|
|
579
|
-
case "timeout":
|
|
580
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling PATCH /v1/agents/{agent_id}/memory/block/{block_label}.");
|
|
581
|
-
case "unknown":
|
|
582
|
-
throw new errors.LettaError({
|
|
583
|
-
message: _response.error.errorMessage,
|
|
584
|
-
});
|
|
585
|
-
}
|
|
586
|
-
});
|
|
587
|
-
}
|
|
588
|
-
/**
|
|
589
|
-
* Retrieve the memory blocks of a specific agent.
|
|
590
|
-
*
|
|
591
|
-
* @param {string} agentId
|
|
592
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
593
|
-
*
|
|
594
|
-
* @throws {@link Letta.UnprocessableEntityError}
|
|
449
|
+
* <Note>This endpoint is only available on Letta Cloud.</Note>
|
|
595
450
|
*
|
|
596
|
-
*
|
|
597
|
-
* await client.agents.getAgentMemoryBlocks("agent_id")
|
|
598
|
-
*/
|
|
599
|
-
getAgentMemoryBlocks(agentId, requestOptions) {
|
|
600
|
-
var _a, _b;
|
|
601
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
602
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
603
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/memory/block`),
|
|
604
|
-
method: "GET",
|
|
605
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
606
|
-
contentType: "application/json",
|
|
607
|
-
requestType: "json",
|
|
608
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
609
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
610
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
611
|
-
});
|
|
612
|
-
if (_response.ok) {
|
|
613
|
-
return serializers.agents.getAgentMemoryBlocks.Response.parseOrThrow(_response.body, {
|
|
614
|
-
unrecognizedObjectKeys: "passthrough",
|
|
615
|
-
allowUnrecognizedUnionMembers: true,
|
|
616
|
-
allowUnrecognizedEnumValues: true,
|
|
617
|
-
skipValidation: true,
|
|
618
|
-
breadcrumbsPrefix: ["response"],
|
|
619
|
-
});
|
|
620
|
-
}
|
|
621
|
-
if (_response.error.reason === "status-code") {
|
|
622
|
-
switch (_response.error.statusCode) {
|
|
623
|
-
case 422:
|
|
624
|
-
throw new Letta.UnprocessableEntityError(serializers.HttpValidationError.parseOrThrow(_response.error.body, {
|
|
625
|
-
unrecognizedObjectKeys: "passthrough",
|
|
626
|
-
allowUnrecognizedUnionMembers: true,
|
|
627
|
-
allowUnrecognizedEnumValues: true,
|
|
628
|
-
skipValidation: true,
|
|
629
|
-
breadcrumbsPrefix: ["response"],
|
|
630
|
-
}));
|
|
631
|
-
default:
|
|
632
|
-
throw new errors.LettaError({
|
|
633
|
-
statusCode: _response.error.statusCode,
|
|
634
|
-
body: _response.error.body,
|
|
635
|
-
});
|
|
636
|
-
}
|
|
637
|
-
}
|
|
638
|
-
switch (_response.error.reason) {
|
|
639
|
-
case "non-json":
|
|
640
|
-
throw new errors.LettaError({
|
|
641
|
-
statusCode: _response.error.statusCode,
|
|
642
|
-
body: _response.error.rawBody,
|
|
643
|
-
});
|
|
644
|
-
case "timeout":
|
|
645
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/memory/block.");
|
|
646
|
-
case "unknown":
|
|
647
|
-
throw new errors.LettaError({
|
|
648
|
-
message: _response.error.errorMessage,
|
|
649
|
-
});
|
|
650
|
-
}
|
|
651
|
-
});
|
|
652
|
-
}
|
|
653
|
-
/**
|
|
654
|
-
* Search deployed agents
|
|
451
|
+
* Search deployed agents.
|
|
655
452
|
*
|
|
656
|
-
* @param {Letta.
|
|
453
|
+
* @param {Letta.AgentsSearchRequest} request
|
|
657
454
|
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
658
455
|
*
|
|
659
456
|
* @example
|
|
660
|
-
* await client.agents.
|
|
457
|
+
* await client.agents.search()
|
|
661
458
|
*/
|
|
662
|
-
|
|
459
|
+
search(request = {}, requestOptions) {
|
|
663
460
|
var _a, _b;
|
|
664
461
|
return __awaiter(this, void 0, void 0, function* () {
|
|
665
462
|
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
666
463
|
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, "v1/agents/search"),
|
|
667
464
|
method: "POST",
|
|
668
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.
|
|
465
|
+
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.7", "User-Agent": "@letta-ai/letta-client/0.1.7", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
669
466
|
contentType: "application/json",
|
|
670
467
|
requestType: "json",
|
|
671
|
-
body: serializers.
|
|
672
|
-
unrecognizedObjectKeys: "strip",
|
|
673
|
-
}),
|
|
468
|
+
body: serializers.AgentsSearchRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
674
469
|
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
675
470
|
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
676
471
|
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
@@ -699,265 +494,6 @@ class Agents {
|
|
|
699
494
|
}
|
|
700
495
|
});
|
|
701
496
|
}
|
|
702
|
-
/**
|
|
703
|
-
* Creates a versioned version of an agent
|
|
704
|
-
*
|
|
705
|
-
* @param {string} agentId - The agent ID of the agent to migrate, if this agent is not a template, it will create a agent template from the agent provided as well
|
|
706
|
-
* @param {Letta.AgentsCreateVersionRequest} request
|
|
707
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
708
|
-
*
|
|
709
|
-
* @throws {@link Letta.NotFoundError}
|
|
710
|
-
* @throws {@link Letta.InternalServerError}
|
|
711
|
-
*
|
|
712
|
-
* @example
|
|
713
|
-
* await client.agents.createVersion("agent_id")
|
|
714
|
-
*/
|
|
715
|
-
createVersion(agentId, request = {}, requestOptions) {
|
|
716
|
-
var _a, _b;
|
|
717
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
718
|
-
const { returnAgentState } = request, _body = __rest(request, ["returnAgentState"]);
|
|
719
|
-
const _queryParams = {};
|
|
720
|
-
if (returnAgentState != null) {
|
|
721
|
-
_queryParams["returnAgentState"] = returnAgentState.toString();
|
|
722
|
-
}
|
|
723
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
724
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/version-template`),
|
|
725
|
-
method: "POST",
|
|
726
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
727
|
-
contentType: "application/json",
|
|
728
|
-
queryParameters: _queryParams,
|
|
729
|
-
requestType: "json",
|
|
730
|
-
body: serializers.AgentsCreateVersionRequest.jsonOrThrow(_body, { unrecognizedObjectKeys: "strip" }),
|
|
731
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
732
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
733
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
734
|
-
});
|
|
735
|
-
if (_response.ok) {
|
|
736
|
-
return;
|
|
737
|
-
}
|
|
738
|
-
if (_response.error.reason === "status-code") {
|
|
739
|
-
switch (_response.error.statusCode) {
|
|
740
|
-
case 404:
|
|
741
|
-
throw new Letta.NotFoundError(_response.error.body);
|
|
742
|
-
case 500:
|
|
743
|
-
throw new Letta.InternalServerError(_response.error.body);
|
|
744
|
-
default:
|
|
745
|
-
throw new errors.LettaError({
|
|
746
|
-
statusCode: _response.error.statusCode,
|
|
747
|
-
body: _response.error.body,
|
|
748
|
-
});
|
|
749
|
-
}
|
|
750
|
-
}
|
|
751
|
-
switch (_response.error.reason) {
|
|
752
|
-
case "non-json":
|
|
753
|
-
throw new errors.LettaError({
|
|
754
|
-
statusCode: _response.error.statusCode,
|
|
755
|
-
body: _response.error.rawBody,
|
|
756
|
-
});
|
|
757
|
-
case "timeout":
|
|
758
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/version-template.");
|
|
759
|
-
case "unknown":
|
|
760
|
-
throw new errors.LettaError({
|
|
761
|
-
message: _response.error.errorMessage,
|
|
762
|
-
});
|
|
763
|
-
}
|
|
764
|
-
});
|
|
765
|
-
}
|
|
766
|
-
/**
|
|
767
|
-
* Migrate an agent to a new versioned agent template
|
|
768
|
-
*
|
|
769
|
-
* @param {string} agentId
|
|
770
|
-
* @param {Letta.AgentsMigrateRequest} request
|
|
771
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
772
|
-
*
|
|
773
|
-
* @throws {@link Letta.NotFoundError}
|
|
774
|
-
* @throws {@link Letta.ConflictError}
|
|
775
|
-
* @throws {@link Letta.InternalServerError}
|
|
776
|
-
*
|
|
777
|
-
* @example
|
|
778
|
-
* await client.agents.migrate("agent_id", {
|
|
779
|
-
* toTemplate: "to_template",
|
|
780
|
-
* preserveCoreMemories: true
|
|
781
|
-
* })
|
|
782
|
-
*/
|
|
783
|
-
migrate(agentId, request, requestOptions) {
|
|
784
|
-
var _a, _b;
|
|
785
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
786
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
787
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/migrate`),
|
|
788
|
-
method: "POST",
|
|
789
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
790
|
-
contentType: "application/json",
|
|
791
|
-
requestType: "json",
|
|
792
|
-
body: serializers.AgentsMigrateRequest.jsonOrThrow(request, { unrecognizedObjectKeys: "strip" }),
|
|
793
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
794
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
795
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
796
|
-
});
|
|
797
|
-
if (_response.ok) {
|
|
798
|
-
return serializers.AgentsMigrateResponse.parseOrThrow(_response.body, {
|
|
799
|
-
unrecognizedObjectKeys: "passthrough",
|
|
800
|
-
allowUnrecognizedUnionMembers: true,
|
|
801
|
-
allowUnrecognizedEnumValues: true,
|
|
802
|
-
skipValidation: true,
|
|
803
|
-
breadcrumbsPrefix: ["response"],
|
|
804
|
-
});
|
|
805
|
-
}
|
|
806
|
-
if (_response.error.reason === "status-code") {
|
|
807
|
-
switch (_response.error.statusCode) {
|
|
808
|
-
case 404:
|
|
809
|
-
throw new Letta.NotFoundError(_response.error.body);
|
|
810
|
-
case 409:
|
|
811
|
-
throw new Letta.ConflictError(serializers.ConflictErrorBody.parseOrThrow(_response.error.body, {
|
|
812
|
-
unrecognizedObjectKeys: "passthrough",
|
|
813
|
-
allowUnrecognizedUnionMembers: true,
|
|
814
|
-
allowUnrecognizedEnumValues: true,
|
|
815
|
-
skipValidation: true,
|
|
816
|
-
breadcrumbsPrefix: ["response"],
|
|
817
|
-
}));
|
|
818
|
-
case 500:
|
|
819
|
-
throw new Letta.InternalServerError(_response.error.body);
|
|
820
|
-
default:
|
|
821
|
-
throw new errors.LettaError({
|
|
822
|
-
statusCode: _response.error.statusCode,
|
|
823
|
-
body: _response.error.body,
|
|
824
|
-
});
|
|
825
|
-
}
|
|
826
|
-
}
|
|
827
|
-
switch (_response.error.reason) {
|
|
828
|
-
case "non-json":
|
|
829
|
-
throw new errors.LettaError({
|
|
830
|
-
statusCode: _response.error.statusCode,
|
|
831
|
-
body: _response.error.rawBody,
|
|
832
|
-
});
|
|
833
|
-
case "timeout":
|
|
834
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/migrate.");
|
|
835
|
-
case "unknown":
|
|
836
|
-
throw new errors.LettaError({
|
|
837
|
-
message: _response.error.errorMessage,
|
|
838
|
-
});
|
|
839
|
-
}
|
|
840
|
-
});
|
|
841
|
-
}
|
|
842
|
-
/**
|
|
843
|
-
* Create a template from an agent
|
|
844
|
-
*
|
|
845
|
-
* @param {string} agentId
|
|
846
|
-
* @param {Letta.AgentsCreateTemplateFromAgentRequest} request
|
|
847
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
848
|
-
*
|
|
849
|
-
* @throws {@link Letta.NotFoundError}
|
|
850
|
-
* @throws {@link Letta.InternalServerError}
|
|
851
|
-
*
|
|
852
|
-
* @example
|
|
853
|
-
* await client.agents.createtemplatefromagent("agent_id")
|
|
854
|
-
*/
|
|
855
|
-
createtemplatefromagent(agentId, request = {}, requestOptions) {
|
|
856
|
-
var _a, _b;
|
|
857
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
858
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
859
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/template`),
|
|
860
|
-
method: "POST",
|
|
861
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
862
|
-
contentType: "application/json",
|
|
863
|
-
requestType: "json",
|
|
864
|
-
body: serializers.AgentsCreateTemplateFromAgentRequest.jsonOrThrow(request, {
|
|
865
|
-
unrecognizedObjectKeys: "strip",
|
|
866
|
-
}),
|
|
867
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
868
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
869
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
870
|
-
});
|
|
871
|
-
if (_response.ok) {
|
|
872
|
-
return;
|
|
873
|
-
}
|
|
874
|
-
if (_response.error.reason === "status-code") {
|
|
875
|
-
switch (_response.error.statusCode) {
|
|
876
|
-
case 404:
|
|
877
|
-
throw new Letta.NotFoundError(_response.error.body);
|
|
878
|
-
case 500:
|
|
879
|
-
throw new Letta.InternalServerError(_response.error.body);
|
|
880
|
-
default:
|
|
881
|
-
throw new errors.LettaError({
|
|
882
|
-
statusCode: _response.error.statusCode,
|
|
883
|
-
body: _response.error.body,
|
|
884
|
-
});
|
|
885
|
-
}
|
|
886
|
-
}
|
|
887
|
-
switch (_response.error.reason) {
|
|
888
|
-
case "non-json":
|
|
889
|
-
throw new errors.LettaError({
|
|
890
|
-
statusCode: _response.error.statusCode,
|
|
891
|
-
body: _response.error.rawBody,
|
|
892
|
-
});
|
|
893
|
-
case "timeout":
|
|
894
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling POST /v1/agents/{agent_id}/template.");
|
|
895
|
-
case "unknown":
|
|
896
|
-
throw new errors.LettaError({
|
|
897
|
-
message: _response.error.errorMessage,
|
|
898
|
-
});
|
|
899
|
-
}
|
|
900
|
-
});
|
|
901
|
-
}
|
|
902
|
-
/**
|
|
903
|
-
* Get the variables associated with an agent
|
|
904
|
-
*
|
|
905
|
-
* @param {string} agentId
|
|
906
|
-
* @param {Agents.RequestOptions} requestOptions - Request-specific configuration.
|
|
907
|
-
*
|
|
908
|
-
* @throws {@link Letta.NotFoundError}
|
|
909
|
-
*
|
|
910
|
-
* @example
|
|
911
|
-
* await client.agents.getagentvariables("agent_id")
|
|
912
|
-
*/
|
|
913
|
-
getagentvariables(agentId, requestOptions) {
|
|
914
|
-
var _a, _b;
|
|
915
|
-
return __awaiter(this, void 0, void 0, function* () {
|
|
916
|
-
const _response = yield ((_a = this._options.fetcher) !== null && _a !== void 0 ? _a : core.fetcher)({
|
|
917
|
-
url: (0, url_join_1.default)((_b = (yield core.Supplier.get(this._options.environment))) !== null && _b !== void 0 ? _b : environments.LettaEnvironment.LettaCloud, `v1/agents/${encodeURIComponent(agentId)}/variables`),
|
|
918
|
-
method: "GET",
|
|
919
|
-
headers: Object.assign(Object.assign({ "X-Fern-Language": "JavaScript", "X-Fern-SDK-Name": "@letta-ai/letta-client", "X-Fern-SDK-Version": "0.1.5", "User-Agent": "@letta-ai/letta-client/0.1.5", "X-Fern-Runtime": core.RUNTIME.type, "X-Fern-Runtime-Version": core.RUNTIME.version }, (yield this._getCustomAuthorizationHeaders())), requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.headers),
|
|
920
|
-
contentType: "application/json",
|
|
921
|
-
requestType: "json",
|
|
922
|
-
timeoutMs: (requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.timeoutInSeconds) != null ? requestOptions.timeoutInSeconds * 1000 : 60000,
|
|
923
|
-
maxRetries: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.maxRetries,
|
|
924
|
-
abortSignal: requestOptions === null || requestOptions === void 0 ? void 0 : requestOptions.abortSignal,
|
|
925
|
-
});
|
|
926
|
-
if (_response.ok) {
|
|
927
|
-
return serializers.AgentsGetAgentVariablesResponse.parseOrThrow(_response.body, {
|
|
928
|
-
unrecognizedObjectKeys: "passthrough",
|
|
929
|
-
allowUnrecognizedUnionMembers: true,
|
|
930
|
-
allowUnrecognizedEnumValues: true,
|
|
931
|
-
skipValidation: true,
|
|
932
|
-
breadcrumbsPrefix: ["response"],
|
|
933
|
-
});
|
|
934
|
-
}
|
|
935
|
-
if (_response.error.reason === "status-code") {
|
|
936
|
-
switch (_response.error.statusCode) {
|
|
937
|
-
case 404:
|
|
938
|
-
throw new Letta.NotFoundError(_response.error.body);
|
|
939
|
-
default:
|
|
940
|
-
throw new errors.LettaError({
|
|
941
|
-
statusCode: _response.error.statusCode,
|
|
942
|
-
body: _response.error.body,
|
|
943
|
-
});
|
|
944
|
-
}
|
|
945
|
-
}
|
|
946
|
-
switch (_response.error.reason) {
|
|
947
|
-
case "non-json":
|
|
948
|
-
throw new errors.LettaError({
|
|
949
|
-
statusCode: _response.error.statusCode,
|
|
950
|
-
body: _response.error.rawBody,
|
|
951
|
-
});
|
|
952
|
-
case "timeout":
|
|
953
|
-
throw new errors.LettaTimeoutError("Timeout exceeded when calling GET /v1/agents/{agent_id}/variables.");
|
|
954
|
-
case "unknown":
|
|
955
|
-
throw new errors.LettaError({
|
|
956
|
-
message: _response.error.errorMessage,
|
|
957
|
-
});
|
|
958
|
-
}
|
|
959
|
-
});
|
|
960
|
-
}
|
|
961
497
|
_getCustomAuthorizationHeaders() {
|
|
962
498
|
return __awaiter(this, void 0, void 0, function* () {
|
|
963
499
|
const tokenValue = yield core.Supplier.get(this._options.token);
|
|
@@ -6,10 +6,10 @@ import * as Letta from "../../../../index";
|
|
|
6
6
|
* @example
|
|
7
7
|
* {}
|
|
8
8
|
*/
|
|
9
|
-
export interface
|
|
10
|
-
search?: Letta.
|
|
9
|
+
export interface AgentsSearchRequest {
|
|
10
|
+
search?: Letta.AgentsSearchRequestSearchItem[];
|
|
11
11
|
projectId?: string;
|
|
12
|
-
combinator?: Letta.
|
|
12
|
+
combinator?: Letta.AgentsSearchRequestCombinator;
|
|
13
13
|
limit?: number;
|
|
14
14
|
offset?: number;
|
|
15
15
|
}
|
|
@@ -1,7 +1,4 @@
|
|
|
1
1
|
export { type AgentsListRequest } from "./AgentsListRequest";
|
|
2
2
|
export { type CreateAgentRequest } from "./CreateAgentRequest";
|
|
3
3
|
export { type UpdateAgent } from "./UpdateAgent";
|
|
4
|
-
export { type
|
|
5
|
-
export { type AgentsCreateVersionRequest } from "./AgentsCreateVersionRequest";
|
|
6
|
-
export { type AgentsMigrateRequest } from "./AgentsMigrateRequest";
|
|
7
|
-
export { type AgentsCreateTemplateFromAgentRequest } from "./AgentsCreateTemplateFromAgentRequest";
|
|
4
|
+
export { type AgentsSearchRequest } from "./AgentsSearchRequest";
|