DEV Community

Programming Central
Programming Central

Posted on Edited on

Beyond Static Prompts: How to Build Self-Improving AI Agents with Closed-Loop Skill Playbooks

The current wave of AI development is undergoing a massive paradigm shift. We are rapidly moving past simple "prompt wrapper" applications and entering the era of fully autonomous, agentic systems.

Yet, if you’ve tried to build an AI agent for a production environment, you’ve likely run into a frustrating wall. You write a comprehensive system prompt, equip your agent with a few API tools, and set it loose. It works beautifully on your first three test runs. But on the fourth run, the real world throws a curveball—a changed website structure, an unexpected API response, or a minor user correction—and your agent completely derails.

The problem isn't the underlying Large Language Model (LLM). The problem is how we define agent capabilities.

In most architectures, an agent's "skills" are defined as static, hardcoded instructions or rigid tool definitions. They are passive. To build truly resilient AI systems, we need to treat skills not as static code, but as living, self-contained, closed-loop feedback systems.

In this post, we will deconstruct the anatomy of a self-improving agent "Skill" using the architectural patterns of the open-source Hermes Agent framework. We'll explore how to design skills that can execute complex workflows, evaluate their own performance, and dynamically rewrite their own execution playbooks to get smarter over time.

(The concepts and code demonstrated here are drawn from my ebook Hermes Agent, The Self-Evolving AI Workforce)


The Core Concept: The Skill as a Closed-Loop Feedback System

To understand how a self-improving agent works, let’s step away from code for a moment and look at a human analogy: a master craftsperson in a workshop.

A master carpenter doesn't approach a new project with a rigid, unchangeable checklist. Instead, they operate with an internal playbook built on experience. This playbook consists of three distinct phases:

  1. The Trigger: A specific signal that initiates a project. “A client walks in asking for a custom oak dining table.”
  2. The Execution Logic: The modular, physical steps of the craft. “Select the lumber, mill the wood, cut the mortise and tenon joints, sand the surfaces, apply the finish.”
  3. The Memory Integration: The reflective learning process after the job is done. “This specific batch of white oak was highly prone to tear-out during milling. Next time, I will adjust the planer feed rate and angle.”

This feedback loop updates the carpenter's internal playbook. The next time a client triggers a "custom table" request, the execution is smoother, faster, and higher quality.

In advanced agent architectures, this is not a vague metaphor—it is a precise, code-level implementation. A Skill is a formalized, stateful playbook that the agent can load, execute, and—crucially—self-modify based on the outcome of its execution.

Instead of a developer manually editing prompts in a codebase, the agent acts as its own developer, optimizing its own instructions through a continuous cycle of Invoke → Execute → Review → Update.


Deconstructing the Playbook: Trigger, Execution, and Memory

To build a system capable of this level of autonomy, we must formally decompose a skill into three interdependent components.

[ Trigger (Invocation Contract) ]
               │
               ▼
[ Execution Logic (Modular Workflow) ] ◄───┐ (Self-Correction / Updates)
               │                           │
               ▼                           │
[ Memory Integration (Feedback Loop) ] ────┘
Enter fullscreen mode Exit fullscreen mode

1. The Trigger: The Invocation Contract

The Trigger is the input schema that defines exactly when and how a skill is activated. It acts as a strict contract between the agent’s core decision-making loop and the skill’s execution engine.

Without a deterministic trigger, agents suffer from unpredictable activation, running the wrong code at the wrong time. This violates the Principle of Least Astonishment (POLA): an agent’s behavior must remain highly predictable based on the inputs that activated it.

In practice, triggers generally manifest in two ways:

  • Explicit Slash Commands: Highly deterministic inputs. When a user types /web-search "latest AI trends", the system scans its available skills, identifies the match, and packages the user's query into a structured payload.
  • Contextual Invocation: Dynamic, reasoning-based triggers. During a multi-turn conversation, the agent’s LLM evaluates the user's intent. If the user says, "Deploy this code to our staging server," the agent's internal reasoning engine recognizes that the current context matches the entry criteria for the deployment skill and triggers it automatically.

2. The Execution Logic: The Modular Workflow

Once triggered, the skill executes its playbook. The golden rule of agentic execution is modularity. The execution logic must be composed of atomic, chainable steps rather than a single, monolithic "black box" prompt.

Consider a complex skill like "Set up a new React project." If you pass this entire request to a single LLM prompt, the model has to generate the directory structure, write the configuration files, install dependencies, and verify the build in one massive, error-prone leap.

