Repository navigation
Artificial Intelligence
AI, Machine Learning, and Generative Intelligence resources applied to cybersecurity
Part of the ULTIMATE CYBERSECURITY MASTER GUIDE
Related Research: h4cker AI-security resources, prompt-injection research and PNWC's curated project map.
External enrichment and privacy: The Security API Catalog documents threat feeds, provenance and safer handling of API responses for agent workflows. Check customer-data transfer restrictions before feeding third-party services or LLMs.
Security evals: Promptfoo LLM and agent security testing adds synthetic prompt-injection, retrieval and privileged-tool boundary testing, plus provider privacy cautions.
Index and entry point for AI/ML resources applied to cybersecurity - self-hosted agent frameworks (OpenClaw, AnythingLLM), prompt engineering, offline/air-gapped LLM deployment, and adversarial AI (offensive_ai.md). Distinct from offensive_ai.md's narrow scope (attacking AI systems as a target) - this README indexes the broader "use AI as a tool" side: agents, prompting, and self-hosted deployment.
Six resource categories (self-hosted agent frameworks, GenAI/LLM security applications, offline/air-gapped deployment, red team, blue team, and governance), each linking to the relevant file/subfolder. AnythingLLM/ and OpenClaw/ are the two agent-framework subdirectories; ai_prompts.md, offline-llm.md, and offensive_ai.md are standalone deep-dives at this level.
Get a self-hosted AI agent running (OpenClaw or AnythingLLM) with role-appropriate personas and skills, and know which file to reference for prompt engineering, offline deployment, or adversarial AI security work.
- Deploying a self-hosted AI agent (OpenClaw/AnythingLLM) for IT support, blue team, red team, or OSINT automation
- Setting up an air-gapped LLM for sensitive engagement work (
offline-llm.md) - Red-teaming an AI/ML system itself, as opposed to using AI as a tool (
offensive_ai.md)

