Skip to content
Back to skills

Brain

BSecurity

Patterns from SOAR, ACT-R, and LIDA for advanced agent cognitive cycles

  • 23 stars
  • 0 votes
  • 0 copies
  • 1 view
  • Added October 14, 2026
ai-agentspythonrustgorailsapisecurity

Works with

  • api

Security analysis

B85/100
  • highPerforms destructive filesystem operations

Pro scans all 21 files and shows the line behind each finding

Scanned October 14, 2026

npx -y skills add andreibesleaga/GABBE --skill brain --agent claude-code

Installs into .claude/skills of the current project.

Are you the author of Brain?

Add the live security badge to your README. It updates with every re-scan.

Security grade badge for Brain
[![Security: B — Skills Directory](https://www.skillsdirectory.com/api/skills/andreibesleaga-brain-c8982107/badge)](https://www.skillsdirectory.com/skills/andreibesleaga-brain-c8982107)

More formats (shields.io, HTML) on the badges page. Keep it an A: scan every change in CI with Pro.

Download with Pro
SKILL.md
---
name: cognitive-architectures
description: Patterns from SOAR, ACT-R, and LIDA for advanced agent cognitive cycles
triggers: [cognitive, architecture, soar, act-r, lida, reasoning cycle]
tags: [brain, architecture, theory]
context_cost: low
---
# Cognitive Architectures for Agents

## Goal
Structure agent reasoning, memory, and decision-making with patterns from classic cognitive architectures (SOAR, ACT-R, LIDA) — beyond ad-hoc prompting.

## 1. SOAR — Problem Space + Operators
Break "think" into a proposal-evaluation cycle rather than one step:
**Elaborate** (infer from state) → **Propose** candidate operators → **Evaluate** by heuristics → **Select** best → **Apply** to change state.
```python
def cognitive_cycle(state):
    state = enrich_context(state)                 # 1. elaborate
    options = generate_candidates(state)          # 2. propose
    scored = evaluate_candidates(options, state.goal)  # 3. evaluate
    return apply_operator(state, select_winner(scored))  # 4-5. select + apply
```

## 2. ACT-R — Declarative vs Procedural memory
Retrieve by **activation** (recency + frequency + relevance), not "load everything":
base-level activation (how often/recently used) + associative activation (relatedness to current focus). Below threshold → retrieval failure (don't fabricate).
```python
def retrieve_memory(query, store):
    for c in store:
        c.activation = log(c.frequency) - log(time_since_last_use(c)) + similarity(query, c)
    top = max(store, key=lambda c: c.activation)
    return top if top.activation > THRESHOLD else None
```

## 3. LIDA — Global Workspace cognitive cycle
Perceive → understand → "consciousness" → act. Parallel preconscious buffers form **coalitions** that compete; the winner is **broadcast** globally, recruiting resources for the current situation (the "spotlight" of attention).

## References
Laird (2012) *The Soar Cognitive Architecture* · Anderson (2007) *ACT-R* · Franklin (2006) *The LIDA Architecture*.

## Security & Guardrails

### 1. Skill Security (Cognitive Architectures)
- **Operator sanitization (SOAR):** before Selection, run every candidate operator through an immutable safety filter that discards destructive commands (`rm -rf`, `DROP TABLE`) regardless of heuristic score.
- **Workspace contamination (LIDA):** the winning coalition broadcasts globally, so a malicious sensory input that wins can compromise the whole swarm — scrub buffers for prompt-injection signatures BEFORE they compete for the Global Workspace.

### 2. System Integration Security
- **Retrieval poisoning (ACT-R):** attackers can spam inputs to inflate a dangerous chunk's frequency/recency — track `provenance` and discount/isolate untrusted-origin chunks.
- **Compute exhaustion:** elaboration/parallel-buffer loops are token-intensive; enforce strict depth/timeout limits (e.g. max 3 evaluation rounds) so malformed recursive inputs can't exhaust context/budget.

### 3. LLM & Agent Guardrails
- **Heuristic bypassing:** security heuristics (least privilege, immutability) are absolute — a candidate that violates one has its score zeroed; never let "speed"/"compliance" outweigh them.
- **Procedural hallucination:** ground production rules in verifiable artifacts (schemas, API specs), never in latent LLM knowledge (e.g. assuming `admin: true` is valid).

Files in this skill

  • README.md3.8 KB
  • active-inference.skill.md4.4 KB
  • brain-mode.skill.md8.5 KB
  • cognitive-architectures.skill.md3.3 KB
  • cognitive-testing.skill.md5.2 KB
  • consciousness-loop.skill.md3.8 KB
  • cost-benefit-router.skill.md6.2 KB
  • episodic-consolidation.skill.md3.6 KB
  • epistemology-knowledge.skill.md4 KB
  • global-workspace.skill.md3.8 KB
  • learning-adaptation.skill.md5.2 KB
  • loki-mode.skill.md15.9 KB
  • neuroscience-foundations.skill.md3.8 KB
  • scripts/active_inference_loop.py2.6 KB
  • scripts/cognition_test.py2.2 KB
  • scripts/global_workspace.py2.8 KB
  • self-improvement.skill.md5.7 KB
  • sensory-motor.skill.md4 KB
  • sequential-thinking.skill.md3.9 KB
  • working-memory.skill.md4.2 KB

Attribution

Is this your skill, or is something wrong with this listing? Request removal or report an issue. Author removals are honored within 72 hours.

Comments

Loading comments…

Newsletter

Get the weekly list of safe new skills, and the ones we pulled.