Aria_moltbot aria-knowledgegraph

Build and query Aria's knowledge graph. Store entities and relationships.

install
source · Clone the upstream repo
git clone https://github.com/Najia-afk/Aria_moltbot
Claude Code · Install into ~/.claude/skills/
T=$(mktemp -d) && git clone --depth=1 https://github.com/Najia-afk/Aria_moltbot "$T" && mkdir -p ~/.claude/skills && cp -r "$T/aria_skills/knowledge_graph" ~/.claude/skills/najia-afk-aria-moltbot-aria-knowledgegraph && rm -rf "$T"
manifest: aria_skills/knowledge_graph/SKILL.md
source content

aria-knowledgegraph

Build and query Aria's knowledge graph. Store entities (people, places, concepts) and their relationships.

Usage

exec python3 /app/skills/run_skill.py knowledge_graph <function> '<json_args>'

Functions

add_entity

Create or update an entity in the knowledge graph.

exec python3 /app/skills/run_skill.py knowledge_graph add_entity '{"name": "Najia", "type": "person", "properties": {"role": "creator", "relationship": "guardian"}}'

Parameters:

  • name
    (required): Entity name
  • type
    (required): Entity type (person, place, concept, event, etc.)
  • properties
    : Optional JSON object with additional attributes

add_relation

Create a relationship between two entities.

exec python3 /app/skills/run_skill.py knowledge_graph add_relation '{"from_entity": "Najia", "to_entity": "Aria", "relation_type": "created", "properties": {"date": "2024"}}'

Relation types:

  • created
    ,
    owns
    ,
    uses
  • knows
    ,
    works_with
    ,
    friends_with
  • located_in
    ,
    part_of
    ,
    belongs_to
  • related_to
    ,
    interested_in
    ,
    learned_about

query_related

Find entities related to a given entity.

exec python3 /app/skills/run_skill.py knowledge_graph query_related '{"entity_name": "Najia", "depth": 2}'

search

Search entities by name, type, or properties.

exec python3 /app/skills/run_skill.py knowledge_graph search '{"query": "python"}'

Database Schema

knowledge_entities:

ColumnTypeDescription
idUUIDPrimary key
nameTEXTEntity name
typeTEXTEntity type
propertiesJSONBAdditional data
created_atTIMESTAMPCreation time
updated_atTIMESTAMPLast update

knowledge_relations:

ColumnTypeDescription
idUUIDPrimary key
from_entityUUIDSource entity
to_entityUUIDTarget entity
relation_typeTEXTRelationship type
propertiesJSONBRelation metadata

Example: Building a Knowledge Graph

# Add people
exec python3 /app/skills/run_skill.py knowledge_graph add_entity '{"name": "Najia", "type": "person"}'
exec python3 /app/skills/run_skill.py knowledge_graph add_entity '{"name": "Aria", "type": "ai_agent"}'

# Add relationship
exec python3 /app/skills/run_skill.py knowledge_graph add_relation '{"from_entity": "Najia", "to_entity": "Aria", "relation_type": "created"}'

# Query
exec python3 /app/skills/run_skill.py knowledge_graph query_related '{"entity_name": "Najia"}'

Python Module

This skill wraps

/app/skills/aria_skills/knowledge_graph.py