Hydra banner
kai-linux kai-linux

Hydra

AI community

Description

Self-extending AI agent that writes, validates, and hot-loads its own Python tools at runtime. Built with PydanticAI + MCP.

Installation

This entry records only its repository, not the path inside it, so there is no exact command to give. Open the source below and copy the folder into ~/.claude/skills/, or the file into ~/.claude/agents/.

README

Hydra

**A self-extending AI agent that writes its own tools at runtime.**

[![CI](https://github.com/kai-linux/hydra/actions/workflows/ci.yml/badge.svg)](https://github.com/kai-linux/hydra/actions/workflows/ci.yml) [![Python](https://img.shields.io/badge/python-3.11%2B-blue.svg)](https://www.python.org/downloads/) [![License: MIT](https://img.shields.io/badge/license-MIT-green.svg)](./LICENSE) [![Built with PydanticAI](https://img.shields.io/badge/built%20with-PydanticAI-2b6cb0.svg)](https://ai.pydantic.dev/) [![MCP](https://img.shields.io/badge/MCP-Model%20Context%20Protocol-6b46c1.svg)](https://modelcontextprotocol.io/)

Hydra ships with a handful of seed tools and grows from there. Ask it to do something its toolbox doesn't cover, and it writes the tool, validates it, hot-loads it, runs it, and keeps it for next time. Over months of use, the toolbox becomes a reflection of how you work.

The loop

User request
    │
    ▼
┌──────────────────────────────────┐
│  Is there already a tool for it? │──── yes ──►  run_tool  ──►  response
└──────────────┬───────────────────┘
               │ no
               ▼
┌──────────────────────────────────┐
│  create_tool                     │
│    - LLM writes Python           │
│    - validate + save to disk     │
│    - hot-load into registry      │
└──────────────┬───────────────────┘
               │
               ▼
           run_tool  ──►  response

Example session

you> Get me the top 3 Hacker News stories.
hydra> (scrape_hacker_news already exists — running it)
       1. [159] Fixing a 20-year-old bug in Enlightenment E16
          https://iczelia.net/posts/e16-20-year-old-bug/
       ...

you> Now translate the first headline to German.
hydra> I don't have a translate tool yet. Creating translate_text ...
       > Tool created and loaded.
       "Einen 20 Jahre alten Bug in Enlightenment E16 beheben"

you> Translate the next he