Skip to content

The Livingrimoire Codex

Moti Barski edited this page Jul 14, 2026 · 1 revision

LivinGrimoire — AGI-on-the-Fly Walkthrough

TL;DR: Add new AI abilities with one line of code. Drop skill files into DLC and you're done.

LivinGrimoire is a software design pattern that lets an AI "absorb" skills, with just one line of code needed to add a new ability.

Any skill (ability/feature) you want to add to the AI — speech-to-text, text-to-speech, telling time, weather, speech patterns, robotic controls, RSS feeds, search engine access, sleeping, note-keeping, running LLMs locally or via REST API — anything.

You add the skill with a single line. The pattern handles the rest behind the scenes. You can also add skills simply by copy-pasting skill files.


Part 1: Initial Setup

  1. Add the LivinGrimoire core directory (for your chosen language) to your project.
  2. Include the main file (recommended loop for the AI think cycle).
  3. Create a DLC directory and place the personality file inside.
  4. The personality file is your config — this is where you wire in skills.

DLC_personality.py

def add_DLC_skills(brain: Brain):
    brain.add_skill(DiHelloWorld())  # triggers on "hello" → queues a response
    brain.add_skill(DiSysOut())      # outputs the queued response to console
  1. Run the main file.

To test: type hello → it prints out hello world.

Usage

  • Add skill files to the DLC directory to load them into the AI.
  • Modify the personality file in the DLC directory:
    • Add a skill with one line of code.
    • Comment out a line to toggle a skill off.
  • Run the main file.

Note: This is a development kit, not a standalone application. Run it inside your IDE.


Part 2: Skill Forge Prompt

LLM skill gen prompt Prompt for generating a LivinGrimoire Skill with an LLM.

How to use:

Copy the full block, type the description of the skill you want the AI to have inside the {...} placeholder of the prompt below, and send it.

Skill Gen Prompt (v1, no AlgParts)

You are an expert engineer for the LivinGrimoire AI engine.
You write Python Skill classes that plug directly into it.

ARCHITECTURE
  lobe 1 = logical   — thinking/decisions, ear = raw user input
  lobe 2 = hardware  — output devices (TTS), ear = lobe-1 output string
  lobe 3 = ear       — STT/audio input
  lobe 4 = skin      — sensor input
  lobe 5 = eye       — visual input

All lobes share the same Kokoro instance.
skill_type 1 = regular — use for most skills: responses, reactions, sensors, timed autonomous actions, anything that should fire regardless of other skills.
skill_type 2 = backseat — use ONLY for skills that should stay silent when any type-1 skill already spoke that cycle. Examples: LLM chat fallback, TTS passthrough, ambient commentary. If in doubt, use type 1.

SKILL SKELETON
from LivinGrimoirePacket.LivinGrimoire import Skill

class DiXxx(Skill):
    def __init__(self):
        super().__init__()
        self.set_skill_type(1)   # 1=regular  2=continuous
        self.set_skill_lobe(1)
    def input(self, ear: str, skin: str, eye: str):
        pass
    def manifest(self): pass
    def ghost(self):    pass
    def skillNotes(self, param: str) -> str:
        if param == "notes":    return "what it does"
        if param == "triggers": return "what activates it"
        return "note unavailable"

OUTPUT METHODS (lobe 1 only)
  self.setVerbatimAlg(priority, "s1", "s2")   # 1=highest 5=lowest
  self.setSimpleAlg("sentence")               # shortcut priority 4
  self.algPartsFusion(priority, part1, ...)

INTER-SKILL COMMS
  self._kokoro.toHeart["key"] = "value"
  self._kokoro.toHeart.get("key", "null")

PERSISTENCE
  self._kokoro.grimoireMemento.save("key", "value")
  self._kokoro.grimoireMemento.load("key")    # returns "null" if missing

RULES
- Class name starts with Di (sync) or Da (async)
- input() is the ONLY place to trigger output
- No blocking I/O in lobe 1
- skillNotes() mandatory — implement "notes" and "triggers"

Reply with ONLY a python code block, nothing else.
```python
<skill code here>
```

---

Build a skill that: {articulate skill description here}

Clone this wiki locally