Instead, a modular playbook breaks the skill down into atomic tool calls:

  1. terminal("mkdir my-app && cd my-app")
  2. terminal("npx create-react-app .")
  3. read_file("src/App.js")
  4. write_file("src/App.js", optimized_template)

Because each step is an atomic tool call, the system can inspect the inputs and outputs of every single transition. If step 2 fails because npm is out of date, the agent doesn't have to restart the entire process; it can isolate the failure to that specific step, run a corrective action, and resume execution.


3. Memory Integration: The Closed-Loop Feedback

This is where true self-improvement happens. After the execution logic completes, the system must answer a critical question: What did we learn from this run?

To handle this, the architecture splits feedback into two distinct systems:

The Macro-Level Feedback Loop (The Curator)

Operating in the background, a curation system monitors the agent's entire skill library. It tracks high-level usage metrics:

  • How many times has this skill been invoked?
  • How often does it run successfully without throwing errors?
  • When was it last modified?

If a skill is rarely used, or if its error rate spikes after a system update, the Curator automatically flags it for deprecation, archiving, or manual developer review.

The Micro-Level Feedback Loop (The Memory Provider)

This loop operates on a per-invocation basis. When a skill finishes executing, the agent spawns a background review process. This is a separate, lightweight LLM instance that acts as an objective "critic."

The critic reviews the entire execution trace: the initial user request, the steps the agent took, the tool outputs, and the final result.

  • Did the agent follow the playbook instructions?
  • Did any tools return errors?
  • Did the user have to manually correct the agent's output?

If the critic detects a failure pattern—for example, a web scraper tool failed because a target website updated its CSS selectors—it doesn't just log an error. It uses a management tool to patch the skill's playbook file (SKILL.md), updating the instructions with the correct selectors for the next run.


The Closed Learning Loop in Action

Let's look at how this theoretical model plays out step-by-step in a real-world scenario: searching for and extracting web data.

   User Input: "/gif-search cute cats"
               │
               ▼
┌─────────────────────────────────────────────────────────┐
│ 1. TRIGGER                                              │
│ - scan_skill_commands() matches "/gif-search"           │
│ - Loads "SKILL.md" and packages payload                 │
└──────────────┬──────────────────────────────────────────┘
               │
               ▼
┌─────────────────────────────────────────────────────────┐
│ 2. EXECUTION                                            │
│ - Step A: Run web_search("cute cats gif")               │
│ - Step B: Extract direct image URLs                     │
│ - Step C: Return formatted markdown link to user        │
└──────────────┬──────────────────────────────────────────┘
               │
               ▼
┌─────────────────────────────────────────────────────────┐
│ 3. MEMORY INTEGRATION (Background Review)               │
│ - Critic detects Step B failed (regex extraction error)  │
│ - Generates a patch to fix the regex pattern            │
│ - Writes update back to "SKILL.md"                      │
└─────────────────────────────────────────────────────────┘
Enter fullscreen mode Exit fullscreen mode
  1. Trigger: The user enters /gif-search cute cats. The system scans the local skills directory, matches the command, parses the YAML metadata in the skill's header, and loads the execution instructions.
  2. Execution: The agent reads the instructions in SKILL.md. It executes a web_search tool call, parses the HTML, and attempts to extract the image URLs. However, the target search engine has updated its markup, causing the agent's regex extraction step to fail. The agent tries an alternative fallback method, successfully retrieves a URL, and displays it to the user.
  3. Memory Integration: The user is satisfied, but the background review agent notes that the primary extraction step failed. It analyzes the HTML payload, generates a corrected extraction pattern, and uses a skill management tool to patch the SKILL.md file. The next time the user runs /gif-search, the agent executes the corrected logic flawlessly on the first attempt.

Building the Engine: A Deep Dive into the Code

To bring this concept to life, let’s build a production-ready Skill Discovery Engine in Python. This implementation mirrors the patterns used in the Hermes Agent architecture. It scans a local directory for skill playbooks defined in Markdown, parses their metadata using YAML frontmatter, sanitizes their invocation commands, and indexes them for execution.

The Skill Playbook Template (SKILL.md)

Before writing the Python parser, here is how a typical self-improving skill playbook is structured. Notice the YAML frontmatter at the top, followed by modular, human-readable execution steps that the LLM can interpret and modify.

---
name: gif-search
description: Search the web for animated GIFs matching a query and return markdown image links.
version: 1.1.0
author: hermes-system
tags: media, search, web
category: utility
platforms: macos, linux, windows
---

# Playbook: GIF Search

## Trigger Contract
Activated explicitly via `/gif-search <query>` or contextually when the user requests an animated image or reaction GIF.

