@xache/langchain 0.5.0 → 0.7.0
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/README.md +60 -57
- package/dist/index.d.mts +114 -1
- package/dist/index.d.ts +114 -1
- package/dist/index.js +261 -0
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +251 -0
- package/dist/index.mjs.map +1 -1
- package/package.json +2 -2
- package/src/ephemeral.ts +268 -0
- package/src/index.ts +22 -0
- package/src/probe.ts +122 -0
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# @xache/langchain
|
|
2
2
|
|
|
3
|
-
LangChain.js integration for [Xache Protocol](https://xache.xyz) - verifiable AI agent memory with cryptographic receipts, collective intelligence, and portable ERC-8004 reputation.
|
|
3
|
+
LangChain.js integration for [Xache Protocol](https://xache.xyz) - verifiable AI agent memory with cryptographic receipts, collective intelligence, ephemeral working memory, knowledge graph, and portable ERC-8004 reputation.
|
|
4
4
|
|
|
5
5
|
## Installation
|
|
6
6
|
|
|
@@ -40,8 +40,8 @@ import { XacheMemory } from '@xache/langchain';
|
|
|
40
40
|
const memory = new XacheMemory({
|
|
41
41
|
walletAddress: '0xYourWallet',
|
|
42
42
|
privateKey: '0xYourPrivateKey',
|
|
43
|
-
apiUrl: 'https://api.xache.xyz',
|
|
44
|
-
chain: 'base',
|
|
43
|
+
apiUrl: 'https://api.xache.xyz',
|
|
44
|
+
chain: 'base',
|
|
45
45
|
});
|
|
46
46
|
```
|
|
47
47
|
|
|
@@ -56,7 +56,7 @@ import { RetrievalQAChain } from 'langchain/chains';
|
|
|
56
56
|
const retriever = new XacheRetriever({
|
|
57
57
|
walletAddress: '0x...',
|
|
58
58
|
privateKey: '0x...',
|
|
59
|
-
k: 5,
|
|
59
|
+
k: 5,
|
|
60
60
|
});
|
|
61
61
|
|
|
62
62
|
const qa = RetrievalQAChain.fromLLM(llm, retriever);
|
|
@@ -64,15 +64,12 @@ const qa = RetrievalQAChain.fromLLM(llm, retriever);
|
|
|
64
64
|
|
|
65
65
|
### Collective Intelligence
|
|
66
66
|
|
|
67
|
-
Query and contribute to shared knowledge:
|
|
68
|
-
|
|
69
67
|
```typescript
|
|
70
68
|
import {
|
|
71
69
|
createCollectiveContributeTool,
|
|
72
70
|
createCollectiveQueryTool,
|
|
73
71
|
} from '@xache/langchain';
|
|
74
72
|
|
|
75
|
-
// Add to your agent's tools
|
|
76
73
|
const contributeTool = createCollectiveContributeTool({
|
|
77
74
|
walletAddress: '0x...',
|
|
78
75
|
privateKey: '0x...',
|
|
@@ -82,34 +79,28 @@ const queryTool = createCollectiveQueryTool({
|
|
|
82
79
|
walletAddress: '0x...',
|
|
83
80
|
privateKey: '0x...',
|
|
84
81
|
});
|
|
85
|
-
|
|
86
|
-
const tools = [contributeTool, queryTool];
|
|
87
82
|
```
|
|
88
83
|
|
|
89
84
|
### Memory Extraction
|
|
90
85
|
|
|
91
|
-
Auto-extract memories from conversations:
|
|
92
|
-
|
|
93
86
|
```typescript
|
|
94
87
|
import { XacheExtractor } from '@xache/langchain';
|
|
95
88
|
|
|
96
89
|
const extractor = new XacheExtractor({
|
|
97
90
|
walletAddress: '0x...',
|
|
98
91
|
privateKey: '0x...',
|
|
99
|
-
mode: 'xache-managed',
|
|
92
|
+
mode: 'xache-managed',
|
|
100
93
|
});
|
|
101
94
|
|
|
102
95
|
const result = await extractor.extract(
|
|
103
96
|
'User asked about quantum computing...',
|
|
104
97
|
{ autoStore: true }
|
|
105
98
|
);
|
|
106
|
-
|
|
107
|
-
console.log(`Extracted ${result.count} memories`);
|
|
108
99
|
```
|
|
109
100
|
|
|
110
101
|
### Knowledge Graph
|
|
111
102
|
|
|
112
|
-
Build and query a privacy-preserving knowledge graph
|
|
103
|
+
Build and query a privacy-preserving knowledge graph:
|
|
113
104
|
|
|
114
105
|
```typescript
|
|
115
106
|
import {
|
|
@@ -131,67 +122,81 @@ const config = {
|
|
|
131
122
|
llmApiKey: 'sk-ant-...',
|
|
132
123
|
};
|
|
133
124
|
|
|
134
|
-
// Extract entities from text
|
|
135
125
|
const extractTool = createGraphExtractTool(config);
|
|
136
|
-
|
|
137
|
-
// Query graph around an entity
|
|
138
126
|
const queryTool = createGraphQueryTool(config);
|
|
139
|
-
|
|
140
|
-
// Ask natural language questions
|
|
141
127
|
const askTool = createGraphAskTool(config);
|
|
142
|
-
|
|
143
|
-
// Load the full graph
|
|
144
128
|
const loadTool = createGraphLoadTool(config);
|
|
145
129
|
|
|
146
|
-
//
|
|
147
|
-
const addEntityTool = createGraphAddEntityTool(config);
|
|
148
|
-
const addRelTool = createGraphAddRelationshipTool(config);
|
|
149
|
-
|
|
150
|
-
// Merge duplicate entities
|
|
151
|
-
const mergeTool = createGraphMergeEntitiesTool(config);
|
|
152
|
-
|
|
153
|
-
// View entity version history
|
|
154
|
-
const historyTool = createGraphEntityHistoryTool(config);
|
|
155
|
-
|
|
156
|
-
// Use as a retriever for RAG
|
|
130
|
+
// Use graph as a retriever for RAG
|
|
157
131
|
const graphRetriever = new XacheGraphRetriever({
|
|
158
132
|
walletAddress: '0x...',
|
|
159
133
|
privateKey: '0x...',
|
|
160
134
|
k: 10,
|
|
161
135
|
});
|
|
136
|
+
```
|
|
137
|
+
|
|
138
|
+
### Ephemeral Context (Working Memory)
|
|
162
139
|
|
|
163
|
-
|
|
140
|
+
Short-lived scratch sessions for multi-turn workflows with 6 named slots (`conversation`, `facts`, `tasks`, `cache`, `scratch`, `handoff`):
|
|
141
|
+
|
|
142
|
+
```typescript
|
|
143
|
+
import {
|
|
144
|
+
createEphemeralCreateSessionTool,
|
|
145
|
+
createEphemeralWriteSlotTool,
|
|
146
|
+
createEphemeralReadSlotTool,
|
|
147
|
+
createEphemeralPromoteTool,
|
|
148
|
+
createEphemeralStatusTool,
|
|
149
|
+
} from '@xache/langchain';
|
|
150
|
+
|
|
151
|
+
const config = {
|
|
152
|
+
walletAddress: '0x...',
|
|
153
|
+
privateKey: '0x...',
|
|
154
|
+
};
|
|
155
|
+
|
|
156
|
+
// Create tools for your agent
|
|
157
|
+
const createSessionTool = createEphemeralCreateSessionTool(config);
|
|
158
|
+
const writeSlotTool = createEphemeralWriteSlotTool(config);
|
|
159
|
+
const readSlotTool = createEphemeralReadSlotTool(config);
|
|
160
|
+
const promoteTool = createEphemeralPromoteTool(config);
|
|
161
|
+
const statusTool = createEphemeralStatusTool(config);
|
|
162
|
+
|
|
163
|
+
// Add to agent's toolkit
|
|
164
|
+
const tools = [createSessionTool, writeSlotTool, readSlotTool, promoteTool, statusTool];
|
|
164
165
|
```
|
|
165
166
|
|
|
166
|
-
|
|
167
|
+
Or use class-based wrappers:
|
|
167
168
|
|
|
168
|
-
|
|
169
|
+
```typescript
|
|
170
|
+
import {
|
|
171
|
+
XacheEphemeralCreateSessionTool,
|
|
172
|
+
XacheEphemeralWriteSlotTool,
|
|
173
|
+
XacheEphemeralReadSlotTool,
|
|
174
|
+
XacheEphemeralPromoteTool,
|
|
175
|
+
XacheEphemeralStatusTool,
|
|
176
|
+
} from '@xache/langchain';
|
|
177
|
+
|
|
178
|
+
const createSession = new XacheEphemeralCreateSessionTool(config);
|
|
179
|
+
const tool = createSession.asTool();
|
|
180
|
+
```
|
|
181
|
+
|
|
182
|
+
### Reputation
|
|
169
183
|
|
|
170
184
|
```typescript
|
|
171
185
|
import { createReputationTool, XacheReputationChecker } from '@xache/langchain';
|
|
172
186
|
|
|
173
|
-
// As a tool for your agent
|
|
174
187
|
const repTool = createReputationTool({
|
|
175
188
|
walletAddress: '0x...',
|
|
176
189
|
privateKey: '0x...',
|
|
177
190
|
});
|
|
178
191
|
|
|
179
|
-
// Or check other agents
|
|
180
192
|
const checker = new XacheReputationChecker({
|
|
181
193
|
walletAddress: '0x...',
|
|
182
194
|
privateKey: '0x...',
|
|
183
195
|
});
|
|
184
|
-
|
|
185
|
-
const otherRep = await checker.check('did:agent:evm:0xOtherAgent...');
|
|
186
|
-
if (otherRep.score >= 0.5) {
|
|
187
|
-
console.log('Agent is trustworthy');
|
|
188
|
-
}
|
|
189
196
|
```
|
|
190
197
|
|
|
191
198
|
## Chat History
|
|
192
199
|
|
|
193
|
-
For more control over message history:
|
|
194
|
-
|
|
195
200
|
```typescript
|
|
196
201
|
import { XacheChatMessageHistory } from '@xache/langchain';
|
|
197
202
|
import { BufferMemory } from 'langchain/memory';
|
|
@@ -209,19 +214,17 @@ const memory = new BufferMemory({ chatHistory: history });
|
|
|
209
214
|
|
|
210
215
|
All operations use x402 micropayments (auto-handled):
|
|
211
216
|
|
|
212
|
-
| Operation
|
|
213
|
-
|
|
214
|
-
| Memory Store
|
|
215
|
-
| Memory Retrieve
|
|
216
|
-
| Collective Contribute| $0.002 |
|
|
217
|
-
| Collective Query
|
|
217
|
+
| Operation | Price |
|
|
218
|
+
|-----------|-------|
|
|
219
|
+
| Memory Store | $0.002 |
|
|
220
|
+
| Memory Retrieve | $0.003 |
|
|
221
|
+
| Collective Contribute | $0.002 |
|
|
222
|
+
| Collective Query | $0.011 |
|
|
223
|
+
| Ephemeral Session | $0.005 |
|
|
224
|
+
| Ephemeral Promote | $0.05 |
|
|
218
225
|
| Extraction (managed) | $0.011 |
|
|
219
|
-
| Graph Operations
|
|
220
|
-
| Graph Ask (managed)
|
|
221
|
-
|
|
222
|
-
## ERC-8004 Portable Reputation
|
|
223
|
-
|
|
224
|
-
Xache supports [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) for portable, on-chain reputation. Enable it to make your agent's reputation verifiable across platforms.
|
|
226
|
+
| Graph Operations | $0.002 |
|
|
227
|
+
| Graph Ask (managed) | $0.011 |
|
|
225
228
|
|
|
226
229
|
## Resources
|
|
227
230
|
|
package/dist/index.d.mts
CHANGED
|
@@ -682,4 +682,117 @@ declare class XacheGraphRetriever extends BaseRetriever {
|
|
|
682
682
|
_getRelevantDocuments(query: string, _runManager?: CallbackManagerForRetrieverRun): Promise<Document[]>;
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
-
|
|
685
|
+
/**
|
|
686
|
+
* Xache Memory Probe for LangChain.js
|
|
687
|
+
* Zero-knowledge semantic memory search using cognitive fingerprints
|
|
688
|
+
*/
|
|
689
|
+
|
|
690
|
+
interface ProbeToolConfig {
|
|
691
|
+
/** Wallet address for authentication */
|
|
692
|
+
walletAddress: string;
|
|
693
|
+
/** Private key for signing (optional if signer or walletProvider is provided) */
|
|
694
|
+
privateKey?: string;
|
|
695
|
+
/** External signer (alternative to privateKey) */
|
|
696
|
+
signer?: XacheSigner;
|
|
697
|
+
/** Wallet provider for lazy signer resolution */
|
|
698
|
+
walletProvider?: XacheWalletProvider;
|
|
699
|
+
/** Encryption key for use with external signers */
|
|
700
|
+
encryptionKey?: string;
|
|
701
|
+
/** API URL (defaults to https://api.xache.xyz) */
|
|
702
|
+
apiUrl?: string;
|
|
703
|
+
/** Chain: 'base' or 'solana' */
|
|
704
|
+
chain?: 'base' | 'solana';
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Create a tool for probing memory using cognitive fingerprints.
|
|
708
|
+
*
|
|
709
|
+
* @example
|
|
710
|
+
* ```typescript
|
|
711
|
+
* import { createMemoryProbeTool } from '@xache/langchain';
|
|
712
|
+
*
|
|
713
|
+
* const probeTool = createMemoryProbeTool({
|
|
714
|
+
* walletAddress: '0x...',
|
|
715
|
+
* privateKey: '0x...',
|
|
716
|
+
* });
|
|
717
|
+
*
|
|
718
|
+
* const tools = [probeTool, ...];
|
|
719
|
+
* ```
|
|
720
|
+
*/
|
|
721
|
+
declare function createMemoryProbeTool(config: ProbeToolConfig): DynamicStructuredTool;
|
|
722
|
+
/**
|
|
723
|
+
* Class-based memory probe tool (alternative API)
|
|
724
|
+
*/
|
|
725
|
+
declare class XacheMemoryProbeTool {
|
|
726
|
+
private tool;
|
|
727
|
+
constructor(config: ProbeToolConfig);
|
|
728
|
+
asTool(): DynamicStructuredTool;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Xache Ephemeral Context for LangChain.js
|
|
733
|
+
* Create, manage, and promote short-lived working memory sessions
|
|
734
|
+
*/
|
|
735
|
+
|
|
736
|
+
interface EphemeralToolConfig {
|
|
737
|
+
/** Wallet address for authentication */
|
|
738
|
+
walletAddress: string;
|
|
739
|
+
/** Private key for signing (optional if signer or walletProvider is provided) */
|
|
740
|
+
privateKey?: string;
|
|
741
|
+
/** External signer (alternative to privateKey) */
|
|
742
|
+
signer?: XacheSigner;
|
|
743
|
+
/** Wallet provider for lazy signer resolution */
|
|
744
|
+
walletProvider?: XacheWalletProvider;
|
|
745
|
+
/** Encryption key for use with external signers */
|
|
746
|
+
encryptionKey?: string;
|
|
747
|
+
/** API URL (defaults to https://api.xache.xyz) */
|
|
748
|
+
apiUrl?: string;
|
|
749
|
+
/** Chain: 'base' or 'solana' */
|
|
750
|
+
chain?: 'base' | 'solana';
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Create a tool for creating an ephemeral working memory session.
|
|
754
|
+
*/
|
|
755
|
+
declare function createEphemeralCreateSessionTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
756
|
+
/**
|
|
757
|
+
* Create a tool for writing data to an ephemeral slot.
|
|
758
|
+
*/
|
|
759
|
+
declare function createEphemeralWriteSlotTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
760
|
+
/**
|
|
761
|
+
* Create a tool for reading data from an ephemeral slot.
|
|
762
|
+
*/
|
|
763
|
+
declare function createEphemeralReadSlotTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
764
|
+
/**
|
|
765
|
+
* Create a tool for promoting an ephemeral session to persistent memory.
|
|
766
|
+
*/
|
|
767
|
+
declare function createEphemeralPromoteTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
768
|
+
/**
|
|
769
|
+
* Create a tool for getting ephemeral session status and details.
|
|
770
|
+
*/
|
|
771
|
+
declare function createEphemeralStatusTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
772
|
+
declare class XacheEphemeralCreateSessionTool {
|
|
773
|
+
private tool;
|
|
774
|
+
constructor(config: EphemeralToolConfig);
|
|
775
|
+
asTool(): DynamicStructuredTool;
|
|
776
|
+
}
|
|
777
|
+
declare class XacheEphemeralWriteSlotTool {
|
|
778
|
+
private tool;
|
|
779
|
+
constructor(config: EphemeralToolConfig);
|
|
780
|
+
asTool(): DynamicStructuredTool;
|
|
781
|
+
}
|
|
782
|
+
declare class XacheEphemeralReadSlotTool {
|
|
783
|
+
private tool;
|
|
784
|
+
constructor(config: EphemeralToolConfig);
|
|
785
|
+
asTool(): DynamicStructuredTool;
|
|
786
|
+
}
|
|
787
|
+
declare class XacheEphemeralPromoteTool {
|
|
788
|
+
private tool;
|
|
789
|
+
constructor(config: EphemeralToolConfig);
|
|
790
|
+
asTool(): DynamicStructuredTool;
|
|
791
|
+
}
|
|
792
|
+
declare class XacheEphemeralStatusTool {
|
|
793
|
+
private tool;
|
|
794
|
+
constructor(config: EphemeralToolConfig);
|
|
795
|
+
asTool(): DynamicStructuredTool;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export { type CollectiveToolConfig, type EphemeralToolConfig, type ExtractedMemory, type ExtractionResult, type GraphToolConfig, type ProbeToolConfig, type ReputationResult, type ReputationToolConfig, XacheChatMessageHistory, type XacheChatMessageHistoryConfig, XacheCollectiveContributeTool, XacheCollectiveQueryTool, XacheConversationBufferMemory, XacheEphemeralCreateSessionTool, XacheEphemeralPromoteTool, XacheEphemeralReadSlotTool, XacheEphemeralStatusTool, XacheEphemeralWriteSlotTool, XacheExtractor, type XacheExtractorConfig, XacheGraphAskTool, XacheGraphEntityHistoryTool, XacheGraphExtractTool, XacheGraphLoadTool, XacheGraphMergeEntitiesTool, XacheGraphQueryTool, XacheGraphRetriever, type XacheGraphRetrieverConfig, XacheMemory, type XacheMemoryConfig, XacheMemoryProbeTool, XacheReputationChecker, XacheReputationTool, XacheRetriever, type XacheRetrieverConfig, createCollectiveContributeTool, createCollectiveQueryTool, createEphemeralCreateSessionTool, createEphemeralPromoteTool, createEphemeralReadSlotTool, createEphemeralStatusTool, createEphemeralWriteSlotTool, createGraphAddEntityTool, createGraphAddRelationshipTool, createGraphAskTool, createGraphEntityHistoryTool, createGraphExtractTool, createGraphLoadTool, createGraphMergeEntitiesTool, createGraphQueryTool, createMemoryProbeTool, createReputationTool };
|
package/dist/index.d.ts
CHANGED
|
@@ -682,4 +682,117 @@ declare class XacheGraphRetriever extends BaseRetriever {
|
|
|
682
682
|
_getRelevantDocuments(query: string, _runManager?: CallbackManagerForRetrieverRun): Promise<Document[]>;
|
|
683
683
|
}
|
|
684
684
|
|
|
685
|
-
|
|
685
|
+
/**
|
|
686
|
+
* Xache Memory Probe for LangChain.js
|
|
687
|
+
* Zero-knowledge semantic memory search using cognitive fingerprints
|
|
688
|
+
*/
|
|
689
|
+
|
|
690
|
+
interface ProbeToolConfig {
|
|
691
|
+
/** Wallet address for authentication */
|
|
692
|
+
walletAddress: string;
|
|
693
|
+
/** Private key for signing (optional if signer or walletProvider is provided) */
|
|
694
|
+
privateKey?: string;
|
|
695
|
+
/** External signer (alternative to privateKey) */
|
|
696
|
+
signer?: XacheSigner;
|
|
697
|
+
/** Wallet provider for lazy signer resolution */
|
|
698
|
+
walletProvider?: XacheWalletProvider;
|
|
699
|
+
/** Encryption key for use with external signers */
|
|
700
|
+
encryptionKey?: string;
|
|
701
|
+
/** API URL (defaults to https://api.xache.xyz) */
|
|
702
|
+
apiUrl?: string;
|
|
703
|
+
/** Chain: 'base' or 'solana' */
|
|
704
|
+
chain?: 'base' | 'solana';
|
|
705
|
+
}
|
|
706
|
+
/**
|
|
707
|
+
* Create a tool for probing memory using cognitive fingerprints.
|
|
708
|
+
*
|
|
709
|
+
* @example
|
|
710
|
+
* ```typescript
|
|
711
|
+
* import { createMemoryProbeTool } from '@xache/langchain';
|
|
712
|
+
*
|
|
713
|
+
* const probeTool = createMemoryProbeTool({
|
|
714
|
+
* walletAddress: '0x...',
|
|
715
|
+
* privateKey: '0x...',
|
|
716
|
+
* });
|
|
717
|
+
*
|
|
718
|
+
* const tools = [probeTool, ...];
|
|
719
|
+
* ```
|
|
720
|
+
*/
|
|
721
|
+
declare function createMemoryProbeTool(config: ProbeToolConfig): DynamicStructuredTool;
|
|
722
|
+
/**
|
|
723
|
+
* Class-based memory probe tool (alternative API)
|
|
724
|
+
*/
|
|
725
|
+
declare class XacheMemoryProbeTool {
|
|
726
|
+
private tool;
|
|
727
|
+
constructor(config: ProbeToolConfig);
|
|
728
|
+
asTool(): DynamicStructuredTool;
|
|
729
|
+
}
|
|
730
|
+
|
|
731
|
+
/**
|
|
732
|
+
* Xache Ephemeral Context for LangChain.js
|
|
733
|
+
* Create, manage, and promote short-lived working memory sessions
|
|
734
|
+
*/
|
|
735
|
+
|
|
736
|
+
interface EphemeralToolConfig {
|
|
737
|
+
/** Wallet address for authentication */
|
|
738
|
+
walletAddress: string;
|
|
739
|
+
/** Private key for signing (optional if signer or walletProvider is provided) */
|
|
740
|
+
privateKey?: string;
|
|
741
|
+
/** External signer (alternative to privateKey) */
|
|
742
|
+
signer?: XacheSigner;
|
|
743
|
+
/** Wallet provider for lazy signer resolution */
|
|
744
|
+
walletProvider?: XacheWalletProvider;
|
|
745
|
+
/** Encryption key for use with external signers */
|
|
746
|
+
encryptionKey?: string;
|
|
747
|
+
/** API URL (defaults to https://api.xache.xyz) */
|
|
748
|
+
apiUrl?: string;
|
|
749
|
+
/** Chain: 'base' or 'solana' */
|
|
750
|
+
chain?: 'base' | 'solana';
|
|
751
|
+
}
|
|
752
|
+
/**
|
|
753
|
+
* Create a tool for creating an ephemeral working memory session.
|
|
754
|
+
*/
|
|
755
|
+
declare function createEphemeralCreateSessionTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
756
|
+
/**
|
|
757
|
+
* Create a tool for writing data to an ephemeral slot.
|
|
758
|
+
*/
|
|
759
|
+
declare function createEphemeralWriteSlotTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
760
|
+
/**
|
|
761
|
+
* Create a tool for reading data from an ephemeral slot.
|
|
762
|
+
*/
|
|
763
|
+
declare function createEphemeralReadSlotTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
764
|
+
/**
|
|
765
|
+
* Create a tool for promoting an ephemeral session to persistent memory.
|
|
766
|
+
*/
|
|
767
|
+
declare function createEphemeralPromoteTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
768
|
+
/**
|
|
769
|
+
* Create a tool for getting ephemeral session status and details.
|
|
770
|
+
*/
|
|
771
|
+
declare function createEphemeralStatusTool(config: EphemeralToolConfig): DynamicStructuredTool;
|
|
772
|
+
declare class XacheEphemeralCreateSessionTool {
|
|
773
|
+
private tool;
|
|
774
|
+
constructor(config: EphemeralToolConfig);
|
|
775
|
+
asTool(): DynamicStructuredTool;
|
|
776
|
+
}
|
|
777
|
+
declare class XacheEphemeralWriteSlotTool {
|
|
778
|
+
private tool;
|
|
779
|
+
constructor(config: EphemeralToolConfig);
|
|
780
|
+
asTool(): DynamicStructuredTool;
|
|
781
|
+
}
|
|
782
|
+
declare class XacheEphemeralReadSlotTool {
|
|
783
|
+
private tool;
|
|
784
|
+
constructor(config: EphemeralToolConfig);
|
|
785
|
+
asTool(): DynamicStructuredTool;
|
|
786
|
+
}
|
|
787
|
+
declare class XacheEphemeralPromoteTool {
|
|
788
|
+
private tool;
|
|
789
|
+
constructor(config: EphemeralToolConfig);
|
|
790
|
+
asTool(): DynamicStructuredTool;
|
|
791
|
+
}
|
|
792
|
+
declare class XacheEphemeralStatusTool {
|
|
793
|
+
private tool;
|
|
794
|
+
constructor(config: EphemeralToolConfig);
|
|
795
|
+
asTool(): DynamicStructuredTool;
|
|
796
|
+
}
|
|
797
|
+
|
|
798
|
+
export { type CollectiveToolConfig, type EphemeralToolConfig, type ExtractedMemory, type ExtractionResult, type GraphToolConfig, type ProbeToolConfig, type ReputationResult, type ReputationToolConfig, XacheChatMessageHistory, type XacheChatMessageHistoryConfig, XacheCollectiveContributeTool, XacheCollectiveQueryTool, XacheConversationBufferMemory, XacheEphemeralCreateSessionTool, XacheEphemeralPromoteTool, XacheEphemeralReadSlotTool, XacheEphemeralStatusTool, XacheEphemeralWriteSlotTool, XacheExtractor, type XacheExtractorConfig, XacheGraphAskTool, XacheGraphEntityHistoryTool, XacheGraphExtractTool, XacheGraphLoadTool, XacheGraphMergeEntitiesTool, XacheGraphQueryTool, XacheGraphRetriever, type XacheGraphRetrieverConfig, XacheMemory, type XacheMemoryConfig, XacheMemoryProbeTool, XacheReputationChecker, XacheReputationTool, XacheRetriever, type XacheRetrieverConfig, createCollectiveContributeTool, createCollectiveQueryTool, createEphemeralCreateSessionTool, createEphemeralPromoteTool, createEphemeralReadSlotTool, createEphemeralStatusTool, createEphemeralWriteSlotTool, createGraphAddEntityTool, createGraphAddRelationshipTool, createGraphAskTool, createGraphEntityHistoryTool, createGraphExtractTool, createGraphLoadTool, createGraphMergeEntitiesTool, createGraphQueryTool, createMemoryProbeTool, createReputationTool };
|