Skip to content
agent-o-rama logo

Agent O Rama

agent-o-rama

Layer 4 Learning and Pattern Extraction for Cognitive Surrogate Systems

plurigrid/asi0installs67stars

SKILL.md

Full skill instructions

agent-o-rama

Layer 4: Learning and Pattern Extraction for Cognitive Surrogate Systems

Version: 1.1.0 (music-topos enhanced) Trit: +1 (Generator - produces learned patterns) Bundle: learning

Overview

Agent-o-rama trains learning agents on interaction sequences to discover behavioral patterns. It extracts temporal, topic, and network patterns from raw interaction data, producing models compatible with the cognitive-surrogate skill.

Enhanced Integration: Multi-Interpreter

DuckDB Pattern Storage

CREATE TABLE learned_patterns (
    pattern_id VARCHAR PRIMARY KEY,
    pattern_type VARCHAR,  -- 'temporal', 'topic', 'network', 'skill'
    pattern_data JSON,
    confidence FLOAT,
    learned_at TIMESTAMP,
    seed BIGINT  -- SPI seed for reproducibility
);

-- Temporal pattern query
SELECT
    EXTRACT(HOUR FROM created_at) as hour,
    EXTRACT(DOW FROM created_at) as day_of_week,
    COUNT(*) as post_count,
    AVG(response_time_minutes) as avg_response_time
FROM interactions
GROUP BY hour, day_of_week
ORDER BY post_count DESC;

Python Predictor

# agent_o_rama.py
import jax
import jax.numpy as jnp
from dataclasses import dataclass

@dataclass
class InteractionPredictor:
    learning_rate: float = 0.01
    epochs: int = 100
    batch_size: int = 32
    seed: int = 0xf061ebbc2ca74d78
    
    def fit(self, db_path: str, table: str, validation_split: float = 0.2):
        """Train on DuckDB interaction sequences."""
        import duckdb
        conn = duckdb.connect(db_path)
        
        data = conn.execute(f"SELECT * FROM {table}").fetchall()
        # JAX training loop with SPI seed
        key = jax.random.PRNGKey(self.seed)
        
        for epoch in range(self.epochs):
            key, subkey = jax.random.split(key)
            # ... training logic
            
    def predict(self, history):
        """Predict next interaction given history."""
        return self.model(history)

Ruby Skill Discovery

# lib/​agent_o_rama.rb
module AgentORama
  def self.discover_skills(interactions, min_frequency: 5, coherence_threshold: 0.7)
    # Group by inferred skill
    skill_candidates = interactions.group_by { |i| infer_skill(i) }
    
    skill_candidates.map do |skill_name, examples|
      frequency = examples.size
      coherence = calculate_coherence(examples)
      
      next unless frequency >= min_frequency && coherence >= coherence_threshold
      
      {
        skill: skill_name,
        frequency: frequency,
        coherence: coherence,
        exemplars: examples.first(3)
      }
    end.compact
  end
  
  def self.calculate_coherence(examples)
    # Coherence via condensed stack descent
    stack = WorldBroadcast::CondensedAnima.analytic_stack(
      examples.map { |e| e[:id].hash }
    )
    stack[:descent_data].size.to_f / examples.size
  end
end

Hy Bidirectional Learning

;; From thread_relational_hyjax.hy - enhanced
(defclass ThreadBidirectionalLearner []
  "Learn thread patterns by coupling reading (analysis) with writing (synthesis)"
  
  (defn __init__ [self latent-dim]
    (setv self.latent-dim latent-dim)
    (setv self.read-patterns {})
    (setv self.write-templates {})
    (setv self.coupling-loss []))
  
  (defn encode-thread [self acset]
    "READ: ACSet → Latent representation"
    (setv features
          {:n-threads (len acset.threads)
           :n-messages (len acset.messages)
           :n-concepts (len acset.concepts)
           :n-files (len acset.files)
           :n-relations (len acset.related)
           :concept-entropy (compute-message-entropy 
                              (list (.values acset.concepts)))})
    (setv latent (jnp.array 
                   [(get features "n-threads")
                    (get features "n-messages")
                    (get features "n-concepts")
                    (get features "n-files")
                    (get features "n-relations")
                    (float (get features "concept-entropy"))]))
    (setv (get self.read-patterns "latest") features)
    latent)
  
  (defn bidirectional-loss [self acset]
    "Coupling loss: read → latent → write should reconstruct"
    (setv latent (self.encode-thread acset))
    (setv template (self.decode-thread latent))
    ;; Reconstruction error
    (setv error
          (+ (abs (- (get template "suggested-threads") (len acset.threads)))
             (abs (- (get template "suggested-messages") (len acset.messages)))))
    {:latent latent :error error}))