## Execution Steps
1. Call `web_search` tool with the query appended with "filetype:gif site:giphy.com OR site:tenor.com".
2. Parse the search results. Use the following regex pattern to extract raw media URLs: `https://media\.giphy\.com/media/[a-zA-Z0-9]+/giphy\.gif`.
3. If the primary regex fails, fall back to extracting any URL ending with `.gif` from the page source.
4. Format the output as a standard Markdown image link: `![Result](url)`.
Enter fullscreen mode Exit fullscreen mode

The Python Implementation

Here is the complete, self-contained Python engine to discover, parse, and index these skill playbooks.

"""
Basic Skill Library Implementation

This module provides a clean, standalone implementation for discovering,
indexing, and invoking skills from a local directory. It demonstrates the
core patterns used by Hermes Agent's skill management system.

Key Features:
- Scans a directory for SKILL.md files
- Parses YAML frontmatter for metadata (name, description, tags)
- Creates a mapping of skill names to their file paths and metadata
- Provides a simple invocation mechanism that returns the skill's content
- Includes a reload mechanism to pick up new or changed skills
"""

import json
import logging
import os
import re
import uuid
from datetime import datetime
from pathlib import Path
from typing import Any, Dict, List, Optional, Set, Tuple

# Configure logging for this module
logging.basicConfig(level=logging.INFO, format="%(asctime)s - %(levelname)s - %(message)s")
logger = logging.getLogger(__name__)

# ─── Constants ───────────────────────────────────────────────────────────
# The name of the skill definition file within each skill directory
SKILL_MD_FILENAME = "SKILL.md"

# Regular expression to match YAML frontmatter blocks
# Frontmatter is delimited by '---' at the start and end
FRONTMATTER_PATTERN = re.compile(r"^---\s*\n(.*?)\n---\s*\n", re.DOTALL)

# Patterns for sanitizing skill names into clean, hyphen-separated slugs
# This ensures compatibility with slash command naming conventions
SKILL_INVALID_CHARS = re.compile(r"[^a-z0-9-]")
SKILL_MULTI_HYPHEN = re.compile(r"-{2,}")

# ─── Data Structures ─────────────────────────────────────────────────────


class SkillMetadata:
    """
    Represents the parsed metadata from a skill's SKILL.md frontmatter.

    This class encapsulates all the information needed to identify, describe,
    and invoke a skill. It follows the Principle of Least Astonishment (POLA)
    by providing clear, predictable attribute names and behavior.
    """

    def __init__(
        self,
        name: str,
        description: str = "",
        version: str = "1.0.0",
        author: str = "",
        tags: Optional[List[str]] = None,
        category: str = "general",
        platforms: Optional[List[str]] = None,
    ):
        """
        Initialize a SkillMetadata instance.

        Args:
            name: The canonical name of the skill (e.g., "gif-search")
            description: A human-readable description of what the skill does
            version: Semantic version string (default: "1.0.0")
            author: The creator of the skill
            tags: A list of searchable tags for the skill
            category: The functional category of the skill (default: "general")
            platforms: A list of OS platforms this skill supports (e.g., ["macos", "linux"])
        """
        self.name = name
        self.description = description
        self.version = version
        self.author = author
        self.tags = tags or []
        self.category = category
        self.platforms = platforms or []

    def to_dict(self) -> Dict[str, Any]:
        """Convert the metadata to a dictionary for serialization or display."""
        return {
            "name": self.name,
            "description": self.description,
            "version": self.version,
            "author": self.author,
            "tags": self.tags,
            "category": self.category,
            "platforms": self.platforms,
        }

    @classmethod
    def from_frontmatter(cls, frontmatter: Dict[str, Any]) -> "SkillMetadata":
        """
        Create a SkillMetadata instance from a parsed YAML frontmatter dict.

        This class method handles the extraction of known fields and provides
        sensible defaults for any missing values.

        Args:
            frontmatter: A dictionary of key-value pairs from the SKILL.md frontmatter

        Returns:
            A new SkillMetadata instance populated with the frontmatter data
        """
        # Extract the name, falling back to a placeholder if missing
        name = frontmatter.get("name", "").strip()
        if not name:
            logger.warning("Skill frontmatter missing 'name' field; using placeholder.")
            name = "unnamed-skill"

        # Extract description, version, author, tags, category, and platforms
        description = frontmatter.get("description", "").strip()
        version = str(frontmatter.get("version", "1.0.0")).strip()
        author = frontmatter.get("author", "").strip()
        tags = frontmatter.get("tags", [])
        if isinstance(tags, str):
            tags = [tag.strip() for tag in tags.split(",")]
        category = frontmatter.get("category", "general").strip().lower()
        platforms = frontmatter.get("platforms", [])
        if isinstance(platforms, str):
            platforms = [p.strip() for p in platforms.split(",")]

        return cls(
            name=name,
            description=description,
            version=version,
            author=author,
            tags=tags,
            category=category,
            platforms=platforms,
        )


