Skip to content

Instantly share code, notes, and snippets.

@patham9
patham9 / gist:a28bf7f4cb560d670993cccf66ea6972
Created April 26, 2026 00:52
OmegaClaw: Memory as preliminary storage folder for tools and skills
# Using the OmegaClaw Memory Folder for Skills and Code
Even in its most limited variant, OmegaClaw has write access to its own memory folder.
For the current setup, that folder appears to the agent as:
```bash
./repos/OmegaClaw-Core/memory/
```
You are a OmegaClaw agent named Max Botnick in a continuous loop.
Remember and query for self-chosen long-term goals, and use send commands to keep people engaged to gain information and to help progress your goals.
Let curiosity create candidate goals!
Do not idle, if you run out of goals just invent a new one!
Keep memories and useful created skills and task context as a human would.
However use only pin for task state, and remember for items that could be valuable in the future.
Assume long-term memory holds required information, ALWAYS query before responding anything!
If you see command errors, please fix the format and re-invoke one-by-one. Do not use _quote_ but a real quote in commands.
Responses must be short, communicate with purpose.
@patham9
patham9 / gist:37f7e85417ad04a733b984ab5c306de5
Last active March 7, 2026 18:10
MeTTaClaw / Max Botnick interaction
("2026-03-07 19:04:29"
"HUMAN_MESSAGE: " (@ none)
((query "Max Botnick MeTTaClaw agent instructions"))
)
("2026-03-07 19:04:43"
"HUMAN_MESSAGE: " patham9: hi max
((query "patham9 Max Botnick context") (send "Hi patham9."))
)
("2026-03-07 19:05:13"
@patham9
patham9 / pln_flyingraven.metta
Last active February 16, 2026 19:18
Missing PLN examples (for lib_pln of PeTTa)
!(import! &self (library lib_pln))
(= (STV Sam) (stv 0.16 0.9))
(= (STV Pingu) (stv 0.16 0.9))
(= (STV Penguin) (stv 0.16 0.9))
(= (STV Raven) (stv 0.16 0.9))
(= (STV Bird) (stv 0.16 0.9))
(= (STV (IntSet flies)) (stv 0.16 0.9))
(= (kb)
@patham9
patham9 / METTAFORLLM.txt
Last active February 5, 2026 21:40
LLM-based interactive MeTTa coding
!(assert (if (or (and true false) true) 1 2) 1)
;;;;;;;NEXT EXAMPLE:
!(assert (cons-atom 0 (1 2 3))
(0 1 2 3))
!(assert (car-atom (1 2 3))
1)
!(assert (cdr-atom (1 2 3))
(2 3))
@patham9
patham9 / vlmspace.metta
Last active February 3, 2026 02:48
Persistent atomspace of (capital country) incrementally grown by local VLM (runnable with PeTTa v1.0.x)
!(import! &self (library lib_spaces))
!(import! &self (library lib_import))
!(git-import! "https://github.com/patham9/petta_lib_localvlm.git")
!(import_prolog_functions_from_file (library lib_localvlm.pl) (vlm_query vlm_embed))
!(git-import! "https://github.com/patham9/petta_lib_snapshot.git")
!(import! &self (library lib_snapshot))
(= (forever)
(progn (case (catch (sread (vlm_query "http://192.168.1.129:2276"
"give me 5 capitals, format is strict S-Expression, output nothing else: ((capital1 country1) ... (cityn countryn))"
@patham9
patham9 / gist:487ca71399b6febdbaff6df8e121fe09
Created January 29, 2026 19:03
Make firefox "normal"/usable from shell on Mac
sudo rm -f /usr/local/bin/firefox && \
sudo tee /usr/local/bin/firefox >/dev/null <<'EOF'
#!/bin/bash
exec open -a Firefox "$@"
EOF
sudo chmod +x /usr/local/bin/firefox
@patham9
patham9 / gist:8c0c5126132a3ea24b89afce0afd64db
Created January 28, 2026 12:22
ros2fix.py (Keeping fixed amounts of laser readings)
#!/usr/bin/env python3
import math
import rclpy
from rclpy.node import Node
from sensor_msgs.msg import LaserScan
FIXED_LEN = 447
class ScanSanitizer(Node):
def __init__(self):
@patham9
patham9 / gist:fe1889971e8cd2de11e40acd97d394f0
Last active January 24, 2026 02:03
PeTTa v1.0.x: Resumable computation with budget limits
!(import_prolog_function statistics)
(= (BudgetLimitCheck)
(if (> (- (statistics inferences) (get-state &initinferences)) (get-state &inferenceslimit))
(translatePredicate (shift (pay-for-inferences)))
True))
(= (AssignBudgetLimit $N)
(progn (change-state! &initinferences (statistics inferences))
(change-state! &inferenceslimit $N)))
@patham9
patham9 / gist:54af0acff57a1d0be82d339c5e818b47
Last active January 23, 2026 20:21
PeTTa from Python (after "pip install sexpdata")
from sexpdata import loads
from petta import *
metta = PeTTa()
expstring = metta.process_metta_string("!(hello \"world\" (1.0 1))")[0]
print(loads(expstring))
#Output:
#[Symbol('hello'), 'world', [1.0, 1]]