GF(3) Triad Integration

TritSkillRole
-1self-validation-loopValidates learned patterns
0cognitive-surrogateConsumes patterns for prediction
+1agent-o-ramaGenerates learned patterns

Conservation: (-1) + (0) + (+1) = 0 ✓

Justfile Recipes

# Train interaction predictor
agent-train db="interactions.duckdb" epochs="100":
    python3 -c "from agent_o_rama import InteractionPredictor; p = InteractionPredictor(epochs={{epochs}}); p.fit('{{db}}', 'interactions')"

# Discover skills via Ruby
agent-skills:
    ruby -I lib -r agent_o_rama -e "puts AgentORama.discover_skills(interactions).to_json"

# Hy bidirectional learning
agent-hy:
    uv run hy -c '(import lib.thread_relational_hyjax :as tra) (setv learner (tra.ThreadBidirectionalLearner 6)) (print "Learner ready")'

Related Skills

  • cognitive-surrogate (Layer 6) - Consumes learned patterns
  • entropy-sequencer (Layer 5) - Arranges training data
  • acsets (Layer 3) - Structured pattern storage
  • gay-mcp - Deterministic seeding via SPI

More skills from plurigrid

cargo logo
plurigrid/asi

cargo

Rust package manager (36 subcommands).

67 0
View

Translate Figma nodes into production-ready code with 1:1 visual fidelity using the Figma MCP workflow (design context, screenshots, assets, and project-convention translation). Trigger when the user provides Figma URLs or node IDs, or asks to implement designs or components that must match Figma...

67 0
View

**Status**: 🌳 Production Ready (upstream in StringZilla v3+) **Type**: High-Performance String Operations / SIMD-Accelerated Text Processing **Principle**: Zero-copy views, SIMD/SWAR acceleration, deterministic hashing **Frame**: Cross-language interoperability (C, C++, Python, Rust, Go, Swift, ...

67 0
View
conformal-ga logo
plurigrid/asi

conformal-ga

Conformal Geometric Algebra (CGA) for circles, spheres, and Möbius transformations

67 0
View

Verifies code implements exactly what documentation specifies for blockchain audits. Use when comparing code against whitepapers, finding gaps between specs and implementation, or performing compliance checks for protocol implementations.

67 0
View
zig-systems logo
plurigrid/asi

zig-systems

Systems programming and performance optimization using Zig. Provides low-level abstractions, memory-safe compiled code, and performance benchmarking. Use for system-level operations, optimization, and interoperability with C/POSIX APIs.

67 0
View
paypal-mcp logo
plurigrid/asi

paypal-mcp

PayPal MCP server integration for invoices, payments, subscriptions, disputes, and transaction reporting via @paypal/mcp.

67 0
View
unison logo
plurigrid/asi

unison

Unison language - content-addressed functional programming with abilities for effects, distributed computing, and structural types. Use for pure functional code, effect management, distributed systems, and refactoring-safe codebases.

67 0
View
tasks-acset logo
plurigrid/asi

tasks-acset

Google Tasks management via TasksACSet. Transforms task operations into GF(3)-typed Interactions, routes to triadic queues, detects saturation for task-zero-as-condensed-state.

67 0
View
c logo
plurigrid/asi

c

World C Skill

67 0
View
syrup logo
plurigrid/asi

syrup

Syrup binary serialization for OCapN/CapTP wire format. Canonical encoding for capability messages.

67 0
View
skill-installer logo
plurigrid/asi

skill-installer

Install Codex skills into $CODEX_HOME/skills from a curated list or a GitHub repo path. Use when a user asks to list installable skills, install a curated skill, or install a skill from another repo (including private repos).

67 0
View

Popular AI tools

Kaiber logo
Video

Kaiber

Generate, edit, and beat-sync AI video with leading models in one workspace.

Paid
View
Vimcal logo
Productivity

Vimcal

The world's fastest calendar for remote work

Free
View

Transform Your Design with AI Designer by ImgCreator.ai

Freemium
View
Akool AI logo
Content & writing

Akool AI

Revolutionizing Video Production with AI-Powered Creativity

Paid
View

Extend an image past the frame and let AI fill the new aspect ratio.

Freemium
View
StarByFace logo
Security

StarByFace

Discover your celebrity doppelgänger with StarByFace!

Free
View
C

ChainClarity explains 700+ crypto whitepapers in plain English, with layered summaries, comparisons, research tools, alerts, and a $4.99 Pro plan.

Freemium
View
Opus Clip logo
Coding & apps

Opus Clip

Opus.ai: Revolutionize Your Web Experience

Free
View