class SkillInfo:
    """
    Represents a discovered skill with its metadata, file path, and content.

    This is the primary data structure returned by the skill scanner. It
    bundles all the information needed to load and use a skill.
    """

    def __init__(
        self,
        metadata: SkillMetadata,
        skill_md_path: Path,
        skill_dir: Path,
        content: str = "",
    ):
        """
        Initialize a SkillInfo instance.

        Args:
            metadata: The parsed metadata from the SKILL.md frontmatter
            skill_md_path: The absolute path to the SKILL.md file
            skill_dir: The absolute path to the skill's directory
            content: The full text content of the SKILL.md file (optional)
        """
        self.metadata = metadata
        self.skill_md_path = skill_md_path
        self.skill_dir = skill_dir
        self.content = content

    def to_dict(self) -> Dict[str, Any]:
        """Convert the skill info to a dictionary for serialization."""
        return {
            "name": self.metadata.name,
            "description": self.metadata.description,
            "version": self.metadata.version,
            "author": self.metadata.author,
            "tags": self.metadata.tags,
            "category": self.metadata.category,
            "platforms": self.metadata.platforms,
            "skill_md_path": str(self.skill_md_path),
            "skill_dir": str(self.skill_dir),
            "content_length": len(self.content),
        }


# ─── Frontmatter Parser ─────────────────────────────────────────────────


def parse_frontmatter(content: str) -> Tuple[Dict[str, Any], str]:
    """
    Parse YAML frontmatter from a skill file's content.

    This function extracts the YAML frontmatter block (delimited by '---')
    and returns it as a dictionary, along with the remaining body content.
    It uses a simple regex-based approach for parsing, which is sufficient
    for the basic metadata fields used in SKILL.md files.

    Args:
        content: The full text content of a SKILL.md file

    Returns:
        A tuple of (frontmatter_dict, body_content_string)
    """
    # Attempt to match the frontmatter pattern at the start of the content
    match = FRONTMATTER_PATTERN.match(content)
    if not match:
        # No frontmatter found; return an empty dict and the full content as body
        return {}, content.strip()

    # Extract the raw YAML string and the body content
    raw_yaml = match.group(1)
    body = content[match.end():].strip()

    # Parse the raw YAML string into a dictionary
    # We use a simple key-value parser for this example
    frontmatter = {}
    for line in raw_yaml.split("\n"):
        line = line.strip()
        if not line or line.startswith("#"):
            continue
        if ":" in line:
            key, _, value = line.partition(":")
            key = key.strip()
            value = value.strip().strip('"').strip("'")
            frontmatter[key] = value

    return frontmatter, body


def sanitize_skill_name(name: str) -> str:
    """
    Sanitize a skill name into a clean, hyphen-separated slug.

    This ensures compatibility with slash command naming conventions
    (e.g., normalizing spaces and underscores to hyphens).

    Args:
        name: The raw skill name to sanitize

    Returns:
        A sanitized, hyphen-separated slug
    """
    # Convert to lowercase and replace spaces/underscores with hyphens
    slug = name.lower().replace(" ", "-").replace("_", "-")

    # Remove any characters that are not alphanumeric or hyphens
    slug = SKILL_INVALID_CHARS.sub("", slug)

    # Collapse multiple consecutive hyphens into a single hyphen
    slug = SKILL_MULTI_HYPHEN.sub("-", slug)

    # Strip leading and trailing hyphens
    slug = slug.strip("-")

    return slug


# ─── Skill Scanner ──────────────────────────────────────────────────────


