npcsh 1.1.17__tar.gz → 1.1.18__tar.gz
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.
- {npcsh-1.1.17/npcsh.egg-info → npcsh-1.1.18}/PKG-INFO +90 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/README.md +89 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/_state.py +114 -91
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/alicanto.py +2 -2
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/benchmark/__init__.py +8 -2
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/benchmark/npcsh_agent.py +46 -12
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/benchmark/runner.py +85 -43
- npcsh-1.1.18/npcsh/benchmark/templates/install-npcsh.sh.j2 +35 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/build.py +2 -4
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/completion.py +2 -6
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/config.py +1 -3
- npcsh-1.1.18/npcsh/conversation_viewer.py +389 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/corca.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/execution.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/guac.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/mcp_helpers.py +2 -3
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/mcp_server.py +5 -10
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc.py +10 -11
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/bin/benchmark.jinx +1 -1
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/core/search/db_search.jinx +348 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/core/search/file_search.jinx +339 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/core/search/kg_search.jinx +418 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/core/search/mem_review.jinx +73 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/core/search/mem_search.jinx +388 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/core/search/web_search.jinx +283 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/sleep.jinx +22 -11
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/core/sql.jinx +20 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/research/paper_search.jinx +412 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/research/semantic_scholar.jinx +386 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/lib/utils/jinxs.jinx +331 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/alicanto.jinx +356 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/arxiv.jinx +720 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/corca.jinx +430 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/guac.jinx +544 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/plonk.jinx +379 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/pti.jinx +357 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/reattach.jinx +291 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/spool.jinx +350 -0
- npcsh-1.1.18/npcsh/npc_team/jinxs/modes/wander.jinx +455 -0
- {npcsh-1.1.17/npcsh/npc_team/jinxs/bin → npcsh-1.1.18/npcsh/npc_team/jinxs/modes}/yap.jinx +13 -7
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npcsh.py +7 -4
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/plonk.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/pti.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/routes.py +1 -3
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/spool.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/ui.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/wander.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/yap.py +0 -1
- {npcsh-1.1.17 → npcsh-1.1.18/npcsh.egg-info}/PKG-INFO +90 -1
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh.egg-info/SOURCES.txt +15 -4
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh.egg-info/entry_points.txt +0 -3
- {npcsh-1.1.17 → npcsh-1.1.18}/setup.py +1 -1
- npcsh-1.1.18/tests/test_config.py +48 -0
- npcsh-1.1.18/tests/test_jinxs.py +58 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/tests/test_tool_routing.py +16 -3
- npcsh-1.1.17/npcsh/npc_team/jinxs/bin/spool.jinx +0 -161
- npcsh-1.1.17/npcsh/npc_team/jinxs/bin/wander.jinx +0 -242
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/core/search/db_search.jinx +0 -44
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/core/search/file_search.jinx +0 -94
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/core/search/kg_search.jinx +0 -96
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/core/search/mem_search.jinx +0 -80
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/core/search/web_search.jinx +0 -51
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/core/sql.jinx +0 -16
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/research/arxiv.jinx +0 -76
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/research/paper_search.jinx +0 -101
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/research/semantic_scholar.jinx +0 -69
- npcsh-1.1.17/npcsh/npc_team/jinxs/lib/utils/jinxs.jinx +0 -176
- {npcsh-1.1.17 → npcsh-1.1.18}/LICENSE +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/MANIFEST.in +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/__init__.py +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/alicanto.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/alicanto.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/corca.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/corca.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/corca_example.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/frederic.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/frederic4.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/guac.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/guac.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/bin/nql.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/bin/roll.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/bin/sample.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/bin/sync.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/bin/vixynt.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/add_tab.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/close_pane.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/close_tab.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/confirm.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/focus_pane.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/incognide.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/list_panes.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/navigate.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/notify.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/open_pane.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/read_pane.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/run_terminal.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/send_message.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/split_pane.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/switch_npc.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/switch_tab.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/write_file.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/incognide/zen_mode.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/browser/browser_action.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/browser/browser_screenshot.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/browser/close_browser.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/browser/open_browser.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/computer_use/click.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/computer_use/key_press.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/computer_use/launch_app.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/computer_use/screenshot.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/computer_use/trigger.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/computer_use/type_text.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/computer_use/wait.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/chat.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/cmd.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/compress.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/edit_file.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/load_file.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/ots.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/paste.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/python.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/search.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/core/sh.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/orchestration/convene.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/orchestration/delegate.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/build.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/compile.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/help.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/init.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/serve.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/set.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/shh.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/switch.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/switches.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/teamviz.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/usage.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/jinxs/lib/utils/verbose.jinx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/kadiefa.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/kadiefa.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/npcsh.ctx +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/npcsh_sibiji.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/plonk.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/plonk.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/plonkjr.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/plonkjr.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/sibiji.npc +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/sibiji.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/spool.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/npc_team/yap.png +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh/parsing.py +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh.egg-info/dependency_links.txt +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh.egg-info/requires.txt +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/npcsh.egg-info/top_level.txt +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/project/__init__.py +0 -0
- {npcsh-1.1.17 → npcsh-1.1.18}/setup.cfg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: npcsh
|
|
3
|
-
Version: 1.1.
|
|
3
|
+
Version: 1.1.18
|
|
4
4
|
Summary: npcsh is a command-line toolkit for using AI agents in novel ways.
|
|
5
5
|
Home-page: https://github.com/NPC-Worldwide/npcsh
|
|
6
6
|
Author: Christopher Agostino
|
|
@@ -596,6 +596,9 @@ npc vixynt "a sunset over mountains"
|
|
|
596
596
|
| `/teamviz` | Visualize team structure. Usage: `/teamviz save=output.png` |
|
|
597
597
|
| `/ots` | Screenshot analysis. Usage: `/ots` then select area |
|
|
598
598
|
| `/sleep` | Evolve knowledge graph. Usage: `/sleep --ops link_facts,deepen` |
|
|
599
|
+
| `/kg_search` | Search knowledge graph with multiple modes. Usage: `/kg_search query mode=hybrid depth=2` |
|
|
600
|
+
| `/mem_search` | Search approved memories. Usage: `/mem_search query status=approved top_k=10` |
|
|
601
|
+
| `/mem_review` | Review pending memories interactively. Usage: `/mem_review limit=50` |
|
|
599
602
|
|
|
600
603
|
### System & Config
|
|
601
604
|
| Command | Description |
|
|
@@ -626,6 +629,92 @@ npc vixynt "a sunset over mountains"
|
|
|
626
629
|
--format (-f) | --num_frames (-num_f) | --sprovider (-s) |
|
|
627
630
|
```
|
|
628
631
|
|
|
632
|
+
## Memory & Knowledge Graph
|
|
633
|
+
|
|
634
|
+
`npcsh` maintains a memory lifecycle system that allows agents to learn and grow from past interactions. Memories progress through stages and can be incorporated into a knowledge graph for advanced retrieval.
|
|
635
|
+
|
|
636
|
+
### Memory Lifecycle
|
|
637
|
+
|
|
638
|
+
Memories are extracted from conversations and follow this lifecycle:
|
|
639
|
+
|
|
640
|
+
1. **pending_approval** - New memories awaiting review
|
|
641
|
+
2. **human-approved** - Approved and ready for KG integration
|
|
642
|
+
3. **human-rejected** - Rejected (used as negative examples)
|
|
643
|
+
4. **human-edited** - Modified by user before approval
|
|
644
|
+
5. **skipped** - Deferred for later review
|
|
645
|
+
|
|
646
|
+
### Memory Commands
|
|
647
|
+
|
|
648
|
+
```bash
|
|
649
|
+
# Search through approved memories
|
|
650
|
+
/mem_search python # Keyword search
|
|
651
|
+
/mem_search python status=approved # Filter by status
|
|
652
|
+
/mem_search python top_k=20 # Limit results
|
|
653
|
+
|
|
654
|
+
# Review pending memories interactively
|
|
655
|
+
/mem_review # Review with default limit
|
|
656
|
+
/mem_review limit=50 # Review more at once
|
|
657
|
+
```
|
|
658
|
+
|
|
659
|
+
### Knowledge Graph
|
|
660
|
+
|
|
661
|
+
The knowledge graph stores facts and concepts extracted from approved memories, enabling semantic search and reasoning. Facts are linked to concepts, allowing traversal-based discovery.
|
|
662
|
+
|
|
663
|
+
```bash
|
|
664
|
+
# Keyword search
|
|
665
|
+
/kg_search python # Simple keyword match
|
|
666
|
+
|
|
667
|
+
# Semantic similarity search
|
|
668
|
+
/kg_search python mode=embedding # Find semantically similar facts
|
|
669
|
+
|
|
670
|
+
# Graph traversal search
|
|
671
|
+
/kg_search python mode=link depth=3 # Traverse graph links
|
|
672
|
+
|
|
673
|
+
# Hybrid search (combines methods)
|
|
674
|
+
/kg_search python mode=all # All methods combined
|
|
675
|
+
|
|
676
|
+
# Explore concepts
|
|
677
|
+
/kg_search type=concepts # List all concepts
|
|
678
|
+
/kg_search concept="Machine Learning" # Explore a specific concept
|
|
679
|
+
```
|
|
680
|
+
|
|
681
|
+
### Knowledge Graph Evolution
|
|
682
|
+
|
|
683
|
+
The `/sleep` command evolves the knowledge graph through consolidation, abstraction, and creative synthesis:
|
|
684
|
+
|
|
685
|
+
```bash
|
|
686
|
+
# Basic sleep (consolidation)
|
|
687
|
+
/sleep
|
|
688
|
+
|
|
689
|
+
# Import approved memories first, then evolve
|
|
690
|
+
/sleep backfill=true
|
|
691
|
+
|
|
692
|
+
# Dream mode - creative synthesis across domains
|
|
693
|
+
/sleep dream=true
|
|
694
|
+
|
|
695
|
+
# Combined backfill and dream
|
|
696
|
+
/sleep backfill=true dream=true
|
|
697
|
+
|
|
698
|
+
# Specific operations
|
|
699
|
+
/sleep ops=prune,deepen,abstract
|
|
700
|
+
```
|
|
701
|
+
|
|
702
|
+
**Operations:**
|
|
703
|
+
- **prune** - Remove redundant or low-value facts
|
|
704
|
+
- **deepen** - Add detail to existing facts
|
|
705
|
+
- **abstract** - Create higher-level generalizations
|
|
706
|
+
- **link** - Connect related facts and concepts
|
|
707
|
+
|
|
708
|
+
### Environment Variables
|
|
709
|
+
|
|
710
|
+
```bash
|
|
711
|
+
# Enable/disable automatic KG building (default: enabled)
|
|
712
|
+
export NPCSH_BUILD_KG=1
|
|
713
|
+
|
|
714
|
+
# Database path
|
|
715
|
+
export NPCSH_DB_PATH=~/npcsh_history.db
|
|
716
|
+
```
|
|
717
|
+
|
|
629
718
|
## Read the Docs
|
|
630
719
|
To see more about how to use the jinxs and modes in the NPC Shell, read the docs at [npc-shell.readthedocs.io](https://npc-shell.readthedocs.io/en/latest/)
|
|
631
720
|
|
|
@@ -493,6 +493,9 @@ npc vixynt "a sunset over mountains"
|
|
|
493
493
|
| `/teamviz` | Visualize team structure. Usage: `/teamviz save=output.png` |
|
|
494
494
|
| `/ots` | Screenshot analysis. Usage: `/ots` then select area |
|
|
495
495
|
| `/sleep` | Evolve knowledge graph. Usage: `/sleep --ops link_facts,deepen` |
|
|
496
|
+
| `/kg_search` | Search knowledge graph with multiple modes. Usage: `/kg_search query mode=hybrid depth=2` |
|
|
497
|
+
| `/mem_search` | Search approved memories. Usage: `/mem_search query status=approved top_k=10` |
|
|
498
|
+
| `/mem_review` | Review pending memories interactively. Usage: `/mem_review limit=50` |
|
|
496
499
|
|
|
497
500
|
### System & Config
|
|
498
501
|
| Command | Description |
|
|
@@ -523,6 +526,92 @@ npc vixynt "a sunset over mountains"
|
|
|
523
526
|
--format (-f) | --num_frames (-num_f) | --sprovider (-s) |
|
|
524
527
|
```
|
|
525
528
|
|
|
529
|
+
## Memory & Knowledge Graph
|
|
530
|
+
|
|
531
|
+
`npcsh` maintains a memory lifecycle system that allows agents to learn and grow from past interactions. Memories progress through stages and can be incorporated into a knowledge graph for advanced retrieval.
|
|
532
|
+
|
|
533
|
+
### Memory Lifecycle
|
|
534
|
+
|
|
535
|
+
Memories are extracted from conversations and follow this lifecycle:
|
|
536
|
+
|
|
537
|
+
1. **pending_approval** - New memories awaiting review
|
|
538
|
+
2. **human-approved** - Approved and ready for KG integration
|
|
539
|
+
3. **human-rejected** - Rejected (used as negative examples)
|
|
540
|
+
4. **human-edited** - Modified by user before approval
|
|
541
|
+
5. **skipped** - Deferred for later review
|
|
542
|
+
|
|
543
|
+
### Memory Commands
|
|
544
|
+
|
|
545
|
+
```bash
|
|
546
|
+
# Search through approved memories
|
|
547
|
+
/mem_search python # Keyword search
|
|
548
|
+
/mem_search python status=approved # Filter by status
|
|
549
|
+
/mem_search python top_k=20 # Limit results
|
|
550
|
+
|
|
551
|
+
# Review pending memories interactively
|
|
552
|
+
/mem_review # Review with default limit
|
|
553
|
+
/mem_review limit=50 # Review more at once
|
|
554
|
+
```
|
|
555
|
+
|
|
556
|
+
### Knowledge Graph
|
|
557
|
+
|
|
558
|
+
The knowledge graph stores facts and concepts extracted from approved memories, enabling semantic search and reasoning. Facts are linked to concepts, allowing traversal-based discovery.
|
|
559
|
+
|
|
560
|
+
```bash
|
|
561
|
+
# Keyword search
|
|
562
|
+
/kg_search python # Simple keyword match
|
|
563
|
+
|
|
564
|
+
# Semantic similarity search
|
|
565
|
+
/kg_search python mode=embedding # Find semantically similar facts
|
|
566
|
+
|
|
567
|
+
# Graph traversal search
|
|
568
|
+
/kg_search python mode=link depth=3 # Traverse graph links
|
|
569
|
+
|
|
570
|
+
# Hybrid search (combines methods)
|
|
571
|
+
/kg_search python mode=all # All methods combined
|
|
572
|
+
|
|
573
|
+
# Explore concepts
|
|
574
|
+
/kg_search type=concepts # List all concepts
|
|
575
|
+
/kg_search concept="Machine Learning" # Explore a specific concept
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
### Knowledge Graph Evolution
|
|
579
|
+
|
|
580
|
+
The `/sleep` command evolves the knowledge graph through consolidation, abstraction, and creative synthesis:
|
|
581
|
+
|
|
582
|
+
```bash
|
|
583
|
+
# Basic sleep (consolidation)
|
|
584
|
+
/sleep
|
|
585
|
+
|
|
586
|
+
# Import approved memories first, then evolve
|
|
587
|
+
/sleep backfill=true
|
|
588
|
+
|
|
589
|
+
# Dream mode - creative synthesis across domains
|
|
590
|
+
/sleep dream=true
|
|
591
|
+
|
|
592
|
+
# Combined backfill and dream
|
|
593
|
+
/sleep backfill=true dream=true
|
|
594
|
+
|
|
595
|
+
# Specific operations
|
|
596
|
+
/sleep ops=prune,deepen,abstract
|
|
597
|
+
```
|
|
598
|
+
|
|
599
|
+
**Operations:**
|
|
600
|
+
- **prune** - Remove redundant or low-value facts
|
|
601
|
+
- **deepen** - Add detail to existing facts
|
|
602
|
+
- **abstract** - Create higher-level generalizations
|
|
603
|
+
- **link** - Connect related facts and concepts
|
|
604
|
+
|
|
605
|
+
### Environment Variables
|
|
606
|
+
|
|
607
|
+
```bash
|
|
608
|
+
# Enable/disable automatic KG building (default: enabled)
|
|
609
|
+
export NPCSH_BUILD_KG=1
|
|
610
|
+
|
|
611
|
+
# Database path
|
|
612
|
+
export NPCSH_DB_PATH=~/npcsh_history.db
|
|
613
|
+
```
|
|
614
|
+
|
|
526
615
|
## Read the Docs
|
|
527
616
|
To see more about how to use the jinxs and modes in the NPC Shell, read the docs at [npc-shell.readthedocs.io](https://npc-shell.readthedocs.io/en/latest/)
|
|
528
617
|
|