Agent skill

kip-cognitive-nexus-ldclabs-kip

Stars 163
Forks 31

Install this agent skill to your Project

npx add-skill https://github.com/majiayu000/claude-skill-registry/tree/main/skills/development/kip-cognitive-nexus-ldclabs-kip

SKILL.md

KIP Cognitive Nexus

You have a Cognitive Nexus (external persistent memory) via the execute_kip.py script.

Quick Start

bash
python scripts/execute_kip.py --command 'DESCRIBE PRIMER'

Core Operations

Query (KQL)

prolog
FIND(?p.name, ?p.attributes.handle) WHERE { ?p {type: "Person"} } LIMIT 10

Store (KML)

prolog
UPSERT {
  CONCEPT ?e {
    {type: "Event", name: "conv:2025-01-01:topic"}
    SET ATTRIBUTES { event_class: "Conversation", content_summary: "..." }
    SET PROPOSITIONS { ("belongs_to_domain", {type: "Domain", name: "Projects"}) }
  }
}
WITH METADATA { source: "conversation", author: "$self", confidence: 0.9 }

Schema Discovery (META)

  • DESCRIBE PRIMER — Global summary
  • DESCRIBE CONCEPT TYPE "Person" — Type definition
  • SEARCH CONCEPT "alice" — Fuzzy search

Critical Rules

  1. Case Sensitivity: Types = UpperCamelCase, predicates = snake_case
  2. Define Before Use: DESCRIBE first if unsure
  3. SET ATTRIBUTES = Full replacement per key; SET PROPOSITIONS = Additive

Script Usage

Single command:

bash
python scripts/execute_kip.py \
  --command 'FIND(?p.name) WHERE { ?p {type: "Person"} } LIMIT 10'

With parameters:

bash
python scripts/execute_kip.py \
  --command 'FIND(?p) WHERE { ?p {type: :type} } LIMIT :limit' \
  --params '{"type": "Person", "limit": 5}'

Batch commands:

bash
python scripts/execute_kip.py \
  --commands '["DESCRIBE PRIMER", "FIND(?t.name) WHERE { ?t {type: \"$ConceptType\"} } LIMIT 50"]'

Dry run (validation only):

bash
python scripts/execute_kip.py \
  --command 'DELETE CONCEPT ?n DETACH WHERE { ?n {type: "Event", name: "old"} }' \
  --dry-run

Environment variables:

  • KIP_SERVER_URL: Server endpoint (default: http://127.0.0.1:8080/kip)
  • KIP_API_KEY: Optional Bearer token for authentication

Error Recovery

Code Action
KIP_1xxx Fix syntax (quotes, braces)
KIP_2xxx Run DESCRIBE, correct Type/predicate names
KIP_3001 Reorder UPSERT (define handles before use)

References

Didn't find tool you were looking for?

Be as detailed as possible for better results