class SkillScanner:
    """
    Scans a directory for SKILL.md files and indexes them as skills.

    This class is the core of the skill discovery system. It walks a given
    directory tree, finds all SKILL.md files, parses their frontmatter, and
    creates a mapping of skill names to their metadata and file paths.

    The scanner is designed to be efficient and robust, handling missing
    files, malformed frontmatter, and duplicate skill names gracefully.
    """

    def __init__(self, skills_dir: Path):
        """
        Initialize the SkillScanner with a root directory to scan.

        Args:
            skills_dir: The root directory to scan for skill files
        """
        self.skills_dir = skills_dir
        self._skills: Dict[str, SkillInfo] = {}
        self._last_scan_time: Optional[datetime] = None

    def scan(self) -> Dict[str, SkillInfo]:
        """
        Perform a full scan of the skills directory.

        This method walks the directory tree, finds all SKILL.md files,
        parses their frontmatter, and builds an in-memory index of skills.
        It returns a dictionary mapping sanitized skill names to SkillInfo objects.

        Returns:
            A dictionary of {sanitized_skill_name: SkillInfo}
        """
        # Reset the skills index before scanning
        self._skills = {}
        seen_names: Set[str] = set()

        # Ensure the skills directory exists before scanning
        if not self.skills_dir.exists():
            logger.warning(f"Skills directory does not exist: {self.skills_dir}")
            return self._skills

        # Walk the directory tree, looking for SKILL.md files
        for skill_md_path in self.skills_dir.rglob(SKILL_MD_FILENAME):
            # Skip hidden directories (e.g., .git, .github)
            if any(part.startswith(".") for part in skill_md_path.parts):
                continue

            try:
                # Read the SKILL.md file content
                content = skill_md_path.read_text(encoding="utf-8")

                # Parse the frontmatter and body
                frontmatter, body = parse_frontmatter(content)

                # Create a SkillMetadata object from the frontmatter
                metadata = SkillMetadata.from_frontmatter(frontmatter)

                # Sanitize the skill name for use as a slash command
                sanitized_name = sanitize_skill_name(metadata.name)

                # Skip duplicate skill names (first one wins)
                if sanitized_name in seen_names:
                    logger.warning(
                        f"Duplicate skill name '{sanitized_name}' found at "
                        f"{skill_md_path}; skipping."
                    )
                    continue

                # Mark this name as seen
                seen_names.add(sanitized_name)

                # Create a SkillInfo object and add it to the index
                skill_info = SkillInfo(
                    metadata=metadata,
                    skill_md_path=skill_md_path,
                    skill_dir=skill_md_path.parent,
                    content=content,
                )
                self._skills[sanitized_name] = skill_info

                logger.info(
                    f"Discovered skill: {sanitized_name} "
                    f"({metadata.description})"
                )

            except Exception as e:
                # Log the error but continue scanning other skills
                logger.error(
                    f"Failed to parse skill at {skill_md_path}: {e}"
                )

        # Record the scan time
        self._last_scan_time = datetime.now()

        logger.info(
            f"Scan complete. Found {len(self._skills)} skill(s) "
            f"in {self.skills_dir}."
        )
        return self._skills

    def get_skill(self, name: str) -> Optional[SkillInfo]:
        """Retrieve a skill by its sanitized name."""
        return self._skills.get(sanitize_skill_name(name))


# ─── Demonstration ───────────────────────────────────────────────────────

if __name__ == "__main__":
    import tempfile

    # Create a temporary directory structure to simulate a skill library
    with tempfile.TemporaryDirectory() as temp_dir:
        temp_path = Path(temp_dir)

        # Define a mock skill directory and SKILL.md file
        search_skill_dir = temp_path / "gif-search"
        search_skill_dir.mkdir(parents=True, exist_ok=True)

        mock_skill_content = """---
name: Gif Search
description: Search and retrieve animated GIFs
version: 1.0.2
author: Developer-Alpha
tags: media, search
category: utility
platforms: macos, linux
---
# Playbook: Gif Search
This playbook defines how to search and retrieve animated GIFs...
"""

        skill_file = search_skill_dir / SKILL_MD_FILENAME
        skill_file.write_text(mock_skill_content, encoding="utf-8")

        # Initialize and run the scanner
        scanner = SkillScanner(temp_path)
        discovered_skills = scanner.scan()

        # Retrieve and inspect our parsed skill
        gif_skill = scanner.get_skill("gif-search")
        if gif_skill:
            print("\n--- Parsed Skill Metadata ---")
            print(json.dumps(gif_skill.to_dict(), indent=2))
Enter fullscreen mode Exit fullscreen mode

Code Walkthrough: How the Discovery Engine Works

Let’s break down the key design patterns in the code above and explain why they are critical for building an extensible agent.

1. Robust Metadata Parsing with SkillMetadata

The SkillMetadata class is designed around the Principle of Least Astonishment (POLA). Frontmatter configurations can often be messy, written by different developers or generated by different LLM versions.

The from_frontmatter class method acts as a defensive wrapper. It parses raw string tags, normalizes functional categories to lowercase, and provides safe fallbacks for missing critical fields (like naming a folderless skill unnamed-skill rather than throwing a fatal runtime error).

2. Strict Command Sanitization with sanitize_skill_name