Conceptual AI agent architecture showing the orchestration and data/tool boundaries. Specific OpenClaw and AnythingLLM deployments may use different components, permissions and isolation.
This directory contains resources, configurations, guides, and methodologies focused on the intersection of artificial intelligence (AI), machine learning (ML), generative AI (GenAI), and cybersecurity - with an emphasis on self-hosted, privacy-respecting deployments that keep your data on your own hardware.
What You'll Find Here:
- Self-hosted AI agent frameworks (OpenClaw, AnythingLLM) with full setup guides for TrueNAS SCALE
- Multi-provider LLM routing - Anthropic Claude, Google Gemini, Groq, and local Ollama models
- AI-powered workflows for blue team, red team, purple team, OSINT, and IT support operations
- Prompt engineering cheat sheets and templates for security practitioners
- AgentFlow configurations for automating incident response, OSINT collection, and security audits
- Offline/air-gapped LLM deployment guides for sensitive environments
- End-to-end agent engineering covering context, MCP, orchestration, security, evaluations, observability, cost, and authorized security operations
| File/Folder | Description |
|---|---|
| ai-usage-interaction-guide.md | Practical AI interaction guide with prompt templates, how to operate a project, context loading, privacy, approval boundaries and completion checks |
| notes-hooks-and-automation.md | Full practical guide to notes vs memory vs instructions vs hooks, skills, cron and webhooks; note templates, Git pre-commit / Claude Code / OpenClaw hook setup, audit and troubleshooting |
| milestones-and-acceptance-criteria.md | End-to-end milestone methodology with acceptance criteria, approvals, evidence, status/handoff templates, a complete defensive-security example, progress, rollback and resuming work |
| agent-project-workflows.md | Apply goals, milestones and evidence to project and agent lanes, delegate scoped tasks, track blockers, review and resume checkpoints |
| verification-and-ai-audits.md | Fact-check AI responses and supplied information; independently audit sources, claims, tool actions, security boundaries, and agent results |
| ai-workspaces-notebooks-and-assistants.md | Choose and organize projects, notebooks, custom GPTs, plugins, reusable assistants, and multi-step agents |
For this repository's actual GitHub Actions worker lanes, audit tasks, release checks, owner controls and monthly review, follow Repository Maintenance & Automation and Verification Protocol. These implemented CI tasks are distinct from conceptual autonomous-agent architectures.
These detailed chapters turn a working AI chat or self-hosted model into a measurable, permissioned, maintainable system. Read by stage, or use the task-focused table to navigate directly. Every guide contains workflows, implementation examples, verification, failure modes and related references.
| Learning Stage | Detailed Guide | What You Will Build or Verify |
|---|---|---|
| 1. Foundations | Context Engineering & Memory Management | Trusted source hierarchy, durable notes, retrieval budgets, safe context compaction, session resume and memory-poisoning defenses |
| 1. Foundations | RAG & Knowledge Engineering | Authorized ingestion, semantic/keyword retrieval, versioned chunks, ACL-aware search, citation checking and freshness testing |
| 2. Agent Execution | MCP, Tool Integration & Secure Permissions | Tool/server contracts, OAuth and credentials, approval gates, least privilege, denied-call tests and safe integrations |
| 2. Agent Execution | Structured Outputs & Data Contracts | JSON Schema, typed tool requests, versioned payloads, independent server-side authorization and readback |
| 2. Agent Execution | Multi-Agent Orchestration & Delegation | Coordinator/worker patterns, scoped lanes, dependency graphs, conflict resolution, acceptance handoffs and loop control |
| 2. Agent Execution | Agent Reliability & Failure Recovery | Timeouts, retry budgets, idempotency, partial writes, checkpoints, reconciliation, rollback and failure-state handling |
| 3. Verification & Security | AI Evaluation, Regression Testing & Quality Gates | Versioned fixtures, pass/fail scoring, security test cases, trace grading, CI release gates and test coverage |
| 3. Verification & Security | AI Agent Threat Modeling & Security | Prompt-injection defense, identity boundaries, memory poisoning, tool misuse prevention and incident response |
| 3. Verification & Security | AI Observability, Tracing & Auditing | Structured traces, evidence records, metrics, privacy-safe telemetry and Wazuh/SIEM detection integration |
| 4. Deployment & Operations | Model Selection, Routing & Cost Management | Local vs cloud selection, privacy-safe fallback, quality benchmarks, usage measurement and cost per accepted task |
| 4. Deployment & Operations | AI-Augmented Security Operations | Complete authorized Wazuh-style intake โ source-linked triage โ evaluation โ human approval โ reporting โ handoff workflow |
- Choose an authorized use case. Define assets, users, data classes, owner and acceptance criteria before connecting tools.
- Build the context layer. Register sources and create the smallest approved RAG or document-loading process that retrieves relevant evidence.
- Constrain execution. Select MCP/tools with least privilege, typed contracts, agent roles and human approvals. Test denial paths.
- Make it resilient. Add stable task IDs, idempotency keys, bounded retries, checkpoints and actual target readbacks.
- Prove behavior. Run deterministic validation plus model/agent evaluations with positive, benign, malformed and adversarial cases.
- Operate safely. Capture sanitized traces and metrics, define rollback, and gate any rollout on verified milestones and owner acceptance.
Suggested first lab: follow AI-Augmented Security Operations with synthetic Wazuh events and a read-only triage identity. This connects all four stages without exposing production client data or giving a model unsupervised response powers.
-
Define the mission and permission boundaries: Create
PROJECT.mdwith assets in scope, authorized actions, exclusions and approval requirements. -
Plan evidence-backed milestones: Use
MILESTONES.mdto specify outputs, tests, owner and release gate. Work from the milestone tutorial. - Capture context: Record verified sources, observed notes, decisions, status and the next safe step using the notes guide.
- Add automation only where justified: Choose a hook for a supported event, cron for a scheduled action, or a secured webhook for an external event. Begin in observe-only mode and test failure cases.
- Execute, verify and review: Separate an AI's claims from real file diffs, tool results, test logs and approved actions.
-
Record the handoff: Update
STATUS.md/HANDOFF.mdwith the exact commit, gaps and active milestone; recheck live state on resume.
| Goal | Suggested Sequence |
|---|---|
| Build a complete AI security-operations workflow | Engineering Handbook โ Security Operations โ Testing & Evals |
| Get useful, verifiable AI answers | AI Usage โ Prompt Engineering โ AI Audits |
| Understand notes, memory, hooks and automation | Notes, Memory, Hooks & Automation โ OpenClaw Hooks |
| Develop a secure agent integration | MCP Permissions โ Structured Outputs โ Agent Security |
| Build a long-running AI project | Milestones & Acceptance Criteria โ Project & Agent Workflows โ Projects & Notebooks |
| Review AI claims and behavior | Fact-Checking & AI Audits โ LLM Security Evaluation |
| Host or deploy an AI assistant | Offline LLMs โ AnythingLLM or OpenClaw |
| File/Folder | Description |
|---|---|
| offline-llm.md | Create a completely offline LLM system - hardware selection, model deployment, air-gapped setup, and operational security for sensitive environments |
| ai_prompts.md | Master resource and cheat sheet for high-performance AI prompting - templates, patterns, and techniques for security and IT workflows |
| AnythingLLM/ | Generative AI configuration and AgentFlows for automating incident response, OSINT data collection, and security audits using a self-hosted AnythingLLM instance |
| OpenClaw/ | Complete setup guide and configurations for deploying OpenClaw on TrueNAS SCALE - multi-provider LLM routing, homelab integration, and cybersecurity agent workflows |
| โ README.md | TrueNAS SCALE installation guide - ixVolume setup, provider config, NPMplus HTTPS proxy, device pairing, and troubleshooting |
| โ use_cases.md | Real-world prompt examples for IT support, blue team, red team, purple team, OSINT, homelab, and business operations |
| โ agent_skill_config.md | Pre-built agent personas, skill configurations, cron jobs, and multi-agent workflow setups |
Purpose: Deploy persistent AI agents on your own hardware that connect to messaging platforms, tools, and services.
What's included:
- OpenClaw on TrueNAS SCALE - Full deployment guide for a multi-provider AI agent framework running as a TrueNAS community app. Connects to Telegram, Discord, Slack, and 50+ channels. Routes tasks automatically between Anthropic, Gemini, Groq, and local Ollama models based on cost and capability.
- AnythingLLM AgentFlows - Custom automation flows for incident response, OSINT collection, log analysis, and security audits running inside a self-hosted AnythingLLM instance.
Key capabilities:
- Run 24/7 on your homelab with no cloud dependency
- Free inference via Groq (Llama 3.3 70B) and Gemini free tiers
- Fully local/private inference via Ollama for sensitive data
- Scheduled automations, cron jobs, and event-driven hooks
Purpose: Apply large language models to security operations tasks - report generation, log analysis, threat hunting, and SOC automation.
Key focus areas:
- Prompt engineering for security workflows - triage, IR, pentest reporting
- RAG (retrieval-augmented generation) for threat intelligence and knowledge bases
- Multi-agent workflows for complex security assessments
- Model routing strategy - knowing when to use local vs. cloud models
Included resources:
-
ai_prompts.md- Comprehensive prompt cheat sheet organized by security domain - OpenClaw
use_cases.md- 50+ real-world example prompts covering blue team, red team, OSINT, IT support, and business ops - OpenClaw
agent_skill_config.md- Pre-built agent personas for field tech, security analyst, pentester, OSINT researcher, and homelab monitor roles
Purpose: Run AI inference in environments where internet connectivity is restricted or prohibited - classified networks, air-gapped labs, sensitive client engagements.
Key focus areas:
- Hardware selection for local inference (GPU/CPU requirements by model size)
- Ollama deployment for offline model serving
- Air-gapped setup and model transfer procedures
- OPSEC considerations for AI in sensitive environments
Included resources:
-
offline-llm.md- Complete guide to building a fully offline LLM system
Purpose: Use AI to enhance authorized penetration testing and offensive security research.
Key capabilities (authorized engagements only):
- Methodology assistance and attack chain planning
- Report writing and finding documentation
- OSINT automation and passive recon
- Payload research and exploit documentation
- CTF assistance and lab environment support
Included resources:
- OpenClaw Rex agent config - Pentest-focused persona with scope guardrails
- OpenClaw Oliver agent config - OSINT-focused research assistant
-
use_cases.mdred team and OSINT sections -
offensive_ai.md- treats AI/ML systems themselves as the attack surface (data poisoning, evasion, prompt injection, model extraction), distinct from using AI as an offensive tool
Purpose: Augment defensive security operations with AI-assisted detection, analysis, and response.
Key capabilities:
- Log analysis and alert triage
- SIEM rule and detection engineering (Wazuh/Sigma)
- Threat intelligence summarization
- Incident response playbook generation
- Security awareness training content
Included resources:
- OpenClaw Blaine agent config - Blue team analyst persona with MITRE ATT&CK awareness
- OpenClaw daily security digest cron job - Automated CVE and threat briefings
-
use_cases.mdblue team section
Purpose: Ensure AI/ML components in security are deployed responsibly and effectively.
Key focus areas:
- Model risk assessment and validation
- Data privacy and bias mitigation
- Monitoring, drift detection, and retraining
- Ethical and legal compliance for AI in security contexts
- Start with OpenClaw README.md to deploy a self-hosted AI agent on TrueNAS SCALE
- Once running, apply the agent_skill_config.md configurations for your role (IT support, blue team, red team, etc.)
- Use use_cases.md as a daily reference for prompts relevant to your current work
- Reference ai_prompts.md for prompt engineering techniques to improve output quality
- Deploy the Blaine (blue team analyst) agent persona from
agent_skill_config.md - Set up the daily security digest cron job for automated CVE and threat briefings
- Use the log analysis and SIEM rule writing prompts in
use_cases.md - Connect OpenClaw to Telegram for mobile alert notifications
- Deploy the Rex (pentester) and Oliver (OSINT) agent personas
- Use the multi-agent pentest workflow in
agent_skill_config.mdfor end-to-end engagement support - Reference
use_cases.mdred team section for methodology, reporting, and tool reference - Use local Ollama models (
@ollama) for sensitive engagement data
- Follow
offline-llm.mdfor fully offline deployment - Use Ollama as the sole inference backend - no data leaves the machine
- Apply the
agent_skill_config.mdhomelab agent (Homer) for infrastructure management
-
Adapt agent personas: Edit the
instructionsfield in agent configs to match your business name, client base, and tooling -
Adjust model routing: Change
primary/fallbackmodel assignments per agent based on your API budget -
Modify cron schedules: Update cron expressions in
agent_skill_config.mdto match your timezone and preferred timing - Extend skill prompts: Each skill's prompt template is plain text - customize it to reference your specific environment
These resources are provided for authorized, ethical, and supervised use only.
Unauthorized use, misuse, or deployment of AI in security testing or operations without proper authorization, governance, and oversight is strictly prohibited.
Always comply with:
- โ Written authorization for all security engagements
- โ Local, state, federal, and international laws
- โ Ethical guidelines for AI usage in security contexts
- โ Your organization's governance, privacy, and data-handling standards
- โ Platform terms of service for all AI providers used
- Fork the repository
- Add your document, configuration, or guide in the appropriate subfolder
- Update this README's Folder Contents table with your new file
- Submit a pull request with a description of the contribution
- โ Clear naming and consistent file structure
- โ Purpose statement and description at the top of each file
- โ Reusable and modular configurations/templates
- โ Governance and ethical sections where relevant
- โ
Version history (e.g.,
v1.0 โ 2026-04-21 โ JP) - โ Tested configurations - note the version/environment it was tested on
AI Frameworks & Tools:
- OpenClaw - https://openclaw.ai
- AnythingLLM - https://anythingllm.com
- Ollama - https://ollama.com
- Hugging Face Models - https://huggingface.co/models
AI Security Research:
- MITRE ATLAS (AI threat matrix) - https://atlas.mitre.org
- NIST AI Risk Management Framework - https://airc.nist.gov/
- OWASP LLM Top 10 - https://owasp.org/www-project-top-10-for-large-language-model-applications
LLM Providers (Free Tiers Available):
- Groq (Llama 3.3 70B, free tier) - https://console.groq.com
- Google Gemini (1M context, free tier) - https://aistudio.google.com
- Anthropic Claude - https://console.anthropic.com
- offensive_ai.md - Adversarial ML and offensive AI techniques
- offline-llm.md - Air-gapped LLM deployment with Ollama + AnythingLLM
- ai_prompts.md - Prompt engineering cheat sheet for security workflows
- OpenClaw/README.md - OpenClaw agent framework on TrueNAS SCALE
- AnythingLLM/README.md - AnythingLLM AgentFlow configurations
- ../OSINT/OSINT_GUIDE.md - OSINT workflows that AI automates
- ../Tradecraft/av-edr-evasion.md - AV/EDR evasion context for offensive AI research
๐ค Use These Resources Responsibly: Authorization is MANDATORY
AI tools are powerful - use them ethically and legally.
Repository: ULTIMATE CYBERSECURITY MASTER GUIDE
Maintained by: Pacific Northwest Computers
โญ Star this repo if you find it useful! โญ
- AI Agent Observability, Tracing, Audit Trails & SIEM Integration
- AI Agent Reliability, Idempotency & Failure Recovery
- AI Agent Threat Modeling, Guardrails & Defense in Depth
- AI Evaluation, Regression Testing & Quality Gates
- AI Model Selection, Routing, Privacy & Cost Management
- AI Project Milestones, Acceptance Criteria & Evidence-Driven Progress
- AI Projects, Notebooks, GPTs, Plugins and Reusable Assistants
- AI-Augmented Security Operations: Authorized, Auditable Workflows
- Context Engineering & Memory Management for AI Agents
- Create a Completely Offline LLM System Using Dolphin, Ollama, and AnythingLLM
- Fact-Checking, Independent Verification and AI Agent Audits
- LLM and Agent Security Evaluations with Promptfoo
- MCP, Tool Integration & Secure Agent Permissions
- Multi-Agent Orchestration, Delegation & Conflict Resolution
- Notes, Memory, Hooks & Automation in AI Projects
- Offensive AI
- Practical AI Usage and Interaction Guide
- Project and Agent Workflows: Goals, Milestones, Lanes and Resuming Work
- Retrieval-Augmented Generation (RAG) & Knowledge Engineering
- Structured AI Outputs, JSON Schema & Workflow Contracts
- ๐ง AnythingLLM Agentflow Documentation
- AnythingLLM AgentFlow Workflow Examples
- BreachChecker AgentFlow
- CompanyOSINT AgentFlow
- CVELookup AgentFlow
- DomainRecon AgentFlow
- EmailOSINT AgentFlow
- GitHubSecrets AgentFlow
- NmapAnalyzer AgentFlow
- ThreatIntelCheck AgentFlow
- VulnReportGenerator AgentFlow
- OpenClaw Agent Configurations & Skill Setups
- ๐ฆ OpenClaw On Truenas Scale - Complete Setup Guide
- OpenClaw Use Cases & Real-World Examples
๐ Folder: AI | โ๏ธ Suggest an edit | ๐บ๏ธ Browse by Topic
- ๐บ๏ธ Browse by Topic
- ๐ All Repository Files
- ๐งญ Learning Paths
- ๐ Master Guide
- ๐ค Glossary
- โ๏ธ Legal & Disclaimer
๐ Foundations & Learning
๐ก๏ธ Defense & Investigations
- Incident Response
- Open Source Intelligence (OSINT)
- Reverse Engineering
- Operations Security (OPSEC)
- Compliance
โ๏ธ Platforms & Infrastructure
๐ก Hardware, Wireless & Field Projects
- PNWC Cyberdeck
- Hardware Testing
- Hardware Hacking
- Software-Defined Radio
- Wardriving
- uConsole
- Space Security
๐งฐ Assessment & Field Reference
๐ฆ Downloads & Project Resources
๐๏ธ Additional Topics