Update 1 file:
org-inbox.org
This commit is contained in:
412
org-inbox.org
412
org-inbox.org
@@ -8526,6 +8526,386 @@ The Verdict on the Workflow
|
||||
By building org-agent, you are creating a system where your daily GTD notes, your infrastructure commands, and your AI's source code all share the exact same syntax. It is the ultimate manifestation of "Code is Data."
|
||||
Would you like me to draft the Lisp parser function that reads an .org skill file and translates its #+NAME and #+BEGIN_SRC blocks into callable Lisp functions for the agent's whitelist?
|
||||
|
||||
*** Orgt-agent components
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 02:15]
|
||||
:END:
|
||||
|
||||
A "nano" agent strips away the massive abstraction layers found in frameworks like OpenClaw and reduces the architecture to a pure Perceive-Think-Act loop. Because Lisp treats code and data interchangeably (homoiconicity), building a minimalist agent in Common Lisp is incredibly elegant. You don't need a massive framework; you just need a few interconnected functions.
|
||||
Here are the five core components of a Lisp nano agent:
|
||||
1. The Orchestration Loop (The Heartbeat)
|
||||
This is the engine of the proactive agent. Instead of a heavy Node.js or Python background manager, a Lisp nano agent uses a simple recursive function or a lightweight scheduler (like cl-cron) to run the main loop.
|
||||
Function: It wakes up at set intervals (e.g., every 5 minutes), triggers the perception module, and decides if it needs to act.
|
||||
Lisp Advantage: It idles with almost zero resource overhead in your Lisp image until it's time to run.
|
||||
2. The Perception Interface (Sensors)
|
||||
Before the agent can think, it needs to read its environment. The perception module consists of small functions that gather the current state of your system.
|
||||
Implementation: These are functions that scrape data without invoking the AI. For example, reading the latest org-mode buffers, checking the status of a staging container on Proxmox, or parsing the stdout of a recent GitOps deployment.
|
||||
Goal: To assemble a dense, text-based "snapshot" of the current world state to feed into the reasoning engine.
|
||||
3. The Reasoning Gateway (LLM Connection)
|
||||
This is the "brain," but in a nano agent, it's just a thin API wrapper. It takes the snapshot from the perception module, attaches a system prompt, and sends it to the large language model.
|
||||
Implementation: A simple HTTP client in Lisp that POSTs to the local LLMs running on your server rack (via an OpenAI-compatible endpoint or a direct API).
|
||||
Output: It expects a strictly formatted response back, often requesting the LLM to output its decision as a valid Lisp s-expression like (deploy-update :server "staging") rather than a markdown block.
|
||||
4. The Action/Tool Execution Layer (Effectors)
|
||||
If the reasoning engine decides an action is necessary, this layer executes it. In heavy frameworks, "skills" or "tools" require complex JSON schemas to register. In a Lisp nano agent, tools are literally just Lisp functions.
|
||||
Implementation: You maintain a whitelist of exported functions (e.g., (restart-container "web") or (append-to-org "inbox" "Check memory usage")).
|
||||
Security: Because you define exactly which functions are in the agent's executable package, the risk of a hallucinated command wiping your host machine is heavily mitigated compared to open-ended shell execution.
|
||||
5. Memory and State Management
|
||||
A nano agent needs to remember what it just did to avoid getting stuck in loops, but it doesn't need a heavy vector database like QMD-Skill running at all times if the context is managed well.
|
||||
Short-term State: The history of the current loop, kept right in the local variables of the Lisp execution environment.
|
||||
Long-term Memory: Instead of a complex database, the agent can use your existing org-mode files as its native memory. It can read tagged #+NAME: blocks to recall past decisions or write new notes to an agent-log.org file to establish persistence across reboots.
|
||||
|
||||
*** Implementation
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 02:23]
|
||||
:END:
|
||||
|
||||
Building a nano agent directly in Common Lisp is an elegant approach. Because Lisp is homoiconic (code is data, data is code), you don't need complex JSON parsers to handle tool calling. The LLM can just output native Lisp s-expressions, and your agent can evaluate them.
|
||||
Here is a skeletal implementation of the Sol agent. It uses bordeaux-threads for the background heartbeat and dexador to make HTTP requests to your local inference server.
|
||||
|
||||
(defpackage :sol-agent
|
||||
(:use :cl :bordeaux-threads :dexador :jonathan))
|
||||
|
||||
(in-package :sol-agent)
|
||||
|
||||
;; 1. Memory & State Management
|
||||
(defvar *sol-memory-file* #P"~/org/sol-memory.org")
|
||||
(defvar *agent-active* nil)
|
||||
|
||||
;; 2. The Perception Interface (Sensors)
|
||||
(defun perceive-environment ()
|
||||
"Scrapes the current state of the homelab and GTD inbox."
|
||||
(let ((org-inbox-content (uiop:read-file-string #P"~/org/inbox.org"))
|
||||
;; Quickly check the status of a staging LXC container
|
||||
(proxmox-status (uiop:run-program '("pct" "status" "101") :output :string)))
|
||||
(format nil "ORG INBOX:~%~a~%PROXMOX STAGING:~%~a"
|
||||
org-inbox-content proxmox-status)))
|
||||
|
||||
;; 3. The Reasoning Gateway (LLM Connection)
|
||||
(defun think (context-snapshot)
|
||||
"Sends the state to the local LLM cluster."
|
||||
(let* ((prompt (format nil "System: You are Sol. You reply ONLY in valid Common Lisp s-expressions.~%Context:~%~a~%Decide next action:" context-snapshot))
|
||||
;; Pointing to your local inference server API
|
||||
(response (dex:post "http://10.0.0.50:8080/v1/completions"
|
||||
:headers '(("Content-Type" . "application/json"))
|
||||
:content (jojo:to-json `(:model "local-model-name"
|
||||
:prompt ,prompt
|
||||
:max_tokens 100)))))
|
||||
;; Extract the s-expression string from the JSON response
|
||||
(read-from-string (getf (jojo:parse response) :text))))
|
||||
|
||||
;; 4. The Action Layer (Effectors)
|
||||
(defun act (decision)
|
||||
"Executes the Lisp form if it's in the allowed skillset."
|
||||
;; Strict whitelist to prevent malicious or hallucinated execution
|
||||
(let ((allowed-actions '(deploy-lxc append-to-org alert-user)))
|
||||
(if (member (car decision) allowed-actions)
|
||||
(eval decision)
|
||||
(format t "Security Block: ~a is not an allowed action.~%" (car decision)))))
|
||||
|
||||
;; 5. The Orchestration Loop (The Heartbeat)
|
||||
(defun sol-tick ()
|
||||
"A single iteration of the agent loop."
|
||||
(let* ((context (perceive-environment))
|
||||
(decision (think context)))
|
||||
(act decision)))
|
||||
|
||||
(defun start-sol ()
|
||||
"Spawns the proactive nano agent in a background thread."
|
||||
(setf *agent-active* t)
|
||||
(bt:make-thread
|
||||
(lambda ()
|
||||
(loop while *agent-active* do
|
||||
(ignore-errors (sol-tick))
|
||||
(sleep 300))) ; Wakes up every 5 minutes
|
||||
:name "Sol-Background-Loop"))
|
||||
|
||||
(defun stop-sol ()
|
||||
"Kills the heartbeat."
|
||||
(setf *agent-active* nil))
|
||||
|
||||
|
||||
Why this architecture works:
|
||||
Zero Idle Overhead: When (sleep 300) is running, the Lisp thread consumes virtually no CPU. It waits patiently in the background.
|
||||
Native Tool Calling: In the think function, we instruct the LLM to reply purely in Lisp. If the LLM decides to log a task, it outputs (append-to-org "Check LXC 101 memory limit"). The act function simply runs eval on it, provided the function name is in the safety whitelist.
|
||||
Context is Code: The perceive-environment function gathers your actual working environment—reading your Org files and checking server status directly—giving the LLM real, actionable context rather than abstract instructions.
|
||||
|
||||
*** Generalized agent framework
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 02:45]
|
||||
:END:
|
||||
|
||||
Pivoting to a generalized, modular org-agent is a massive architectural upgrade. By treating everything—from Proxmox management to the LLM backend itself—as a swappable "skill," you shift the complexity out of your Lisp engine and into plain text.
|
||||
Adapting the agentskills.io standard (which relies on SKILL.md, YAML, and separate script folders) into pure Org-mode creates an incredibly elegant, self-contained system. Because Org-mode natively supports metadata, tree structures, and executable code (via Org-Babel), an entire skill can live in a single .org file.
|
||||
Here is how to structure org-agent using sensible open-source defaults.
|
||||
1. The Core Engine (The Lisp Microkernel)
|
||||
The Lisp engine itself should be aggressively minimalist (under 500 lines). It has exactly three jobs:
|
||||
The Heartbeat: A loop that wakes up and checks a central inbox.org.
|
||||
The Skill Parser: A function that reads your skills/ directory and loads the #+DESCRIPTION of each .org file into the active context (Progressive Disclosure).
|
||||
The Executor: A wrapper around org-babel-execute-src-block that runs the code the LLM decides to trigger.
|
||||
2. Sensible Open-Source Defaults (Implemented as Skills)
|
||||
Instead of hardcoding integrations, org-agent boots up and "reads" its capabilities from your filesystem.
|
||||
The LLM Backend Skill: Instead of hardcoding API calls in Lisp, the LLM connection is just another skill.
|
||||
Default: vLLM or llama.cpp. You can create an llm-vllm.org skill that instructs the agent how to POST to your local GPU server's OpenAI-compatible endpoint. To swap models or engines, you just load a different skill file.
|
||||
The Memory Skill: * Default: org-roam. Instead of a heavy vector database like QMD-Skill, the agent uses an org-roam.org skill. The skill provides instructions on how to use Lisp functions to search your Zettelkasten nodes and follow backlinks to retrieve context.
|
||||
The State & Task Skill: * Default: org-gtd. The agent reads your agenda.org to know what you are doing today. It can use this skill to append new tasks to your inbox or update the state of a current project.
|
||||
The Infrastructure Skill:
|
||||
Default: Proxmox. A proxmox.org skill that defines how the agent can interact with your staging and production environments using the pct and qm command-line tools.
|
||||
3. The org-skills Standard
|
||||
In the agentskills.io standard, a skill requires a folder with a SKILL.md, YAML frontmatter, and a scripts/ subdirectory. In org-agent, all of this collapses beautifully into one file using native Org syntax:
|
||||
YAML Frontmatter becomes #+TITLE, #+DESCRIPTION, and :PROPERTIES: drawers.
|
||||
Markdown Instructions become standard Org-mode text and lists.
|
||||
Executable Scripts become #+BEGIN_SRC blocks that the agent can execute directly.
|
||||
Here is what your proxmox.org skill would look like:
|
||||
|
||||
#+TITLE: Proxmox Management Skill
|
||||
#+DESCRIPTION: Use this skill when the user asks to manage, check, or deploy LXC containers and VMs.
|
||||
#+PROPERTY: ALLOWED-TOOLS bash
|
||||
|
||||
* Instructions
|
||||
When interacting with the homelab infrastructure:
|
||||
1. Always check the status of the container before attempting a restart.
|
||||
2. Use the provided Org-Babel blocks to execute actions. Provide the `vmid` as a variable.
|
||||
|
||||
* Scripts
|
||||
** Check Container Status
|
||||
#+NAME: get-pct-status
|
||||
#+BEGIN_SRC bash :var vmid="100" :results output
|
||||
pct status $vmid
|
||||
#+END_SRC
|
||||
|
||||
** Restart Container
|
||||
#+NAME: restart-pct
|
||||
#+BEGIN_SRC bash :var vmid="100" :results output
|
||||
pct stop $vmid && pct start $vmid
|
||||
#+END_SRC
|
||||
|
||||
The "Self-Editing" Advantage
|
||||
Because the agent uses Org-Babel, it is inherently self-editing. If the agent needs a new capability, you can simply ask it: "Write a new skill for GitLab CI/CD and save it as gitlab.org in your skills folder." The agent will generate the Org file with the appropriate #+NAME blocks, and on the next loop, org-agent will parse it and acquire the new capability.
|
||||
Would you like me to draft the Lisp parser function that scans a directory of these .org files and extracts the #+DESCRIPTION tags to build the agent's initial prompt?
|
||||
|
||||
|
||||
*** Org-agent brief
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 02:53]
|
||||
:END:
|
||||
|
||||
Project Brief: org-agent
|
||||
Mission: Build a hyper-minimalist, self-editing, proactive AI agent framework in Common Lisp. The system must use Org-mode as its exclusive interface for memory, state, and skill configuration, rejecting Markdown and JSON overhead.
|
||||
Target Environment: A Linux/Proxmox homelab, running local inference servers, heavily utilizing GitOps and Lisp-based development.
|
||||
1. Core Architecture (The Lisp Microkernel)
|
||||
The engine must be under 500 lines of Common Lisp. It does not contain hardcoded AI logic; it is strictly a Perceive-Think-Act loop engine that evaluates text.
|
||||
The Heartbeat: A lightweight bordeaux-threads loop that awakens periodically with near-zero idle resource consumption.
|
||||
The State Reader: Parses the user's GTD inbox.org and agenda.org to establish the current "World State."
|
||||
The Org Parser: A custom Lisp function that scans a skills/ directory, extracting #+DESCRIPTION, :PROPERTIES:, and #+BEGIN_SRC blocks from .org files.
|
||||
The Executor: Evaluates Org-Babel source blocks natively, allowing the agent to run Bash, Python, or Lisp scripts directly from its own thought process.
|
||||
2. The Skill System (Adapting AgentSkills.io)
|
||||
Instead of relying on SKILL.md or OpenCode's AGENTS.md, all capabilities are defined as self-contained .org files.
|
||||
Dynamic Loading: The agent reads these files on boot. If the agent generates a new .org file via an LLM output, it instantly acquires that new skill on the next heartbeat.
|
||||
Progressive Disclosure: To save token context, the agent only loads the #+DESCRIPTION of a skill initially. It must explicitly request the full #+BEGIN_SRC implementation if it decides to use it.
|
||||
3. LLMs and Coding Agents as "Effectors"
|
||||
org-agent treats AI models and external SDKs exactly like it treats a Proxmox server—as a downstream tool to be managed.
|
||||
4. Security & Isolation
|
||||
Because org-agent runs directly on the host machine to manage Proxmox and GitOps, security is handled via strict allow-lists within the Lisp kernel.
|
||||
The LLM backend is instructed to output strictly formatted Lisp s-expressions (e.g., (invoke-skill "proxmox" "restart-staging")).
|
||||
The Lisp Executor will only evaluate forms where the car (the function name) matches a predefined, safe whitelist.
|
||||
|
||||
*** Security and isolation
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:00]
|
||||
:END:
|
||||
|
||||
The candid truth is that Common Lisp was designed in an era of trusted users on shared mainframes. Because it is highly dynamic and homoiconic, building a perfect, impenetrable sandbox entirely within Lisp is notoriously difficult. NanoClaw uses Docker because OS-level containerization is simply easier than trying to tame Lisp's immense power.
|
||||
However, there is absolutely a "Lisp way" to handle security. Instead of wrapping the entire application in a heavy container, Lisp relies on language-level compartmentalization.
|
||||
If you are building org-agent to evaluate LLM-generated code, you must construct a defense in depth using Lisp's internal mechanics.
|
||||
Here are the three distinct "gates" of Lisp isolation:
|
||||
Gate 1: The Reader (*read-eval*)
|
||||
In Lisp, the function that parses text into code (READ) is dangerously powerful. By default, the Lisp reader contains a macro #. which tells it to evaluate the following code during the parsing phase, before it even hits the compiler. If an LLM hallucinates #.(uiop:run-program "rm -rf /"), a standard READ will execute it instantly.
|
||||
The Fix: You must bind *read-eval* to NIL whenever parsing untrusted text from an AI.
|
||||
|
||||
(defun safe-read-llm-output (string)
|
||||
(let ((*read-eval* nil)) ;; Gate 1: Closes the parsing loophole
|
||||
(read-from-string string)))
|
||||
|
||||
Gate 2: The Namespace (Packages)
|
||||
In Python or Node, untrusted code often runs in the same global namespace. In Lisp, you use Packages to create a strict, isolated dictionary of allowed words.
|
||||
The Fix: Create a package for org-agent that does not inherit from Common Lisp. If it doesn't inherit :cl, the AI literally cannot express the concept of EVAL, DELETE-FILE, or RUN-PROGRAM. It can only use the explicit skills you give it.
|
||||
|
||||
;; Gate 2: The Sandbox Package
|
||||
(defpackage :org-agent-sandbox
|
||||
(:use) ;; Do NOT use :cl! This leaves the package completely empty.
|
||||
;; Explicitly import only what the agent is allowed to do
|
||||
(:import-from :cl :list :string= :format)
|
||||
(:import-from :org-agent-skills :read-agenda :deploy-staging-lxc))
|
||||
|
||||
When you read the LLM's output, you bind *package* to this sandbox. If the LLM tries to call a function not in this list, Lisp throws an immediate "undefined function" error.
|
||||
Gate 3: The Evaluator (Macro-Walking)
|
||||
Even with a restricted package, LLMs can be clever. If you allow them to define macros or use complex control structures, they might find a way to break out of the namespace.
|
||||
The Fix: Instead of passing the parsed code to EVAL, org-agent should use a simple whitelist executor that only evaluates flat function calls.
|
||||
|
||||
(defun execute-agent-form (form)
|
||||
"Only executes if the first element is a strictly approved skill."
|
||||
(let ((allowed-skills '(deploy-staging-lxc read-agenda)))
|
||||
(if (and (consp form) (member (car form) allowed-skills))
|
||||
(apply (car form) (cdr form)) ;; Safely apply the skill
|
||||
(error "Security Violation: Unrecognized skill."))))
|
||||
|
||||
The Ultimate Backstop: Hybrid Isolation
|
||||
Because org-agent is designed to run locally and manage complex infrastructure, relying solely on Lisp's internal packages is risky if the agent is given shell execution capabilities (like evaluating bash scripts from Org-Babel blocks).
|
||||
For a system demanding strict compartmentalization, the best architectural approach is a hybrid one:
|
||||
The Lisp Engine: Runs on your trusted host machine, using the Three Gates above to safely parse and reason about the LLM's Lisp outputs.
|
||||
The Execution Layer: When org-agent decides to run an untrusted bash script or compile unknown code, it doesn't do it on the host. It uses an infrastructure skill to spin up a disposable, isolated environment (like a temporary LXC) to run the code, fetch the stdout, and destroy the environment.
|
||||
This gives you the absolute security of hardware/OS-level isolation without the constant, heavy overhead of running the entire Lisp REPL inside a container.
|
||||
|
||||
*** Lisp machine security profile
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:20]
|
||||
:END:
|
||||
|
||||
A modern Lisp machine, like the open-source Mezzano project, is a beautiful piece of engineering, but its risk profile is fundamentally different—and generally much higher—than a hybrid containerized approach.
|
||||
The core difference comes down to Hardware Isolation vs. Language-Level Isolation.
|
||||
The Lisp Machine Model (Single Address Space OS)
|
||||
On a true Lisp machine, there is no separation between the "kernel" and "user space" (Ring 0 vs. Ring 3 in Unix/Linux). Everything from the TCP/IP stack to the window manager to your AI agent runs in the exact same giant Lisp image.
|
||||
Security in this environment relies entirely on compiler trust and type safety. If your Lisp agent tries to read a file it shouldn't, the system relies on Lisp's package system and object references to stop it.
|
||||
The Risk: If an LLM hallucinates code that manages to trick the compiler (e.g., using safety 0 optimizations, abusing ffi bindings, or exploiting a bug in the garbage collector), it has direct, unrestricted access to the bare metal. It can overwrite the bootloader because there is no underlying OS with file permissions to tell it "Access Denied."
|
||||
The org-agent Hybrid Model (Defense in Depth)
|
||||
By building org-agent on top of a standard OS, you get the cognitive elegance of a Lisp environment but with the hardware-enforced boundaries of modern hypervisors.
|
||||
|
||||
The Hypervisor Advantage
|
||||
This hybrid approach mirrors strict security compartmentalization.
|
||||
In a Qubes OS environment, security is achieved by physically isolating domains (Networking, Vault, Personal) using the Xen hypervisor. Similarly, by having org-agent orchestrate its untrusted code execution inside temporary Proxmox LXCs, you are applying that same hardware-level airgap to the AI.
|
||||
If the agent hallucinates a destructive bash script and executes it via an Org-Babel block, it is destroying a disposable staging container, not your host machine. A modern Lisp OS simply cannot offer that level of fault tolerance because the OS is the Lisp image.
|
||||
|
||||
|
||||
|
||||
*** FPGA sidecar
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:25]
|
||||
:END:
|
||||
|
||||
This "Sidecar" architecture is the most pragmatic way to give Sol a 600B-parameter brain while maintaining the hardware-level security of your Lisp-agent vision. Since a single FPGA can't hold a 600B model, but a GPU cluster can't offer verifiable "Gatekeeping," you split the duties.
|
||||
Here is the design for the Sol "Air-Gapped" Sidecar.
|
||||
1. The Architecture: "The Brain and the Guard"
|
||||
In this setup, your GPU cluster (the RTX 6000s in your rack) acts as the Cortex, while the FPGA acts as the Thalamus (the sensory gatekeeper).
|
||||
The Cortex (GPU Cluster): Runs the 600B behemoth. It handles the "deep thinking," long-term planning, and massive Lisp refactoring. It is treated as "Untrusted" because it runs on a proprietary C/CUDA stack.
|
||||
The Guard (FPGA Sidecar): This is a verified, Lisp-native "Sidecar" chip (like a Xilinx Versal or an open-source RISC-V + FPGA SoC). Every piece of data going into or out of the 600B model must pass through the FPGA's hardware logic.
|
||||
2. The Lisp Integration: "The Hardware Sandbox"
|
||||
Because you are building org-agent in Lisp, the FPGA isn't just a filter; it's a Hardware Security Module (HSM) for Lisp forms.
|
||||
Instead of the 600B model talking directly to your Proxmox server, the flow looks like this:
|
||||
Request: 600B model outputs a Lisp form: (deploy-lxc "production-server").
|
||||
Intercept: The FPGA sidecar captures this string over a dedicated serial or PCIe link.
|
||||
Verify: The FPGA runs a Hardware-Accelerated Parser. It checks the Lisp form against your "Safe Skill" whitelist. If the form isn't in the whitelist, the FPGA physically drops the packet and alerts you.
|
||||
Execute: Only after the hardware "thumbs up" does the Lisp kernel on your host machine receive the command to execute.
|
||||
3. The "Ternary" Sanity Check
|
||||
The most exciting development in 2026 is the 1.58-bit (Ternary) LLM. While an FPGA can't run a 600B model, it can run a 7B Ternary model at blistering speeds and ultra-low power.
|
||||
You can use the FPGA to run a smaller "Guardian Model" that watches the 600B model for hallucinations.
|
||||
The 600B model proposes a plan.
|
||||
The 7B Ternary model on the FPGA (which is 100% verifiable and runs on open-source weights) reviews the plan for safety violations.
|
||||
If both agree, the action proceeds. This creates a "multi-agent" check-and-balance system entirely within your local hardware.
|
||||
4. Implementation: The "Org-Agent" Sidecar Skill
|
||||
To make this work in your org-agent framework, you add a sidecar-verify.org skill. It instructs the Lisp kernel to route all "High-Privilege" commands through the FPGA device driver before execution.
|
||||
|
||||
*** Scraping
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:31]
|
||||
:END:
|
||||
|
||||
Here is a draft for the scraper-monitor.org skill. Since you are building a custom Lisp-based browser, this skill is designed to bridge the gap between your browser's internal engine and the agent's GTD-based reasoning loop.
|
||||
scraper-monitor.org Skill
|
||||
This skill allows Sol to perform "Eyes-On" monitoring. It uses your browser's native rendering to bypass bot-detection and converts messy HTML into structured Lisp s-expressions or Org headings.
|
||||
|
||||
#+TITLE: Web Monitoring & Scraping Skill
|
||||
#+DESCRIPTION: Use this skill to monitor forums (Reddit, Hacker News, Lisp-lang.org) for specific keywords and extract content into the Org-GTD inbox.
|
||||
#+PROPERTY: ALLOWED-TOOLS lisp bash
|
||||
|
||||
* Configuration
|
||||
:PROPERTIES:
|
||||
:TARGET_FORUMS: ("reddit.com/r/lisp" "news.ycombinator.com" "common-lisp.net")
|
||||
:STORAGE_FILE: "~/org/inbox.org"
|
||||
:END:
|
||||
|
||||
* Instructions
|
||||
1. When a monitor task is triggered, invoke the browser's headless mode.
|
||||
2. Filter for "Land Value Tax," "Common Lisp," or "Agentic Workflow."
|
||||
3. If a new high-signal post is found, format it as a TODO item in the storage file.
|
||||
|
||||
* Scripts
|
||||
** Quick Scrape (Regex/Text-based)
|
||||
#+NAME: fast-scrape
|
||||
#+BEGIN_SRC lisp :var url="https://news.ycombinator.com"
|
||||
(with-open-stream (s (dex:get url :want-stream t))
|
||||
(loop for line = (read-line s nil)
|
||||
while line
|
||||
when (search "Lisp" line :test #'char-equal)
|
||||
collect line))
|
||||
#+END_SRC
|
||||
|
||||
** Deep Scrape (Browser Engine Integration)
|
||||
#+NAME: browser-dom-scrape
|
||||
#+BEGIN_SRC lisp :var selector=".titleline"
|
||||
;; This leverages your custom Lisp browser's internal DOM access
|
||||
(let ((nodes (my-browser:query-selector-all selector)))
|
||||
(mapcar (lambda (node)
|
||||
(list :title (my-browser:text-content node)
|
||||
:url (my-browser:get-attribute node "href")))
|
||||
nodes))
|
||||
#+END_SRC
|
||||
|
||||
|
||||
Benefits:
|
||||
|
||||
Semantic Context Injection: When Sol is thinking about your "Agora" project, it can run this skill to see if anyone has published a new paper on "Decentralized Identity." It then injects that scraped summary directly into the 600B model's prompt.
|
||||
Autonomous GTD: The scraper doesn't just "show" you the news; it adds it to your inbox.org. It becomes a proactive clerk for your brain, filtering the noise of the internet into actionable Lisp projects.
|
||||
Bypassing Anti-Bot Measures: Because you are using your own browser engine as the scraper backend, you aren't sending "headless" signals like a standard Python script would. You appear as a legitimate user, which is critical for accessing modern high-security sites.
|
||||
The Final Piece: The "Self-Correction" Loop
|
||||
Because this is a self-editing agent, if a website changes its structure and the browser-dom-scrape fails, Sol can:
|
||||
Scrape the new raw HTML.
|
||||
Pass the HTML to its 600B brain.
|
||||
Rewrite the CSS selectors in the scraper-monitor.org file.
|
||||
Re-run the task.
|
||||
This creates a "self-healing" sensory system.
|
||||
|
||||
*** True symbolic system
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:37]
|
||||
:END:
|
||||
|
||||
Currently, your system is a Neural-Retrieval setup: the LLM reads text from a Memex (Org-mode) and tries its best to guess an answer. A neurosymbolic system, however, uses the LLM to translate your intent into a formal language that a Symbolic Reasoner then solves with 100% mathematical certainty.
|
||||
Here is what is missing to reach that "System 2" level of AI.
|
||||
1. The Missing Components
|
||||
Beyond the Memex and the LLM, you need these three distinct modules:
|
||||
The Symbolic Reasoner (The Engine): This is a rigid, non-AI piece of software like an SMT Solver (Z3), a Prolog engine, or a Datalog database. While an LLM might say "I think this container is running," a symbolic solver proves it by evaluating rules like (if (and container-exists (not container-stopped)) running).
|
||||
The Semantic Layer (The Ontology): Your Org-mode files are currently "text." To be symbolic, they must be "objects." You need an Ontology—a formal map that tells the agent that :PROPERTIES: aren't just strings; they are specific relationships (e.g., Container-101 is-a Proxmox-LXC).
|
||||
The Autoformalizer (The Bridge): This is the code that takes your natural language prompt and converts it into a formal logical expression. This is where the LLM shines.
|
||||
2. The Role of LLMs in Neurosymbolic AI
|
||||
LLMs do not handle the "reasoning" in a neurosymbolic system—they handle the perception.
|
||||
In your org-agent, the LLM’s role is that of a Translator:
|
||||
|
||||
Perception: The LLM "reads" your messy inbox.org and your infrastructure logs.
|
||||
|
||||
Formalization: It translates that "messy" data into a strict logical query, such as:
|
||||
|
||||
\exists x (LXC(x) \land Status(x, \text{Down}) \land MissionCritical(x))
|
||||
|
||||
Delegation: It sends that query to the Symbolic Reasoner (like a Lisp-based Prolog engine).
|
||||
|
||||
Verification: The Symbolic Reasoner returns a provable "TRUE" or "FALSE" and a plan of action.
|
||||
|
||||
Generation: The LLM takes that plan and turns it back into a human-readable Org-mode update.
|
||||
|
||||
3. The Neurosymbolic Inference Formula
|
||||
Modern 2026 frameworks (like the Neuro-Symbolic Autoformalization Framework) often define this hybrid inference as a weighted integration of logic and probability:
|
||||
|
||||
Missing formula
|
||||
|
||||
|
||||
|
||||
*** Symbolic org -agent
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:39]
|
||||
:END:
|
||||
|
||||
integrate a Common Lisp library like cl-z3 (an SMT solver) or a native Prolog engine into your org-agent as the first "System 2" reasoning skill?
|
||||
|
||||
** Agora
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-19 Thu 18:50]
|
||||
@@ -9625,3 +10005,35 @@ Project N.O.M.A.D. is a self-contained, offline-first knowledge and education se
|
||||
|
||||
A framework-agnostic, git-native standard for defining AI agents. Clone a repo, get an agent.
|
||||
|
||||
* Benefits of org mode over markdown
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 01:57]
|
||||
:END:
|
||||
|
||||
1. Structural Density (The "Outline" Advantage)
|
||||
Markdown is essentially flat. To show an AI the structure of a document, you often have to provide the whole file.
|
||||
Org-mode uses a highly rigid, predictable syntax (*, **, ***) that LLMs (especially Lisp-heavy models) parse very efficiently as a tree.
|
||||
Token Savings: You can send the agent an "Org-sparse-tree." Instead of a 2,000-line file, you send the top-level headings and only the body of the specific subtree you are working on. This can reduce a 5,000-token file to 300 tokens while maintaining the "path" (context) of where that code lives.
|
||||
2. Metadata Handling
|
||||
Markdown often relies on "Frontmatter" (YAML/TOML) which can be verbose.
|
||||
Org Properties: Org uses :PROPERTIES: drawers. You can instruct your agent to ignore these drawers unless specifically needed.
|
||||
Tags: Using :tag: at the end of headings allows the LLM to filter information without reading the sentences in between.
|
||||
3. Code Blocks and "Babel"
|
||||
Since you are building a DevOps pipeline in Common Lisp, Org-Babel is your best friend.
|
||||
In Markdown, code blocks are just text.
|
||||
In Org, you can use #+CALL: or names for blocks. Your AI agent doesn't need to see the implementation of a 100-line Lisp function if it can just see the #+NAME and the arguments. You can "collapse" code logic into a single line of metadata for the LLM.
|
||||
|
||||
* Project: FPGA Trading bot
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:21]
|
||||
:END:
|
||||
|
||||
FPGAs aren't trying to be "Nvidia Killers" for 600B models anymore. Instead, they are dominating two specific areas:
|
||||
Ultra-Low Latency: If you need to process a 1B model in under 1 millisecond (for high-frequency trading or real-time robotics), an FPGA will destroy a GPU because it doesn't have the "kernel launch overhead" of a standard OS/driver stack.
|
||||
Non-Standard Math: If researchers find that 1.58-bit (Ternary) or 1-bit models are the future, FPGAs will suddenly become the superior platform because GPUs are "wasting" transistors on 16-bit math that the model no longer needs.
|
||||
|
||||
* Design agora as a bunch of CLI tools that are grouped for humans in a ux
|
||||
:PROPERTIES:
|
||||
:CREATED: [2026-03-23 Mon 03:46]
|
||||
:END:
|
||||
|
||||
|
||||
Reference in New Issue
Block a user