In an agentic system, skills are frequently invoked via slash commands (e.g., /gif-search). However, file systems and human-entered names are prone to irregularities (spaces, mixed casing, underscores, or illegal characters).

The sanitize_skill_name function uses regular expressions to normalize any input into a clean, lowercased, hyphen-separated slug:

  • "Gif Search" becomes "gif-search"
  • "deploy_to_prod!!" becomes "deploy-to-prod" This ensures that the invocation contract remains completely deterministic.

3. Non-Blocking Error Boundaries in SkillScanner

When scanning a directory containing dozens of skills, one malformed SKILL.md file should not crash the entire application.

The SkillScanner.scan method wraps the parsing logic of individual files inside a broad try-except block. If a developer (or a background review agent) introduces a syntax error into a specific skill's YAML block, the scanner logs the error with details about the offending file, skips it, and continues indexing the rest of the library. This guarantees high system availability in production.


Why This Matters for the Future of AI Engineering

By treating skills as self-contained, closed-loop playbooks, we unlock several profound advantages over traditional LLM architectures:

Meta-Learning (The Agent That Learns to Learn)

Instead of hardcoding edge-case handlings into your application code, you give the agent the tools to debug itself. When an API payload format changes, the agent's background review process updates the corresponding SKILL.md file. The agent adapts without a developer ever having to push a line of code or restart a container.

Software-Defined Agent Capabilities

Because skills are packaged as simple, standard Markdown files with YAML headers, they are highly portable. You can version-control your agent's skills in Git, roll back problematic updates, and share skill libraries across entirely different agent instances.

Drastically Lower Inference Costs

Instead of cramming a massive, multi-thousand-token system prompt containing every single tool instruction into every single LLM call, the agent dynamically loads only the specific SKILL.md file required for the active task. This keeps prompt context windows small, speeds up response times, and dramatically reduces API costs.


Conclusion

The era of static, hardcoded AI assistants is drawing to a close. To build robust, resilient software agents that can operate autonomously in the real world, we must build them to be self-improving.

By decomposing skills into deterministic Triggers, modular Execution Logic, and self-supervised Memory Integration, we create a foundation for continuous learning. The agent ceases to be a static instruction-follower and becomes an adapting craftsman—growing more capable, more efficient, and more resilient with every single run.


Let's Discuss

  1. How do you handle edge-case failures in your current agentic workflows? Would a self-patching SKILL.md architecture solve some of your most common runtime errors?
  2. What are the security implications of allowing an LLM to self-modify its own skill playbooks? How would you design guardrails or human-in-the-loop validation steps for a production-grade self-improving agent?

Leave a comment below with your thoughts—we’d love to hear how you're approaching the challenge of agent statefulness and self-improvement!

The concepts and code demonstrated here are drawn directly from the comprehensive roadmap laid out in the ebook Hermes Agent, The Self-Evolving AI Workforce: details link, you can find also my programming ebooks with AI here: Programming & AI eBooks.

Take a look at my eBooks

  • Python
  • JavaScript & TypeScript
  • C# / .NET
  • Swift & Apple Platform
  • Kotlin & Android
  • Rust

Python

The Foundations of Python

Data Structures and the Standard Library

Web Development with Python
Building backend services and dynamic websites with a framework like Flask

Advanced Python & AI Integration
Deep dive into OOP, decorators, asyncio, and orchestrating LLMs with LangChain.

Gemini 3 Python Programming - The Complete Guide
Agents, Veo 3.1, Lyria, Nano Banana/Pro, Function Calling, Grounding, Computer Use and Robotics

AI Autonomous Agents with Python Programming
Master LangGraph, CrewAI, and RAG to Build Self-Correcting Swarms and Autonomous Digital Workers

Finance & AI Trading with Python Programming
Master Algorithmic Trading, Financial NLP, and Vectorized Backtesting to Build Autonomous 'News + Math' Strategies

Cloud-Native Python, DevOps & LLMOps. Containerization, Kubernetes, and Serving AI Models at Scale
From Docker and Kubernetes to Serving LLMs with Pulumi

Defensive Cybersecurity with Python Programming
A Practical Guide to System Monitoring, Network Defense, and Automated Security Hardening

Data Science & Analytics with Python Programming

Neural Networks & Deep Learning with Python Programming

Architecting Neuro-Symbolic Agents with Python Programming
Integrating LLMs, Wolfram Alpha, IBM Watson and Open Source Stacks for Near-Zero Hallucination Systems

Bioinformatics & AI with Python Programming
Master Genomic Data Science, Protein Folding with AlphaFold, and AI-Driven Drug Discovery

