@duckmind/deepquark-darwin-arm64 0.9.83 → 0.9.90
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/.deepquark/skills/bundled/knowledge-graph/SKILL.md +385 -0
- package/.deepquark/skills/bundled/knowledge-graph/STANDARDS.md +461 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/cli.ts +588 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/config.ts +630 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/connection-profile.ts +629 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/container.ts +756 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/mcp-client.ts +1310 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/output-formatter.ts +997 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/token-metrics.ts +335 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/transformation-log.ts +137 -0
- package/.deepquark/skills/bundled/knowledge-graph/lib/wrapper-config.ts +113 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/.env.example +129 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/compare-embeddings.ts +175 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/config-falkordb.yaml +108 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/config-neo4j.yaml +111 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/diagnose.ts +483 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb-dev.yml +146 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-falkordb.yml +151 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev-local.yml +161 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j-dev.yml +161 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-neo4j.yml +169 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-production.yml +128 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose-test.yml +10 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/docker-compose.yml +84 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/entrypoint.sh +40 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/install.ts +2054 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-falkordb.yml +78 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose-neo4j.yml +88 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/podman-compose.yml +83 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-all-llms-mcp.ts +387 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-models.ts +201 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-embedding-providers.ts +641 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-graphiti-model.ts +217 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-correct.ts +141 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-llms-mcp.ts +386 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-grok-models.ts +173 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-llama-extraction.ts +188 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-final.ts +240 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-live.ts +187 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-mcp-session.ts +127 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-model-combinations.ts +316 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-ollama-models.ts +228 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-openrouter-models.ts +460 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-real-life-mcp.ts +311 -0
- package/.deepquark/skills/bundled/knowledge-graph/server/test-search-debug.ts +199 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/Install.md +104 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/README.md +120 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/knowledge-cli.ts +996 -0
- package/.deepquark/skills/bundled/knowledge-graph/tools/server-cli.ts +531 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/BulkImport.md +514 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/CaptureEpisode.md +242 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/ClearGraph.md +392 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/GetRecent.md +352 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/GetStatus.md +373 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/HealthReport.md +212 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/InvestigateEntity.md +142 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/OntologyManagement.md +201 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/RunMaintenance.md +302 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchByDate.md +255 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchFacts.md +382 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/SearchKnowledge.md +374 -0
- package/.deepquark/skills/bundled/knowledge-graph/workflows/StixImport.md +212 -0
- package/bin/deepquark +0 -0
- package/package.json +1 -1
- package/.deepquark/skills/bundled/ge-payroll/SKILL.md +0 -153
- package/.deepquark/skills/bundled/ge-payroll/evals/evals.json +0 -23
- package/.deepquark/skills/bundled/ge-payroll/references/pain-points-improvements.md +0 -106
- package/.deepquark/skills/bundled/ge-payroll/references/process-detail.md +0 -217
- package/.deepquark/skills/bundled/ge-payroll/references/raci-stakeholders.md +0 -85
- package/.deepquark/skills/bundled/ge-payroll/references/timeline-mandays.md +0 -64
|
@@ -0,0 +1,352 @@
|
|
|
1
|
+
# Get Recent Episodes Workflow
|
|
2
|
+
|
|
3
|
+
**Objective:** Retrieve the most recent knowledge additions to the knowledge graph, optionally filtered by topic or time range.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Step 1: Announce Workflow
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
~/.claude/Tools/SkillWorkflowNotification GetRecent MadeinozKnowledgeSystem
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Output to user:**
|
|
14
|
+
```
|
|
15
|
+
Running the **GetRecent** workflow from the **MadeinozKnowledgeSystem** skill...
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 2: Determine Retrieval Scope
|
|
21
|
+
|
|
22
|
+
**Parse user's request:**
|
|
23
|
+
|
|
24
|
+
**Unfiltered Recent (Default):**
|
|
25
|
+
- "What did I learn recently?"
|
|
26
|
+
- "Show me recent knowledge"
|
|
27
|
+
- "Latest additions to my knowledge base"
|
|
28
|
+
- "What's new in my knowledge graph?"
|
|
29
|
+
|
|
30
|
+
**Topic-Filtered:**
|
|
31
|
+
- "What did I learn about [topic]?"
|
|
32
|
+
- "Recent additions about [subject]"
|
|
33
|
+
- "Latest knowledge on [domain]"
|
|
34
|
+
- "Show recent [topic] learning"
|
|
35
|
+
|
|
36
|
+
**Time-Specific:**
|
|
37
|
+
- "What did I learn this week?"
|
|
38
|
+
- "Knowledge from the last few days"
|
|
39
|
+
- "Recent additions from [date range]"
|
|
40
|
+
|
|
41
|
+
---
|
|
42
|
+
|
|
43
|
+
## Step 3: Build Retrieval Parameters
|
|
44
|
+
|
|
45
|
+
**Construct get_episodes call:**
|
|
46
|
+
|
|
47
|
+
```typescript
|
|
48
|
+
// Basic recent episodes
|
|
49
|
+
{
|
|
50
|
+
group_id: "main",
|
|
51
|
+
limit: 20
|
|
52
|
+
}
|
|
53
|
+
|
|
54
|
+
// With episode name filter (if topic specified)
|
|
55
|
+
{
|
|
56
|
+
group_id: "main",
|
|
57
|
+
limit: 20,
|
|
58
|
+
episode_name: "topic keyword" // Optional filtering
|
|
59
|
+
}
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
**Parameters:**
|
|
63
|
+
- `group_id` (optional) - Knowledge namespace (default: "main")
|
|
64
|
+
- `limit` (optional) - Number of episodes (default: 20)
|
|
65
|
+
- `episode_name` (optional) - Filter by episode name pattern
|
|
66
|
+
|
|
67
|
+
**Determine appropriate limit:**
|
|
68
|
+
- Quick overview: 10 episodes
|
|
69
|
+
- Standard request: 20 episodes
|
|
70
|
+
- Comprehensive view: 50 episodes
|
|
71
|
+
|
|
72
|
+
---
|
|
73
|
+
|
|
74
|
+
## Step 4: Retrieve Recent Episodes (CLI-First, MCP-Fallback)
|
|
75
|
+
|
|
76
|
+
### Primary: Knowledge CLI (via Bash)
|
|
77
|
+
|
|
78
|
+
**ALWAYS try CLI first - it's more reliable and token-efficient (25%+ savings):**
|
|
79
|
+
|
|
80
|
+
```bash
|
|
81
|
+
bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts get_episodes 20
|
|
82
|
+
```
|
|
83
|
+
|
|
84
|
+
**Arguments:**
|
|
85
|
+
1. Limit (optional) - Number of episodes to retrieve (default: 5)
|
|
86
|
+
|
|
87
|
+
**Options:**
|
|
88
|
+
- `--raw` - Output raw JSON instead of compact format
|
|
89
|
+
- `--metrics` - Display token metrics after operation
|
|
90
|
+
|
|
91
|
+
### Fallback: MCP Tool (Only if CLI fails)
|
|
92
|
+
|
|
93
|
+
**⚠️ Only use MCP if CLI returns connection/execution errors.**
|
|
94
|
+
|
|
95
|
+
```typescript
|
|
96
|
+
get_episodes({
|
|
97
|
+
group_id: groupId || "main",
|
|
98
|
+
limit: 20,
|
|
99
|
+
episode_name: topicFilter || undefined
|
|
100
|
+
})
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
---
|
|
104
|
+
|
|
105
|
+
## Step 5: Present Recent Knowledge
|
|
106
|
+
|
|
107
|
+
**Format episodes for user:**
|
|
108
|
+
|
|
109
|
+
```markdown
|
|
110
|
+
📅 **Recent Knowledge Additions**
|
|
111
|
+
|
|
112
|
+
**Time Period:** [Most recent to oldest]
|
|
113
|
+
**Total Episodes:** [Number returned]
|
|
114
|
+
**Group ID:** [Knowledge namespace]
|
|
115
|
+
|
|
116
|
+
---
|
|
117
|
+
|
|
118
|
+
**[Episode 1 Name]** — [Relative time]
|
|
119
|
+
**Added:** [Exact timestamp]
|
|
120
|
+
**Episode UUID:** [uuid]
|
|
121
|
+
|
|
122
|
+
**Summary:**
|
|
123
|
+
[Brief description of what was captured]
|
|
124
|
+
|
|
125
|
+
**Entities Extracted:**
|
|
126
|
+
- [Entity 1] ([Type])
|
|
127
|
+
- [Entity 2] ([Type])
|
|
128
|
+
- [Entity 3] ([Type])
|
|
129
|
+
|
|
130
|
+
**Relationships Identified:**
|
|
131
|
+
- [Relationship 1]
|
|
132
|
+
- [Relationship 2]
|
|
133
|
+
|
|
134
|
+
---
|
|
135
|
+
|
|
136
|
+
**[Episode 2 Name]** — [Relative time]
|
|
137
|
+
[Same format as above]
|
|
138
|
+
|
|
139
|
+
---
|
|
140
|
+
|
|
141
|
+
💡 **Learning Patterns:**
|
|
142
|
+
[Synthesize common themes or topics across recent episodes]
|
|
143
|
+
|
|
144
|
+
📊 **Knowledge Distribution:**
|
|
145
|
+
- **By Type:** [Preferences: X, Procedures: Y, Events: Z]
|
|
146
|
+
- **By Topic:** [Topic 1: X, Topic 2: Y, Topic 3: Z]
|
|
147
|
+
- **Temporal:** [Most active day, learning streaks, etc.]
|
|
148
|
+
|
|
149
|
+
🎯 **Suggested Actions:**
|
|
150
|
+
- [Recommend follow-up actions based on recent knowledge]
|
|
151
|
+
- [Identify gaps or areas for deeper learning]
|
|
152
|
+
```
|
|
153
|
+
|
|
154
|
+
**If no episodes found:**
|
|
155
|
+
```markdown
|
|
156
|
+
❌ **No Episodes Found**
|
|
157
|
+
|
|
158
|
+
Your knowledge graph doesn't have any episodes yet.
|
|
159
|
+
|
|
160
|
+
**Get Started:**
|
|
161
|
+
1. Capture your first piece of knowledge using CaptureEpisode
|
|
162
|
+
2. Import existing documents using BulkImport
|
|
163
|
+
3. Add conversation insights from this session
|
|
164
|
+
|
|
165
|
+
💡 The more you add, the more valuable your knowledge graph becomes!
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
---
|
|
169
|
+
|
|
170
|
+
## Best Practices
|
|
171
|
+
|
|
172
|
+
**When to Use GetRecent:**
|
|
173
|
+
- Quick knowledge refresh before starting work
|
|
174
|
+
- Review learning after a break
|
|
175
|
+
- Identify what you've been working on
|
|
176
|
+
- Track progress on a topic over time
|
|
177
|
+
- Find recently captured but not yet integrated knowledge
|
|
178
|
+
|
|
179
|
+
**Time-Based Interpretations:**
|
|
180
|
+
- Recent episodes are sorted by creation time (newest first)
|
|
181
|
+
- Use relative time descriptions ("2 hours ago", "yesterday")
|
|
182
|
+
- Group by time periods for easier scanning
|
|
183
|
+
- Note temporal patterns in your learning
|
|
184
|
+
|
|
185
|
+
**Filtering Strategies:**
|
|
186
|
+
- Use topic filters when you know what you're looking for
|
|
187
|
+
- Leave unfiltered for serendipitous discovery
|
|
188
|
+
- Adjust limit based on how much you want to review
|
|
189
|
+
- Consider date ranges for specific time periods
|
|
190
|
+
|
|
191
|
+
---
|
|
192
|
+
|
|
193
|
+
## Examples
|
|
194
|
+
|
|
195
|
+
**Example 1: Unfiltered Recent Overview**
|
|
196
|
+
|
|
197
|
+
User: "What did I learn recently?"
|
|
198
|
+
|
|
199
|
+
```typescript
|
|
200
|
+
get_episodes({
|
|
201
|
+
group_id: "main",
|
|
202
|
+
limit: 20
|
|
203
|
+
})
|
|
204
|
+
```
|
|
205
|
+
|
|
206
|
+
Shows last 20 episodes across all topics, newest first.
|
|
207
|
+
|
|
208
|
+
**Example 2: Topic-Specific Recent**
|
|
209
|
+
|
|
210
|
+
User: "What did I learn about PAI this week?"
|
|
211
|
+
|
|
212
|
+
```typescript
|
|
213
|
+
get_episodes({
|
|
214
|
+
group_id: "main",
|
|
215
|
+
limit: 20,
|
|
216
|
+
episode_name: "PAI" // Filters for episodes with "PAI" in name
|
|
217
|
+
})
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
Shows only PAI-related episodes from the recent additions.
|
|
221
|
+
|
|
222
|
+
**Example 3: Comprehensive Review**
|
|
223
|
+
|
|
224
|
+
User: "Show me everything I learned about containerization"
|
|
225
|
+
|
|
226
|
+
```typescript
|
|
227
|
+
get_episodes({
|
|
228
|
+
group_id: "main",
|
|
229
|
+
limit: 50,
|
|
230
|
+
episode_name: "container"
|
|
231
|
+
})
|
|
232
|
+
```
|
|
233
|
+
|
|
234
|
+
Shows up to 50 episodes mentioning "container" for deep review.
|
|
235
|
+
|
|
236
|
+
---
|
|
237
|
+
|
|
238
|
+
## Analysis Patterns
|
|
239
|
+
|
|
240
|
+
**Identify Learning Trends:**
|
|
241
|
+
```markdown
|
|
242
|
+
**Learning Velocity:**
|
|
243
|
+
- Last 7 days: [X] episodes
|
|
244
|
+
- Last 30 days: [Y] episodes
|
|
245
|
+
- Most active day: [Day of week]
|
|
246
|
+
|
|
247
|
+
**Topic Concentration:**
|
|
248
|
+
- Primary focus: [Topic 1] ([X]%)
|
|
249
|
+
- Secondary: [Topic 2] ([Y]%)
|
|
250
|
+
- Emerging: [Topic 3] ([Z]%)
|
|
251
|
+
|
|
252
|
+
**Knowledge Type Distribution:**
|
|
253
|
+
- Procedures (how-to): [X]%
|
|
254
|
+
- Preferences: [Y]%
|
|
255
|
+
- Events/Decisions: [Z]%
|
|
256
|
+
```
|
|
257
|
+
|
|
258
|
+
**Find Gaps and Opportunities:**
|
|
259
|
+
- Topics with few episodes → Need more learning?
|
|
260
|
+
- Old episodes on key topics → Knowledge refresh needed?
|
|
261
|
+
- Imbalanced types → Too many facts, not enough procedures?
|
|
262
|
+
|
|
263
|
+
**Track Progress:**
|
|
264
|
+
```markdown
|
|
265
|
+
**Learning Journey: [Topic]**
|
|
266
|
+
|
|
267
|
+
Timeline of Understanding:
|
|
268
|
+
[Date] - Initial concept captured
|
|
269
|
+
[Date] - Added procedure details
|
|
270
|
+
[Date] - Refactored based on experience
|
|
271
|
+
[Date] - Connected to broader concepts
|
|
272
|
+
|
|
273
|
+
Current Mastery Level: [Assess based on depth and connections]
|
|
274
|
+
```
|
|
275
|
+
|
|
276
|
+
---
|
|
277
|
+
|
|
278
|
+
## Presentation Options
|
|
279
|
+
|
|
280
|
+
**Condensed View (Quick Scan):**
|
|
281
|
+
```markdown
|
|
282
|
+
📋 Recent Learning (Last 20 Episodes)
|
|
283
|
+
[Date] [Episode Name] — [Key entities]
|
|
284
|
+
[Date] [Episode Name] — [Key entities]
|
|
285
|
+
...
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
**Detailed View (Deep Dive):**
|
|
289
|
+
```markdown
|
|
290
|
+
📖 Episode Details
|
|
291
|
+
[Full episode content with all entities and relationships]
|
|
292
|
+
```
|
|
293
|
+
|
|
294
|
+
**Topic Grouped View:**
|
|
295
|
+
```markdown
|
|
296
|
+
📚 Learning by Topic
|
|
297
|
+
|
|
298
|
+
**PAI Skills:**
|
|
299
|
+
- [Episode 1]
|
|
300
|
+
- [Episode 2]
|
|
301
|
+
|
|
302
|
+
**Graphiti:**
|
|
303
|
+
- [Episode 3]
|
|
304
|
+
- [Episode 4]
|
|
305
|
+
```
|
|
306
|
+
|
|
307
|
+
---
|
|
308
|
+
|
|
309
|
+
## Troubleshooting
|
|
310
|
+
|
|
311
|
+
**Empty Results:**
|
|
312
|
+
- Knowledge graph is new → Start capturing knowledge
|
|
313
|
+
- Different group_id → Check which namespace you're using
|
|
314
|
+
- Filter too restrictive → Try broader topic terms
|
|
315
|
+
|
|
316
|
+
**Too Many Results:**
|
|
317
|
+
- Reduce limit for focused view
|
|
318
|
+
- Add topic filter for specific domain
|
|
319
|
+
- Sort by most relevant rather than most recent
|
|
320
|
+
|
|
321
|
+
**Outdated Knowledge:**
|
|
322
|
+
- Note episode timestamps
|
|
323
|
+
- Consider updating outdated information
|
|
324
|
+
- Capture new insights to supersede old
|
|
325
|
+
|
|
326
|
+
**Performance Issues:**
|
|
327
|
+
- Large graphs may take time to retrieve
|
|
328
|
+
- Consider filtering by topic or reducing limit
|
|
329
|
+
- Use GetStatus to check graph health
|
|
330
|
+
|
|
331
|
+
---
|
|
332
|
+
|
|
333
|
+
## Integration with Other Workflows
|
|
334
|
+
|
|
335
|
+
**Before Getting Recent:**
|
|
336
|
+
- Use `GetStatus` to verify graph is operational
|
|
337
|
+
- Consider what time period or topic you want to review
|
|
338
|
+
|
|
339
|
+
**After Getting Recent:**
|
|
340
|
+
- Use `SearchKnowledge` to dive deeper into specific topics
|
|
341
|
+
- Use `SearchFacts` to explore relationships between recent entities
|
|
342
|
+
- Use `CaptureEpisode` to add new insights discovered during review
|
|
343
|
+
- Use `BulkImport` to fill gaps in knowledge coverage
|
|
344
|
+
|
|
345
|
+
---
|
|
346
|
+
|
|
347
|
+
**Related Workflows:**
|
|
348
|
+
- `SearchKnowledge.md` - Deep dive into specific topics
|
|
349
|
+
- `SearchFacts.md` - Explore relationships
|
|
350
|
+
- `CaptureEpisode.md` - Add new knowledge
|
|
351
|
+
- `GetStatus.md` - Check knowledge graph health
|
|
352
|
+
- `BulkImport.md` - Add multiple documents at once
|
|
@@ -0,0 +1,373 @@
|
|
|
1
|
+
# Get Status Workflow
|
|
2
|
+
|
|
3
|
+
**Objective:** Check the operational status of the Graphiti knowledge graph, server health, and database connectivity.
|
|
4
|
+
|
|
5
|
+
---
|
|
6
|
+
|
|
7
|
+
## Step 1: Announce Workflow
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
~/.claude/Tools/SkillWorkflowNotification GetStatus MadeinozKnowledgeSystem
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
**Output to user:**
|
|
14
|
+
```
|
|
15
|
+
Running the **GetStatus** workflow from the **MadeinozKnowledgeSystem** skill...
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
---
|
|
19
|
+
|
|
20
|
+
## Step 2: Check Server Health
|
|
21
|
+
|
|
22
|
+
**Use the Knowledge CLI (preferred):**
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts health
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
**Alternative: Direct curl check:**
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
# Check if server responds
|
|
32
|
+
curl -s http://localhost:8000/health
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
**Expected response:**
|
|
36
|
+
```json
|
|
37
|
+
{"status": "healthy"}
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
**If server is not reachable:**
|
|
41
|
+
```bash
|
|
42
|
+
# Check if container is running (using pack status script)
|
|
43
|
+
bun run tools/status.ts
|
|
44
|
+
|
|
45
|
+
# Or check container logs
|
|
46
|
+
bun run tools/logs.ts | head -50
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
---
|
|
50
|
+
|
|
51
|
+
## Step 3: Call Status Check (CLI-First, MCP-Fallback)
|
|
52
|
+
|
|
53
|
+
### Primary: Knowledge CLI (via Bash)
|
|
54
|
+
|
|
55
|
+
**ALWAYS try CLI first - it's more reliable and token-efficient (25%+ savings):**
|
|
56
|
+
|
|
57
|
+
```bash
|
|
58
|
+
bun run ~/.claude/skills/Knowledge/tools/knowledge-cli.ts get_status
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
**Options:**
|
|
62
|
+
- `--raw` - Output raw JSON instead of compact format
|
|
63
|
+
- `--metrics` - Display token metrics after operation
|
|
64
|
+
|
|
65
|
+
### Fallback: MCP Tool (Only if CLI fails)
|
|
66
|
+
|
|
67
|
+
**⚠️ Only use MCP if CLI returns connection/execution errors.**
|
|
68
|
+
|
|
69
|
+
```typescript
|
|
70
|
+
// Use the get_status tool
|
|
71
|
+
get_status({})
|
|
72
|
+
```
|
|
73
|
+
|
|
74
|
+
**This returns:**
|
|
75
|
+
- Server connection status
|
|
76
|
+
- Database connectivity (FalkorDB/Neo4j)
|
|
77
|
+
- LLM provider configuration
|
|
78
|
+
- Basic graph statistics (if available)
|
|
79
|
+
|
|
80
|
+
---
|
|
81
|
+
|
|
82
|
+
## Step 4: Present Status Report
|
|
83
|
+
|
|
84
|
+
**Format status information for user:**
|
|
85
|
+
|
|
86
|
+
```markdown
|
|
87
|
+
📊 **Knowledge Graph Status Report**
|
|
88
|
+
|
|
89
|
+
---
|
|
90
|
+
|
|
91
|
+
**🖥️ Server Status**
|
|
92
|
+
|
|
93
|
+
**MCP Server:** [Status]
|
|
94
|
+
- Endpoint: http://localhost:8000/mcp/
|
|
95
|
+
- Health: [✓ Connected / ✗ Disconnected]
|
|
96
|
+
- Response Time: [X]ms
|
|
97
|
+
|
|
98
|
+
**Container Status:**
|
|
99
|
+
- Name: graphiti-knowledge-graph-mcp
|
|
100
|
+
- State: [running / stopped / exited]
|
|
101
|
+
- Uptime: [X hours / Y days]
|
|
102
|
+
- Restart Count: [N]
|
|
103
|
+
|
|
104
|
+
---
|
|
105
|
+
|
|
106
|
+
**💾 Database Status**
|
|
107
|
+
|
|
108
|
+
**Backend:** [FalkorDB / Neo4j]
|
|
109
|
+
- Connection: [✓ Connected / ✗ Disconnected]
|
|
110
|
+
- URI: [redis://localhost:6379 / bolt://localhost:7687]
|
|
111
|
+
- Web UI: [http://localhost:3000 / http://localhost:7474]
|
|
112
|
+
|
|
113
|
+
---
|
|
114
|
+
|
|
115
|
+
**🤖 LLM Configuration**
|
|
116
|
+
|
|
117
|
+
**Provider:** [OpenAI / Anthropic / Gemini / Groq]
|
|
118
|
+
- Model: [gpt-4o-mini / gpt-4o / etc.]
|
|
119
|
+
- API Key: [✓ Configured / ✗ Missing]
|
|
120
|
+
- Embedder: [openai / voyage / sentence-transformers]
|
|
121
|
+
|
|
122
|
+
---
|
|
123
|
+
|
|
124
|
+
**📈 Graph Statistics**
|
|
125
|
+
|
|
126
|
+
**Total Entities:** [X]
|
|
127
|
+
- By Type:
|
|
128
|
+
- Preferences: [N]
|
|
129
|
+
- Procedures: [N]
|
|
130
|
+
- Locations: [N]
|
|
131
|
+
- Events: [N]
|
|
132
|
+
- Organizations: [N]
|
|
133
|
+
- Documents: [N]
|
|
134
|
+
|
|
135
|
+
**Total Episodes:** [Y]
|
|
136
|
+
- Total Facts/Edges: [Z]
|
|
137
|
+
|
|
138
|
+
**Knowledge Graph Size:** [Approximate storage used]
|
|
139
|
+
|
|
140
|
+
**Most Recent Activity:**
|
|
141
|
+
- Last Episode: [Date/Time]
|
|
142
|
+
- Last Episode Name: [Name]
|
|
143
|
+
|
|
144
|
+
---
|
|
145
|
+
|
|
146
|
+
**⚙️ Configuration**
|
|
147
|
+
|
|
148
|
+
**Group ID:** [main / custom]
|
|
149
|
+
- Semaphore Limit: [N] (concurrent processing)
|
|
150
|
+
- Telemetry: [enabled / disabled]
|
|
151
|
+
- Timezone: [configured timezone]
|
|
152
|
+
|
|
153
|
+
---
|
|
154
|
+
|
|
155
|
+
**🔧 System Resources**
|
|
156
|
+
|
|
157
|
+
**Memory Usage:**
|
|
158
|
+
- Container: [X] / [Y] GB
|
|
159
|
+
- Database: [A] / [B] GB
|
|
160
|
+
|
|
161
|
+
**CPU Usage:** [X]%
|
|
162
|
+
|
|
163
|
+
**Disk Usage:**
|
|
164
|
+
- Graph data: [X] MB
|
|
165
|
+
- Logs: [Y] MB
|
|
166
|
+
|
|
167
|
+
---
|
|
168
|
+
|
|
169
|
+
**✅ Health Summary**
|
|
170
|
+
|
|
171
|
+
Overall Status: [🟢 Healthy / 🟡 Warnings / 🔴 Issues]
|
|
172
|
+
|
|
173
|
+
[Additional notes or recommendations]
|
|
174
|
+
```
|
|
175
|
+
|
|
176
|
+
---
|
|
177
|
+
|
|
178
|
+
## Health Indicators
|
|
179
|
+
|
|
180
|
+
**🟢 Healthy Status:**
|
|
181
|
+
- Server responding to health checks
|
|
182
|
+
- Database connected and operational
|
|
183
|
+
- LLM provider configured
|
|
184
|
+
- No errors in logs
|
|
185
|
+
- Recent successful episode additions
|
|
186
|
+
|
|
187
|
+
**🟡 Warning Status:**
|
|
188
|
+
- Server running but slow response times
|
|
189
|
+
- High memory or CPU usage
|
|
190
|
+
- API key configured but rate limits low
|
|
191
|
+
- Recent episode failures
|
|
192
|
+
- High semaphore limit for API tier
|
|
193
|
+
|
|
194
|
+
**🔴 Critical Status:**
|
|
195
|
+
- Server not responding
|
|
196
|
+
- Database disconnected
|
|
197
|
+
- Missing or invalid API keys
|
|
198
|
+
- Container stopped or crashed
|
|
199
|
+
- No recent successful operations
|
|
200
|
+
|
|
201
|
+
---
|
|
202
|
+
|
|
203
|
+
## Troubleshooting by Status
|
|
204
|
+
|
|
205
|
+
**If Server Disconnected:**
|
|
206
|
+
|
|
207
|
+
```bash
|
|
208
|
+
# Start the server
|
|
209
|
+
cd /path/to/podman-graphiti-knowledge-graph-mcp
|
|
210
|
+
./run.sh
|
|
211
|
+
|
|
212
|
+
# Or if using podman-compose
|
|
213
|
+
podman-compose up -d
|
|
214
|
+
|
|
215
|
+
# Verify startup
|
|
216
|
+
curl http://localhost:8000/health
|
|
217
|
+
```
|
|
218
|
+
|
|
219
|
+
**If Database Disconnected:**
|
|
220
|
+
|
|
221
|
+
```bash
|
|
222
|
+
# Check database container
|
|
223
|
+
podman ps | grep falkordb # or neo4j
|
|
224
|
+
|
|
225
|
+
# Check database logs
|
|
226
|
+
podman logs falkordb
|
|
227
|
+
|
|
228
|
+
# Restart database
|
|
229
|
+
podman restart falkordb
|
|
230
|
+
|
|
231
|
+
# Then restart MCP server
|
|
232
|
+
podman restart graphiti-knowledge-graph-mcp
|
|
233
|
+
```
|
|
234
|
+
|
|
235
|
+
**If API Key Issues:**
|
|
236
|
+
|
|
237
|
+
```bash
|
|
238
|
+
# Check .env file
|
|
239
|
+
cat ~/.claude/.env | grep API_KEY
|
|
240
|
+
|
|
241
|
+
# Verify API key is valid
|
|
242
|
+
curl https://api.openai.com/v1/models \
|
|
243
|
+
-H "Authorization: Bearer $MADEINOZ_KNOWLEDGE_OPENAI_API_KEY"
|
|
244
|
+
|
|
245
|
+
# Update .env if needed
|
|
246
|
+
nano ~/.claude/.env
|
|
247
|
+
|
|
248
|
+
# Restart container to pick up changes
|
|
249
|
+
podman restart graphiti-knowledge-graph-mcp
|
|
250
|
+
```
|
|
251
|
+
|
|
252
|
+
**If High Resource Usage:**
|
|
253
|
+
|
|
254
|
+
```bash
|
|
255
|
+
# Check container stats
|
|
256
|
+
podman stats graphiti-knowledge-graph-mcp
|
|
257
|
+
|
|
258
|
+
# Reduce concurrency
|
|
259
|
+
# Edit .env: SEMAPHORE_LIMIT=5
|
|
260
|
+
|
|
261
|
+
# Restart to apply
|
|
262
|
+
podman restart graphiti-knowledge-graph-mcp
|
|
263
|
+
```
|
|
264
|
+
|
|
265
|
+
---
|
|
266
|
+
|
|
267
|
+
## Performance Metrics
|
|
268
|
+
|
|
269
|
+
**Track Over Time:**
|
|
270
|
+
|
|
271
|
+
```markdown
|
|
272
|
+
**Performance Trends:**
|
|
273
|
+
|
|
274
|
+
**Response Times:**
|
|
275
|
+
- Current: [X]ms
|
|
276
|
+
- Average (24h): [Y]ms
|
|
277
|
+
- Peak: [Z]ms
|
|
278
|
+
|
|
279
|
+
**Episode Throughput:**
|
|
280
|
+
- Last hour: [X] episodes
|
|
281
|
+
- Last 24h: [Y] episodes
|
|
282
|
+
- Last 7 days: [Z] episodes
|
|
283
|
+
|
|
284
|
+
**Error Rate:**
|
|
285
|
+
- Last hour: [X]%
|
|
286
|
+
- Last 24h: [Y]%
|
|
287
|
+
```
|
|
288
|
+
|
|
289
|
+
**Optimization Recommendations:**
|
|
290
|
+
|
|
291
|
+
Based on metrics, suggest:
|
|
292
|
+
- Adjust SEMAPHORE_LIMIT based on API tier
|
|
293
|
+
- Consider model upgrade if extraction quality is low
|
|
294
|
+
- Clean up old episodes if graph is too large
|
|
295
|
+
- Archive old knowledge to separate group_id
|
|
296
|
+
|
|
297
|
+
---
|
|
298
|
+
|
|
299
|
+
## Quick Health Commands
|
|
300
|
+
|
|
301
|
+
**One-Line Health Check:**
|
|
302
|
+
```bash
|
|
303
|
+
curl -s http://localhost:8000/health && echo "✓ Server healthy" || echo "✗ Server down"
|
|
304
|
+
```
|
|
305
|
+
|
|
306
|
+
**Container Status:**
|
|
307
|
+
```bash
|
|
308
|
+
podman ps --filter name=graphiti --format "table {{.Names}}\t{{.Status}}\t{{.Ports}}"
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
**Recent Errors:**
|
|
312
|
+
```bash
|
|
313
|
+
podman logs --since 1h graphiti-knowledge-graph-mcp | grep -i error
|
|
314
|
+
```
|
|
315
|
+
|
|
316
|
+
**Database Connection Test:**
|
|
317
|
+
```bash
|
|
318
|
+
# FalkorDB (Redis)
|
|
319
|
+
redis-cli -h localhost -p 6379 ping
|
|
320
|
+
|
|
321
|
+
# Neo4j
|
|
322
|
+
cypher-shell -u neo4j -p demodemo "RETURN 1"
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
---
|
|
326
|
+
|
|
327
|
+
## Status Alert Conditions
|
|
328
|
+
|
|
329
|
+
**Alert User If:**
|
|
330
|
+
|
|
331
|
+
1. **Server down** - Critical, immediate attention needed
|
|
332
|
+
2. **Database disconnected** - Critical, check database container
|
|
333
|
+
3. **Missing API key** - Error, capture won't work
|
|
334
|
+
4. **High error rate (>10%)** - Warning, check logs
|
|
335
|
+
5. **No recent episodes** - Info, consider adding knowledge
|
|
336
|
+
6. **High resource usage (>90%)** - Warning, may need optimization
|
|
337
|
+
7. **Low concurrency for API tier** - Info, could increase throughput
|
|
338
|
+
|
|
339
|
+
**Actionable Recommendations:**
|
|
340
|
+
|
|
341
|
+
```markdown
|
|
342
|
+
**🎯 Recommended Actions:**
|
|
343
|
+
|
|
344
|
+
Based on current status:
|
|
345
|
+
|
|
346
|
+
1. [Most urgent action]
|
|
347
|
+
2. [Secondary action]
|
|
348
|
+
3. [Optimization suggestion]
|
|
349
|
+
|
|
350
|
+
**📚 Documentation:**
|
|
351
|
+
- [Relevant docs for any issues found]
|
|
352
|
+
```
|
|
353
|
+
|
|
354
|
+
---
|
|
355
|
+
|
|
356
|
+
## Integration with Other Workflows
|
|
357
|
+
|
|
358
|
+
**Before Other Workflows:**
|
|
359
|
+
- Always run GetStatus before BulkImport to ensure capacity
|
|
360
|
+
- Check before CaptureEpisode if server seems slow
|
|
361
|
+
- Verify before ClearGraph (destructive operation)
|
|
362
|
+
|
|
363
|
+
**After Troubleshooting:**
|
|
364
|
+
- Re-run GetStatus to verify fixes
|
|
365
|
+
- Test with simple CaptureEpisode
|
|
366
|
+
- Check GetRecent to confirm operations work
|
|
367
|
+
|
|
368
|
+
---
|
|
369
|
+
|
|
370
|
+
**Related Workflows:**
|
|
371
|
+
- All other workflows - Run GetStatus first if experiencing issues
|
|
372
|
+
- `CaptureEpisode.md` - Test knowledge capture after troubleshooting
|
|
373
|
+
- `ClearGraph.md` - Check status before destructive operations
|