@dakera-ai/dakera 0.9.15 → 0.10.1
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/dist/index.d.mts +70 -18
- package/dist/index.d.ts +70 -18
- package/dist/index.js +18 -1
- package/dist/index.mjs +18 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -463,12 +463,16 @@ interface RecallResponse {
|
|
|
463
463
|
/** COG-2 / KG-3: KG associated memories at configurable depth (only present when include_associated was true) */
|
|
464
464
|
associated_memories?: RecalledMemory[];
|
|
465
465
|
}
|
|
466
|
-
/** Response from storing a memory
|
|
466
|
+
/** Response from storing a memory.
|
|
467
|
+
*
|
|
468
|
+
* The server wraps the created memory in a nested `memory` object:
|
|
469
|
+
* `{"memory": {"id": "...", "agent_id": "...", ...}, "embedding_time_ms": N}`.
|
|
470
|
+
*/
|
|
467
471
|
interface StoreMemoryResponse {
|
|
468
|
-
/**
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
|
|
472
|
+
/** The stored memory object */
|
|
473
|
+
memory: Memory;
|
|
474
|
+
/** Embedding latency in milliseconds */
|
|
475
|
+
embedding_time_ms?: number;
|
|
472
476
|
}
|
|
473
477
|
/** Request to update a memory */
|
|
474
478
|
interface UpdateMemoryRequest {
|
|
@@ -480,6 +484,13 @@ interface UpdateMemoryRequest {
|
|
|
480
484
|
memory_type?: MemoryType;
|
|
481
485
|
}
|
|
482
486
|
/** Request to recall memories */
|
|
487
|
+
/**
|
|
488
|
+
* Retrieval routing mode for recall and search (CE-10).
|
|
489
|
+
*
|
|
490
|
+
* Controls which retrieval index the server uses. `"auto"` (default) lets the
|
|
491
|
+
* server pick the best strategy based on the query.
|
|
492
|
+
*/
|
|
493
|
+
type RoutingMode = 'auto' | 'vector' | 'bm25' | 'hybrid';
|
|
483
494
|
interface RecallRequest {
|
|
484
495
|
/** Natural language query */
|
|
485
496
|
query: string;
|
|
@@ -497,6 +508,8 @@ interface RecallRequest {
|
|
|
497
508
|
associated_memories_depth?: number;
|
|
498
509
|
/** KG-3: minimum edge weight for KG traversal (default: 0.0) */
|
|
499
510
|
associated_memories_min_weight?: number;
|
|
511
|
+
/** CE-10: retrieval routing mode. Default: `"auto"` (server picks best strategy). */
|
|
512
|
+
routing?: RoutingMode;
|
|
500
513
|
}
|
|
501
514
|
/** Request to update importance */
|
|
502
515
|
interface UpdateImportanceRequest {
|
|
@@ -518,12 +531,12 @@ interface ConsolidateRequest {
|
|
|
518
531
|
}
|
|
519
532
|
/** Response from consolidation */
|
|
520
533
|
interface ConsolidateResponse {
|
|
521
|
-
/** Number of memories
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
|
|
534
|
+
/** Number of source memories removed during consolidation */
|
|
535
|
+
memories_removed: number;
|
|
536
|
+
/** IDs of the source memories that were consolidated */
|
|
537
|
+
source_memory_ids: MemoryId[];
|
|
538
|
+
/** The resulting consolidated memory (if any) */
|
|
539
|
+
consolidated_memory?: Memory;
|
|
527
540
|
/** Step-by-step consolidation log (CE-6) */
|
|
528
541
|
log?: ConsolidationLogEntry[];
|
|
529
542
|
}
|
|
@@ -641,6 +654,24 @@ interface WakeUpResponse {
|
|
|
641
654
|
/** Total memories available before top_n cap was applied */
|
|
642
655
|
total_available: number;
|
|
643
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* Response from `POST /v1/agents/{id}/compress` (CE-12).
|
|
659
|
+
*
|
|
660
|
+
* Contains compression statistics for the agent's memory namespace after the
|
|
661
|
+
* server runs the compression pass.
|
|
662
|
+
*/
|
|
663
|
+
interface CompressResponse {
|
|
664
|
+
/** The agent whose namespace was compressed */
|
|
665
|
+
agent_id: AgentId;
|
|
666
|
+
/** Number of memories before compression */
|
|
667
|
+
memories_before: number;
|
|
668
|
+
/** Number of memories after compression */
|
|
669
|
+
memories_after: number;
|
|
670
|
+
/** Number of memories removed during compression */
|
|
671
|
+
removed_count: number;
|
|
672
|
+
/** Wall-clock duration of the compression pass in milliseconds */
|
|
673
|
+
duration_ms?: number;
|
|
674
|
+
}
|
|
644
675
|
/** Request to build a knowledge graph */
|
|
645
676
|
interface KnowledgeGraphRequest {
|
|
646
677
|
agent_id: AgentId;
|
|
@@ -1741,6 +1772,21 @@ interface MemoryPolicy {
|
|
|
1741
1772
|
rate_limit_stores_per_minute?: number;
|
|
1742
1773
|
/** Max recall operations per minute for this namespace. `undefined` = unlimited (default). */
|
|
1743
1774
|
rate_limit_recalls_per_minute?: number;
|
|
1775
|
+
/**
|
|
1776
|
+
* Deduplicate against existing memories at store time (CE-10, default: `false`).
|
|
1777
|
+
*
|
|
1778
|
+
* When `true` the server computes a similarity check before persisting a new
|
|
1779
|
+
* memory and drops it if a near-duplicate already exists (threshold controlled
|
|
1780
|
+
* by `dedup_threshold`).
|
|
1781
|
+
*/
|
|
1782
|
+
dedup_on_store?: boolean;
|
|
1783
|
+
/**
|
|
1784
|
+
* Cosine-similarity threshold for store-time deduplication (default: `0.92`).
|
|
1785
|
+
*
|
|
1786
|
+
* Memories with similarity ≥ this value are considered duplicates and the
|
|
1787
|
+
* incoming memory is dropped. Only active when `dedup_on_store` is `true`.
|
|
1788
|
+
*/
|
|
1789
|
+
dedup_threshold?: number;
|
|
1744
1790
|
}
|
|
1745
1791
|
/**
|
|
1746
1792
|
* Point-in-time product KPI snapshot returned by `GET /v1/kpis` (OBS-2).
|
|
@@ -1769,12 +1815,6 @@ interface KpiSnapshot {
|
|
|
1769
1815
|
memory_retention_7d_pct: number;
|
|
1770
1816
|
}
|
|
1771
1817
|
|
|
1772
|
-
/**
|
|
1773
|
-
* Dakera Client
|
|
1774
|
-
*
|
|
1775
|
-
* Main client class for interacting with Dakera server.
|
|
1776
|
-
*/
|
|
1777
|
-
|
|
1778
1818
|
/**
|
|
1779
1819
|
* Dakera client for interacting with the AI memory platform.
|
|
1780
1820
|
*
|
|
@@ -2314,6 +2354,7 @@ declare class DakeraClient {
|
|
|
2314
2354
|
associated_memories_min_weight?: number;
|
|
2315
2355
|
since?: string;
|
|
2316
2356
|
until?: string;
|
|
2357
|
+
routing?: RoutingMode;
|
|
2317
2358
|
}): Promise<RecallResponse>;
|
|
2318
2359
|
/** Get a specific memory */
|
|
2319
2360
|
getMemory(agentId: string, memoryId: string): Promise<Memory>;
|
|
@@ -2360,6 +2401,7 @@ declare class DakeraClient {
|
|
|
2360
2401
|
top_k?: number;
|
|
2361
2402
|
memory_type?: string;
|
|
2362
2403
|
min_importance?: number;
|
|
2404
|
+
routing?: RoutingMode;
|
|
2363
2405
|
}): Promise<RecalledMemory[]>;
|
|
2364
2406
|
/** Update importance of memories */
|
|
2365
2407
|
updateImportance(agentId: string, request: UpdateImportanceRequest): Promise<{
|
|
@@ -2517,6 +2559,16 @@ declare class DakeraClient {
|
|
|
2517
2559
|
* @param options - Optional `top_n` (default 20, max 100) and `min_importance` (default 0.0).
|
|
2518
2560
|
*/
|
|
2519
2561
|
getWakeUpContext(agentId: string, options?: WakeUpOptions): Promise<WakeUpResponse>;
|
|
2562
|
+
/**
|
|
2563
|
+
* Compress the memory namespace for an agent (CE-12).
|
|
2564
|
+
*
|
|
2565
|
+
* Runs a server-side compression pass that removes low-value or redundant
|
|
2566
|
+
* memories, returning statistics about the operation.
|
|
2567
|
+
*
|
|
2568
|
+
* @param agentId - Agent whose namespace to compress.
|
|
2569
|
+
* @returns {@link CompressResponse} with before/after counts and timing.
|
|
2570
|
+
*/
|
|
2571
|
+
compressAgent(agentId: string): Promise<CompressResponse>;
|
|
2520
2572
|
/** Build a knowledge graph from a seed memory */
|
|
2521
2573
|
knowledgeGraph(request: KnowledgeGraphRequest): Promise<KnowledgeGraphResponse>;
|
|
2522
2574
|
/** Build a full knowledge graph for an agent */
|
|
@@ -3030,4 +3082,4 @@ declare class TimeoutError extends DakeraError {
|
|
|
3030
3082
|
constructor(message: string);
|
|
3031
3083
|
}
|
|
3032
3084
|
|
|
3033
|
-
export { type AccessPatternHint, type AgentFeedbackSummary, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, type AuditEvent, type AuditExportResponse, type AuditListResponse, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationConfig, type ConsolidationLogEntry, type ConsolidationResultSnapshot, type CreateKeyRequest, type CreateNamespaceKeyResponse, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DecayConfigResponse, type DecayConfigUpdateRequest, type DecayConfigUpdateResponse, type DecayStatsResponse, type DecayStrategyName, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EdgeType, type EmbeddingModel, type EntityExtractionResponse, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type ExtractEntitiesRequest, type ExtractEntitiesResponse, type ExtractedEntity, type ExtractionProviderInfo, type ExtractionResult, type FeedbackHealthResponse, type FeedbackHistoryEntry, type FeedbackHistoryResponse, type FeedbackResponse, type FeedbackSignal, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type GraphEdge, type GraphExport, type GraphLinkResponse, type GraphNode, type GraphPath, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KgExportResponse, type KgPathResponse, type KgQueryResponse, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type KpiSnapshot, type LastDecayCycleStats, type LatencyAnalytics, type ListNamespaceKeysResponse, type ListSessionsOptions, type Memory, type MemoryEntitiesResponse, type MemoryEvent, type MemoryExportResponse, type MemoryFeedbackBodyRequest, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryGraph, type MemoryGraphOptions, type MemoryId, type MemoryImportResponse, type MemoryImportancePatchRequest, type MemoryPolicy, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, type NamespaceKeyInfo, type NamespaceKeyUsageResponse, type NamespaceNerConfig, NotFoundError, type OdeEntity, type OpStatus, type OperationProgressEvent, type OpsStats, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecallResponse, type RecalledMemory, type RetryConfig, type RotateEncryptionKeyRequest, type RotateEncryptionKeyResponse, type SearchResult, ServerError, type Session, type SessionEndResponse, type SessionId, type SessionStartResponse, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WakeUpOptions, type WakeUpResponse, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
|
|
3085
|
+
export { type AccessPatternHint, type AgentFeedbackSummary, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, type AuditEvent, type AuditExportResponse, type AuditListResponse, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type CompressResponse, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationConfig, type ConsolidationLogEntry, type ConsolidationResultSnapshot, type CreateKeyRequest, type CreateNamespaceKeyResponse, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DecayConfigResponse, type DecayConfigUpdateRequest, type DecayConfigUpdateResponse, type DecayStatsResponse, type DecayStrategyName, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EdgeType, type EmbeddingModel, type EntityExtractionResponse, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type ExtractEntitiesRequest, type ExtractEntitiesResponse, type ExtractedEntity, type ExtractionProviderInfo, type ExtractionResult, type FeedbackHealthResponse, type FeedbackHistoryEntry, type FeedbackHistoryResponse, type FeedbackResponse, type FeedbackSignal, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type GraphEdge, type GraphExport, type GraphLinkResponse, type GraphNode, type GraphPath, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KgExportResponse, type KgPathResponse, type KgQueryResponse, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type KpiSnapshot, type LastDecayCycleStats, type LatencyAnalytics, type ListNamespaceKeysResponse, type ListSessionsOptions, type Memory, type MemoryEntitiesResponse, type MemoryEvent, type MemoryExportResponse, type MemoryFeedbackBodyRequest, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryGraph, type MemoryGraphOptions, type MemoryId, type MemoryImportResponse, type MemoryImportancePatchRequest, type MemoryPolicy, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, type NamespaceKeyInfo, type NamespaceKeyUsageResponse, type NamespaceNerConfig, NotFoundError, type OdeEntity, type OpStatus, type OperationProgressEvent, type OpsStats, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecallResponse, type RecalledMemory, type RetryConfig, type RotateEncryptionKeyRequest, type RotateEncryptionKeyResponse, type RoutingMode, type SearchResult, ServerError, type Session, type SessionEndResponse, type SessionId, type SessionStartResponse, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WakeUpOptions, type WakeUpResponse, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
|
package/dist/index.d.ts
CHANGED
|
@@ -463,12 +463,16 @@ interface RecallResponse {
|
|
|
463
463
|
/** COG-2 / KG-3: KG associated memories at configurable depth (only present when include_associated was true) */
|
|
464
464
|
associated_memories?: RecalledMemory[];
|
|
465
465
|
}
|
|
466
|
-
/** Response from storing a memory
|
|
466
|
+
/** Response from storing a memory.
|
|
467
|
+
*
|
|
468
|
+
* The server wraps the created memory in a nested `memory` object:
|
|
469
|
+
* `{"memory": {"id": "...", "agent_id": "...", ...}, "embedding_time_ms": N}`.
|
|
470
|
+
*/
|
|
467
471
|
interface StoreMemoryResponse {
|
|
468
|
-
/**
|
|
469
|
-
|
|
470
|
-
/**
|
|
471
|
-
|
|
472
|
+
/** The stored memory object */
|
|
473
|
+
memory: Memory;
|
|
474
|
+
/** Embedding latency in milliseconds */
|
|
475
|
+
embedding_time_ms?: number;
|
|
472
476
|
}
|
|
473
477
|
/** Request to update a memory */
|
|
474
478
|
interface UpdateMemoryRequest {
|
|
@@ -480,6 +484,13 @@ interface UpdateMemoryRequest {
|
|
|
480
484
|
memory_type?: MemoryType;
|
|
481
485
|
}
|
|
482
486
|
/** Request to recall memories */
|
|
487
|
+
/**
|
|
488
|
+
* Retrieval routing mode for recall and search (CE-10).
|
|
489
|
+
*
|
|
490
|
+
* Controls which retrieval index the server uses. `"auto"` (default) lets the
|
|
491
|
+
* server pick the best strategy based on the query.
|
|
492
|
+
*/
|
|
493
|
+
type RoutingMode = 'auto' | 'vector' | 'bm25' | 'hybrid';
|
|
483
494
|
interface RecallRequest {
|
|
484
495
|
/** Natural language query */
|
|
485
496
|
query: string;
|
|
@@ -497,6 +508,8 @@ interface RecallRequest {
|
|
|
497
508
|
associated_memories_depth?: number;
|
|
498
509
|
/** KG-3: minimum edge weight for KG traversal (default: 0.0) */
|
|
499
510
|
associated_memories_min_weight?: number;
|
|
511
|
+
/** CE-10: retrieval routing mode. Default: `"auto"` (server picks best strategy). */
|
|
512
|
+
routing?: RoutingMode;
|
|
500
513
|
}
|
|
501
514
|
/** Request to update importance */
|
|
502
515
|
interface UpdateImportanceRequest {
|
|
@@ -518,12 +531,12 @@ interface ConsolidateRequest {
|
|
|
518
531
|
}
|
|
519
532
|
/** Response from consolidation */
|
|
520
533
|
interface ConsolidateResponse {
|
|
521
|
-
/** Number of memories
|
|
522
|
-
|
|
523
|
-
/**
|
|
524
|
-
|
|
525
|
-
/**
|
|
526
|
-
|
|
534
|
+
/** Number of source memories removed during consolidation */
|
|
535
|
+
memories_removed: number;
|
|
536
|
+
/** IDs of the source memories that were consolidated */
|
|
537
|
+
source_memory_ids: MemoryId[];
|
|
538
|
+
/** The resulting consolidated memory (if any) */
|
|
539
|
+
consolidated_memory?: Memory;
|
|
527
540
|
/** Step-by-step consolidation log (CE-6) */
|
|
528
541
|
log?: ConsolidationLogEntry[];
|
|
529
542
|
}
|
|
@@ -641,6 +654,24 @@ interface WakeUpResponse {
|
|
|
641
654
|
/** Total memories available before top_n cap was applied */
|
|
642
655
|
total_available: number;
|
|
643
656
|
}
|
|
657
|
+
/**
|
|
658
|
+
* Response from `POST /v1/agents/{id}/compress` (CE-12).
|
|
659
|
+
*
|
|
660
|
+
* Contains compression statistics for the agent's memory namespace after the
|
|
661
|
+
* server runs the compression pass.
|
|
662
|
+
*/
|
|
663
|
+
interface CompressResponse {
|
|
664
|
+
/** The agent whose namespace was compressed */
|
|
665
|
+
agent_id: AgentId;
|
|
666
|
+
/** Number of memories before compression */
|
|
667
|
+
memories_before: number;
|
|
668
|
+
/** Number of memories after compression */
|
|
669
|
+
memories_after: number;
|
|
670
|
+
/** Number of memories removed during compression */
|
|
671
|
+
removed_count: number;
|
|
672
|
+
/** Wall-clock duration of the compression pass in milliseconds */
|
|
673
|
+
duration_ms?: number;
|
|
674
|
+
}
|
|
644
675
|
/** Request to build a knowledge graph */
|
|
645
676
|
interface KnowledgeGraphRequest {
|
|
646
677
|
agent_id: AgentId;
|
|
@@ -1741,6 +1772,21 @@ interface MemoryPolicy {
|
|
|
1741
1772
|
rate_limit_stores_per_minute?: number;
|
|
1742
1773
|
/** Max recall operations per minute for this namespace. `undefined` = unlimited (default). */
|
|
1743
1774
|
rate_limit_recalls_per_minute?: number;
|
|
1775
|
+
/**
|
|
1776
|
+
* Deduplicate against existing memories at store time (CE-10, default: `false`).
|
|
1777
|
+
*
|
|
1778
|
+
* When `true` the server computes a similarity check before persisting a new
|
|
1779
|
+
* memory and drops it if a near-duplicate already exists (threshold controlled
|
|
1780
|
+
* by `dedup_threshold`).
|
|
1781
|
+
*/
|
|
1782
|
+
dedup_on_store?: boolean;
|
|
1783
|
+
/**
|
|
1784
|
+
* Cosine-similarity threshold for store-time deduplication (default: `0.92`).
|
|
1785
|
+
*
|
|
1786
|
+
* Memories with similarity ≥ this value are considered duplicates and the
|
|
1787
|
+
* incoming memory is dropped. Only active when `dedup_on_store` is `true`.
|
|
1788
|
+
*/
|
|
1789
|
+
dedup_threshold?: number;
|
|
1744
1790
|
}
|
|
1745
1791
|
/**
|
|
1746
1792
|
* Point-in-time product KPI snapshot returned by `GET /v1/kpis` (OBS-2).
|
|
@@ -1769,12 +1815,6 @@ interface KpiSnapshot {
|
|
|
1769
1815
|
memory_retention_7d_pct: number;
|
|
1770
1816
|
}
|
|
1771
1817
|
|
|
1772
|
-
/**
|
|
1773
|
-
* Dakera Client
|
|
1774
|
-
*
|
|
1775
|
-
* Main client class for interacting with Dakera server.
|
|
1776
|
-
*/
|
|
1777
|
-
|
|
1778
1818
|
/**
|
|
1779
1819
|
* Dakera client for interacting with the AI memory platform.
|
|
1780
1820
|
*
|
|
@@ -2314,6 +2354,7 @@ declare class DakeraClient {
|
|
|
2314
2354
|
associated_memories_min_weight?: number;
|
|
2315
2355
|
since?: string;
|
|
2316
2356
|
until?: string;
|
|
2357
|
+
routing?: RoutingMode;
|
|
2317
2358
|
}): Promise<RecallResponse>;
|
|
2318
2359
|
/** Get a specific memory */
|
|
2319
2360
|
getMemory(agentId: string, memoryId: string): Promise<Memory>;
|
|
@@ -2360,6 +2401,7 @@ declare class DakeraClient {
|
|
|
2360
2401
|
top_k?: number;
|
|
2361
2402
|
memory_type?: string;
|
|
2362
2403
|
min_importance?: number;
|
|
2404
|
+
routing?: RoutingMode;
|
|
2363
2405
|
}): Promise<RecalledMemory[]>;
|
|
2364
2406
|
/** Update importance of memories */
|
|
2365
2407
|
updateImportance(agentId: string, request: UpdateImportanceRequest): Promise<{
|
|
@@ -2517,6 +2559,16 @@ declare class DakeraClient {
|
|
|
2517
2559
|
* @param options - Optional `top_n` (default 20, max 100) and `min_importance` (default 0.0).
|
|
2518
2560
|
*/
|
|
2519
2561
|
getWakeUpContext(agentId: string, options?: WakeUpOptions): Promise<WakeUpResponse>;
|
|
2562
|
+
/**
|
|
2563
|
+
* Compress the memory namespace for an agent (CE-12).
|
|
2564
|
+
*
|
|
2565
|
+
* Runs a server-side compression pass that removes low-value or redundant
|
|
2566
|
+
* memories, returning statistics about the operation.
|
|
2567
|
+
*
|
|
2568
|
+
* @param agentId - Agent whose namespace to compress.
|
|
2569
|
+
* @returns {@link CompressResponse} with before/after counts and timing.
|
|
2570
|
+
*/
|
|
2571
|
+
compressAgent(agentId: string): Promise<CompressResponse>;
|
|
2520
2572
|
/** Build a knowledge graph from a seed memory */
|
|
2521
2573
|
knowledgeGraph(request: KnowledgeGraphRequest): Promise<KnowledgeGraphResponse>;
|
|
2522
2574
|
/** Build a full knowledge graph for an agent */
|
|
@@ -3030,4 +3082,4 @@ declare class TimeoutError extends DakeraError {
|
|
|
3030
3082
|
constructor(message: string);
|
|
3031
3083
|
}
|
|
3032
3084
|
|
|
3033
|
-
export { type AccessPatternHint, type AgentFeedbackSummary, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, type AuditEvent, type AuditExportResponse, type AuditListResponse, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationConfig, type ConsolidationLogEntry, type ConsolidationResultSnapshot, type CreateKeyRequest, type CreateNamespaceKeyResponse, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DecayConfigResponse, type DecayConfigUpdateRequest, type DecayConfigUpdateResponse, type DecayStatsResponse, type DecayStrategyName, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EdgeType, type EmbeddingModel, type EntityExtractionResponse, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type ExtractEntitiesRequest, type ExtractEntitiesResponse, type ExtractedEntity, type ExtractionProviderInfo, type ExtractionResult, type FeedbackHealthResponse, type FeedbackHistoryEntry, type FeedbackHistoryResponse, type FeedbackResponse, type FeedbackSignal, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type GraphEdge, type GraphExport, type GraphLinkResponse, type GraphNode, type GraphPath, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KgExportResponse, type KgPathResponse, type KgQueryResponse, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type KpiSnapshot, type LastDecayCycleStats, type LatencyAnalytics, type ListNamespaceKeysResponse, type ListSessionsOptions, type Memory, type MemoryEntitiesResponse, type MemoryEvent, type MemoryExportResponse, type MemoryFeedbackBodyRequest, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryGraph, type MemoryGraphOptions, type MemoryId, type MemoryImportResponse, type MemoryImportancePatchRequest, type MemoryPolicy, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, type NamespaceKeyInfo, type NamespaceKeyUsageResponse, type NamespaceNerConfig, NotFoundError, type OdeEntity, type OpStatus, type OperationProgressEvent, type OpsStats, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecallResponse, type RecalledMemory, type RetryConfig, type RotateEncryptionKeyRequest, type RotateEncryptionKeyResponse, type SearchResult, ServerError, type Session, type SessionEndResponse, type SessionId, type SessionStartResponse, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WakeUpOptions, type WakeUpResponse, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
|
|
3085
|
+
export { type AccessPatternHint, type AgentFeedbackSummary, type AgentId, type AgentNetworkEdge, type AgentNetworkInfo, type AgentNetworkNode, type AgentNetworkStats, type AgentStats, type AgentSummary, type AggregationGroup, type AggregationRequest, type AggregationResponse, type AnalyticsOptions, type AnalyticsOverview, type ApiKey, type AuditEvent, type AuditExportResponse, type AuditListResponse, AuthenticationError, AuthorizationError, type AutoPilotConfig, type AutoPilotConfigRequest, type AutoPilotConfigResponse, type AutoPilotConsolidationResult, type AutoPilotDedupResult, type AutoPilotStatusResponse, type AutoPilotTriggerAction, type AutoPilotTriggerResponse, type BackupInfo, type BatchForgetRequest, type BatchForgetResponse, type BatchMemoryFilter, type BatchQuerySpec, type BatchRecallRequest, type BatchRecallResponse, type BatchTextQueryOptions, type BatchTextQueryResponse, type Branded, type CacheStats, type ClientOptions, type ClusterNode, type ClusterStatus, type ColumnUpsertRequest, type CompressResponse, type ConfigureNamespaceRequest, type ConfigureNamespaceResponse, ConnectionError, type ConsolidateRequest, type ConsolidateResponse, type ConsolidationConfig, type ConsolidationLogEntry, type ConsolidationResultSnapshot, type CreateKeyRequest, type CreateNamespaceKeyResponse, type CrossAgentNetworkRequest, type CrossAgentNetworkResponse, DakeraClient, DakeraError, type DakeraEvent, type DecayConfigResponse, type DecayConfigUpdateRequest, type DecayConfigUpdateResponse, type DecayStatsResponse, type DecayStrategyName, type DedupResultSnapshot, type DeduplicateRequest, type DeduplicateResponse, type DeleteOptions, type DeleteResponse, type DistanceMetric, type Document, type DocumentInput, type EdgeType, type EmbeddingModel, type EntityExtractionResponse, ErrorCode, type ExportRequest, type ExportResponse, type ExportedVector, type ExtractEntitiesRequest, type ExtractEntitiesResponse, type ExtractedEntity, type ExtractionProviderInfo, type ExtractionResult, type FeedbackHealthResponse, type FeedbackHistoryEntry, type FeedbackHistoryResponse, type FeedbackResponse, type FeedbackSignal, type FilterExpression, type FilterOperators, type FullKnowledgeGraphRequest, type FullTextSearchResult, type GraphEdge, type GraphExport, type GraphLinkResponse, type GraphNode, type GraphPath, type HealthResponse, type HybridSearchResult, type IndexStats, type JobProgressEvent, type KeyUsage, type KgExportResponse, type KgPathResponse, type KgQueryResponse, type KnowledgeEdge, type KnowledgeGraphRequest, type KnowledgeGraphResponse, type KnowledgeNode, type KpiSnapshot, type LastDecayCycleStats, type LatencyAnalytics, type ListNamespaceKeysResponse, type ListSessionsOptions, type Memory, type MemoryEntitiesResponse, type MemoryEvent, type MemoryExportResponse, type MemoryFeedbackBodyRequest, type MemoryFeedbackRequest, type MemoryFeedbackResponse, type MemoryGraph, type MemoryGraphOptions, type MemoryId, type MemoryImportResponse, type MemoryImportancePatchRequest, type MemoryPolicy, type MemoryType, type MultiVectorSearchRequest, type MultiVectorSearchResponse, type MultiVectorSearchResult, type NamespaceCreatedEvent, type NamespaceDeletedEvent, type NamespaceInfo, type NamespaceKeyInfo, type NamespaceKeyUsageResponse, type NamespaceNerConfig, NotFoundError, type OdeEntity, type OpStatus, type OperationProgressEvent, type OpsStats, type QueryExplainRequest, type QueryExplainResponse, type QueryOptions, type QueryResult, RateLimitError, type RateLimitHeaders, type ReadConsistency, type RecallRequest, type RecallResponse, type RecalledMemory, type RetryConfig, type RotateEncryptionKeyRequest, type RotateEncryptionKeyResponse, type RoutingMode, type SearchResult, ServerError, type Session, type SessionEndResponse, type SessionId, type SessionStartResponse, type SlowQuery, type StalenessConfig, type StartSessionRequest, type StorageAnalytics, type StoreMemoryRequest, type StoreMemoryResponse, type StreamLaggedEvent, type SummarizeRequest, type SummarizeResponse, type TextDocument, type TextQueryOptions, type TextQueryResponse, type TextSearchResult, type TextUpsertOptions, type TextUpsertResponse, type ThroughputAnalytics, TimeoutError, type TtlConfig, type UnifiedQueryRequest, type UnifiedQueryResponse, type UnifiedSearchResult, type UpdateImportanceRequest, type UpdateMemoryRequest, type UpsertOptions, type UpsertResponse, ValidationError, type Vector, type VectorId, type VectorInput, type VectorMutationOp, type VectorsMutatedEvent, type WakeUpOptions, type WakeUpResponse, type WarmCacheRequest, type WarmCacheResponse, type WarmingPriority, type WarmingTargetTier, agentId, memoryId, sessionId, vectorId };
|
package/dist/index.js
CHANGED
|
@@ -1095,6 +1095,7 @@ var DakeraClient = class {
|
|
|
1095
1095
|
if (options?.associated_memories_min_weight !== void 0) body["associated_memories_min_weight"] = options.associated_memories_min_weight;
|
|
1096
1096
|
if (options?.since !== void 0) body["since"] = options.since;
|
|
1097
1097
|
if (options?.until !== void 0) body["until"] = options.until;
|
|
1098
|
+
if (options?.routing !== void 0) body["routing"] = options.routing;
|
|
1098
1099
|
return this.request("POST", `/v1/agents/${agentId2}/memories/recall`, body);
|
|
1099
1100
|
}
|
|
1100
1101
|
/** Get a specific memory */
|
|
@@ -1147,7 +1148,11 @@ var DakeraClient = class {
|
|
|
1147
1148
|
}
|
|
1148
1149
|
/** Search memories for an agent */
|
|
1149
1150
|
async searchMemories(agentId2, query, options) {
|
|
1150
|
-
const body = { query
|
|
1151
|
+
const body = { query };
|
|
1152
|
+
if (options?.top_k !== void 0) body["top_k"] = options.top_k;
|
|
1153
|
+
if (options?.memory_type !== void 0) body["memory_type"] = options.memory_type;
|
|
1154
|
+
if (options?.min_importance !== void 0) body["min_importance"] = options.min_importance;
|
|
1155
|
+
if (options?.routing !== void 0) body["routing"] = options.routing;
|
|
1151
1156
|
const result = await this.request("POST", `/v1/agents/${agentId2}/memories/search`, body);
|
|
1152
1157
|
return result.memories ?? result;
|
|
1153
1158
|
}
|
|
@@ -1400,6 +1405,18 @@ var DakeraClient = class {
|
|
|
1400
1405
|
const qs = params.toString();
|
|
1401
1406
|
return this.request("GET", `/v1/agents/${agentId2}/wake-up${qs ? `?${qs}` : ""}`);
|
|
1402
1407
|
}
|
|
1408
|
+
/**
|
|
1409
|
+
* Compress the memory namespace for an agent (CE-12).
|
|
1410
|
+
*
|
|
1411
|
+
* Runs a server-side compression pass that removes low-value or redundant
|
|
1412
|
+
* memories, returning statistics about the operation.
|
|
1413
|
+
*
|
|
1414
|
+
* @param agentId - Agent whose namespace to compress.
|
|
1415
|
+
* @returns {@link CompressResponse} with before/after counts and timing.
|
|
1416
|
+
*/
|
|
1417
|
+
async compressAgent(agentId2) {
|
|
1418
|
+
return this.request("POST", `/v1/agents/${agentId2}/compress`);
|
|
1419
|
+
}
|
|
1403
1420
|
// ===========================================================================
|
|
1404
1421
|
// Knowledge Graph Operations
|
|
1405
1422
|
// ===========================================================================
|
package/dist/index.mjs
CHANGED
|
@@ -1055,6 +1055,7 @@ var DakeraClient = class {
|
|
|
1055
1055
|
if (options?.associated_memories_min_weight !== void 0) body["associated_memories_min_weight"] = options.associated_memories_min_weight;
|
|
1056
1056
|
if (options?.since !== void 0) body["since"] = options.since;
|
|
1057
1057
|
if (options?.until !== void 0) body["until"] = options.until;
|
|
1058
|
+
if (options?.routing !== void 0) body["routing"] = options.routing;
|
|
1058
1059
|
return this.request("POST", `/v1/agents/${agentId2}/memories/recall`, body);
|
|
1059
1060
|
}
|
|
1060
1061
|
/** Get a specific memory */
|
|
@@ -1107,7 +1108,11 @@ var DakeraClient = class {
|
|
|
1107
1108
|
}
|
|
1108
1109
|
/** Search memories for an agent */
|
|
1109
1110
|
async searchMemories(agentId2, query, options) {
|
|
1110
|
-
const body = { query
|
|
1111
|
+
const body = { query };
|
|
1112
|
+
if (options?.top_k !== void 0) body["top_k"] = options.top_k;
|
|
1113
|
+
if (options?.memory_type !== void 0) body["memory_type"] = options.memory_type;
|
|
1114
|
+
if (options?.min_importance !== void 0) body["min_importance"] = options.min_importance;
|
|
1115
|
+
if (options?.routing !== void 0) body["routing"] = options.routing;
|
|
1111
1116
|
const result = await this.request("POST", `/v1/agents/${agentId2}/memories/search`, body);
|
|
1112
1117
|
return result.memories ?? result;
|
|
1113
1118
|
}
|
|
@@ -1360,6 +1365,18 @@ var DakeraClient = class {
|
|
|
1360
1365
|
const qs = params.toString();
|
|
1361
1366
|
return this.request("GET", `/v1/agents/${agentId2}/wake-up${qs ? `?${qs}` : ""}`);
|
|
1362
1367
|
}
|
|
1368
|
+
/**
|
|
1369
|
+
* Compress the memory namespace for an agent (CE-12).
|
|
1370
|
+
*
|
|
1371
|
+
* Runs a server-side compression pass that removes low-value or redundant
|
|
1372
|
+
* memories, returning statistics about the operation.
|
|
1373
|
+
*
|
|
1374
|
+
* @param agentId - Agent whose namespace to compress.
|
|
1375
|
+
* @returns {@link CompressResponse} with before/after counts and timing.
|
|
1376
|
+
*/
|
|
1377
|
+
async compressAgent(agentId2) {
|
|
1378
|
+
return this.request("POST", `/v1/agents/${agentId2}/compress`);
|
|
1379
|
+
}
|
|
1363
1380
|
// ===========================================================================
|
|
1364
1381
|
// Knowledge Graph Operations
|
|
1365
1382
|
// ===========================================================================
|