Geospatial AI (GeoAI) with Python Programming
Building Autonomous GIS Agents, Deep Learning Models, and Interactive Dashboards

Astrophysics & AI with Python Programming
Building Research Agents for Astronomy, Cosmology, and SETI

Open-Source LLMs & Local Fine-Tuning
Mastering LoRA, vLLM, Ollama, and Custom SLMs

Unsloth: Efficient Fine-Tuning for Large Language Models
Methods and Workflows for Fine-Tuning and Deploying Large Language Models on Limited Hardware

Hermes Agent: The Self-Evolving AI Workforce
Architecting Autonomous Systems that Learn, Remember, and Grow.

Frontier AI Safety, Mechanistic Interpretability & Alignment Engineering
Inspecting Neural Circuits, Steering Vectors, Autonomous Capability Evals, and Scalable Oversight for Superintelligent Systems.


JavaScript & TypeScript

Foundations
OpenAI API, Zod, and LangChain.js

The Modern Stack
Building Generative UI with Next.js, Vercel AI SDK, and React Server Components.

Master Your Data
Production RAG, Vector Databases, and Enterprise Search.

Autonomous Agents
Building Multi-Agent Systems and Workflows with LangGraph.js

The Edge of AI
Local LLMs (Ollama), Transformers.js, WebGPU, and Performance Optimization

The AI-Ready SaaS Boilerplate. Auth, Database with Vector Support, and Payment Stack
Auth, Database with Vector Support, and Payment Stack.

Backend for Frontend & Intelligent APIs. tRPC, Edge Functions, and LLM Data Transformation
tRPC, Edge Functions, and LLM Data Transformation.

The Monetization Engine. Stripe, Smart Dunning, and AI Customer Support Agents
Stripe, Smart Dunning, and AI Customer Support Agents.

AI-Driven Growth Engineering. Programmatic SEO with GPT-4, Content Automation, and Analytics.
Programmatic SEO with GPT-4, Content Automation, and Analytics.

No More Localhost. Mastering Docker, Linux, and Containerization for JS & AI Apps
Mastering Docker, Linux, and Containerization for JS & AI Apps.

The Perfect Pipeline. Advanced CI/CD with GitHub Actions, Automated Testing, and AI Code Reviews
Advanced CI/CD with GitHub Actions, Automated Testing, and AI Code Reviews.

Kubernetes & Orchestration. Deploying Scalable Node.js & AI Clusters without Tears
Deploying Scalable Node.js & AI Clusters without Tears.

React Native for Web Developers
From Next.js to Expo, NativeWind, and Universal App

Offline AI & Local LLMs. Running Llama 3 and Vector Search directly on the Smartphone
Running Llama 3 and Vector Search directly on the Smartphone.

App Store Engineering. CI/CD for Mobile (EAS), OTA Updates, and AI-Driven App Store Optimization
CI/CD for Mobile (EAS), OTA Updates, and AI-Driven App Store Optimization.

The TypeScript-First Architect. Building Robust Applications with Effect, Zod, and Drizzle
Building Robust Applications with Effect, Zod, and Drizzle.

The Native Era. Modern Node.js, Bun & Deno without Bundlers or Transpilers
Modern Node.js, Bun & Deno without Bundlers or Transpilers.

Local-First Systems in TypeScript. Collaborative & Offline-Ready Web Apps with CRDTs and WASM DBs
Collaborative & Offline-Ready Web Apps with CRDTs and WASM DBs.

TypeScript Metaprogramming. Advanced Type Gymnastics, Modern Decorators, and Compiler Internals
Advanced Type Gymnastics, Modern Decorators, and Compiler Internals.

Model Context Protocol (MCP) & Computer Use. Standardizing Tool Integration, Vision-Driven Browser Automation, and Agent Governance in TypeScript

Standardizing Tool Integration, Vision-Driven Browser Automation, and Agent Governance in TypeScript.

Generative Media & Visual Workflow Engines. Node-Based AI Canvases, Real-Time Media Streaming Pipelines, and WebGPU Processing in TypeScript
Node-Based AI Canvases, Real-Time Media Streaming Pipelines, and WebGPU Processing in TypeScript.

Neuro-Symbolic AI & Knowledge Graphs. Deterministic Solvers, GraphDBs, Ontologies, and Zero-Hallucination Architectures
Deterministic Solvers, GraphDBs, Ontologies, and Zero-Hallucination Architectures in TypeScript.

Event-Driven Architecture & DDD in TypeScript. Event Sourcing, CQRS, and Microservices at Scale
Event Sourcing, CQRS, and Microservices at Scale.

