You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+72-1Lines changed: 72 additions & 1 deletion
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -204,7 +204,7 @@ To enable sidecar enrichment (Memory and Intent), add the following blocks to yo
204
204
{
205
205
"intent": {
206
206
"baseUrl": "https://antfarm.world/api/v1",
207
-
"apiKey": "xfb_your_key",
207
+
"apiKey": "antfarm_your_key",
208
208
"userId": "your_user_id"
209
209
},
210
210
"memory_api": {
@@ -216,6 +216,77 @@ To enable sidecar enrichment (Memory and Intent), add the following blocks to yo
216
216
217
217
*Note: The Intent API integration is now fully LIVE and actively polls for user-intent-kit data upon every incoming message. Ensure your `"apiKey"` uses an `antfarm_...` prefix. The sidecar securely passes `Authorization: Bearer` and injects `urgency_mode` vectors directly into your queued room events.*
218
218
219
+
When enrichment is enabled, each queued room event can be expanded with:
220
+
221
+
-`intent`: the full JSON payload returned by `GET /intent/{userId}`, plus `provider: "antfarm"`.
222
+
-`memory_context.raw`: an array of text snippets returned by Claude-Mem search.
223
+
-`enrichment_errors`: fetch or schema problems encountered while calling either upstream service.
224
+
225
+
The current Claude-Mem context retrieval path is message-driven. For each incoming room message, the sidecar uses the message body as the search query and calls:
226
+
227
+
```text
228
+
GET {memory_api.baseUrl}/search/observations?query=<message body>&limit=3
229
+
Authorization: Bearer <memory_api.token>
230
+
```
231
+
232
+
The response is expected to be MCP-style JSON:
233
+
234
+
```json
235
+
{
236
+
"content": [
237
+
{ "type": "text", "text": "..." }
238
+
]
239
+
}
240
+
```
241
+
242
+
All returned `content[]` entries with `type: "text"` are copied into `memory_context.raw`. This is how prior Claude-Mem observations are threaded back into queue events for downstream agents.
243
+
244
+
Example enriched event shape:
245
+
246
+
```json
247
+
{
248
+
"kind": "antfarm.message.created",
249
+
"payload": {
250
+
"body": "can we ship the release notes today?",
251
+
"room": "thinkoff-development"
252
+
},
253
+
"intent": {
254
+
"user_id": "petrus",
255
+
"derived": {
256
+
"urgency_mode": "emergency-only"
257
+
},
258
+
"provider": "antfarm"
259
+
},
260
+
"memory_context": {
261
+
"raw": [
262
+
"Recent Claude-Mem observation text"
263
+
]
264
+
},
265
+
"enrichment_errors": []
266
+
}
267
+
```
268
+
269
+
### Verify Enrichment
270
+
271
+
Verify the two upstream integrations independently before debugging the poller:
0 commit comments