Building Desktop Apps & Developer Tools with Tauri 2.0, Rust, and TypeScript
Cross-platform desktop tools with Tauri, Rust, and TypeScript.

FinTech Architecture in TypeScript. Precision Math, Double-Entry Ledgers, and High-Reliability Payment Pipelines
Precision Math, Double-Entry Ledgers, and High-Reliability Payment Pipelines.

Hardened TypeScript. Passkeys, Supply Chain Defense, and Zero-Trust Architectures
Passkeys, Supply Chain Defense, and Zero-Trust Architectures.

Spatial Web Development. Building Interactive 3D and WebXR Experiences with React Three Fiber & TypeScript
Building Interactive 3D and WebXR Experiences with React Three Fiber & TypeScript.

Multiple-choice test book for: Foundations (Volume 1)

Spatial Web Development. Building Interactive 3D and WebXR Experiences with React Three Fiber & TypeScript
Building Interactive 3D and WebXR Experiences with React Three Fiber & TypeScript.

Jev: The Definitive Guide to System One AI
Building Sub-100ms Decision Engines, Calibrated Guardrails, and Two-Speed Architectures with Jev and Generative LLMs


C# / .NET

Get all the Ten C# & AI volumes at a discounted price, or choose an ebook:

The Foundations
Syntax, Type System, and Logic for Modern Developers.

Advanced OOP & AI Data Structures
Modeling Complex Systems and Tensors.

Data Manipulation, LINQ & Vectors
From Collections to AI Embeddings

Asynchronous AI Pipelines
Async/Await, Parallelism, and Streaming LLM Responses.

Building AI Web APIs with ASP
NET Core. Serving Models and Chat Endpoints

Intelligent Data Access with EF Core
Vector Databases, RAG, and Memory Storage.

Cloud-Native AI & Microservices
Containerizing Agents and Scaling Inference.

The Core of AI Engineering: Microsoft Semantic Kernel & Agentic Patterns

Edge AI & Local Inference
Running LLMs (Llama/Phi) locally with C# and ONNX.

High-Performance C# for AI
Span, SIMD, and Optimizing Token Processing

Full Stack AI with Blazor. Building Interactive Copilots and WASM AI
Building Interactive Copilots and WASM AI.

Enterprise AI Integration & Process Automation. Connecting LLMs to legacy systems, internal APIs, and real-world business processes
Connecting LLMs to legacy systems, internal APIs, and real-world business processes.

AI for Game Development & Interactive Simulation. Using LLMs and generative AI to create dynamic worlds and intelligent characters in Unity
Using LLMs and generative AI to create dynamic worlds and intelligent characters in Unity.


Swift & Apple Platform

Get the Swift & AI 10 Volumes Bundle at a discoutend price, or choose an ebook:

Core ML & Vision Framework
On-device image classification, object detection, and custom model integration with Core ML and Vision.

Apple Intelligence & Foundation Models
Building apps with Apple's on-device LLM APIs, Writing Tools, and the Apple Intelligence framework

Natural Language & Speech
NLP, sentiment analysis, text classification, and Speech-to-Text with Apple's Natural Language and Speech frameworks.

SwiftUI for AI Apps
Building reactive, intelligent interfaces that respond to model outputs, stream tokens, and visualize AI predictions in real time

Create ML Studio
Training custom models without Python: tabular, image, sound, and motion classifiers using Create ML in Swift.

MLX Swift & Local LLMs. Deep dive into Apple's MLX framework for high-performance machine learning.
Building custom inference engines, fine-tuning local models (LoRA), and leveraging Unified Memory directly from Swift.

visionOS & Spatial AI with Swift

Swift + OpenAI & LangChain
Integrating external LLM APIs, RAG pipelines, and agentic workflows in iOS and macOS apps

CoreData, CloudKit & Vector Search

Shipping AI Apps to the App Store


Kotlin & Android

On-Device GenAI with Android Kotlin
Mastering Gemini Nano, AICore, and local LLM deployment using MediaPipe and Custom TFLite models

Edge AI Performance with Android Kotlin
Optimizing hardware acceleration via NPU, GPU, and DSP. Advanced quantization and model pruning

Android AI Agents
Building autonomous apps that use Tool Calling, Function Injection, and Screen Awareness to perform tasks for the user


Rust

Rust Advanced Memory Patterns for AI
Mastering Lifetimes, Smart Pointers, and custom allocators for managing large models and datasets

Extending Python with Rust. Creating high-performance Python modules with PyO3.
Creating high-performance Python modules with PyO3 for data processing, tokenization, and inference, replacing slow Python code.


Top comments (0)