# n8n-claw: a self-hosted AI agent assembled from n8n workflows

> n8n-claw is an autonomous agent built as n8n workflows over PostgreSQL and Claude, reachable by Telegram or a webhook. It is for people who already run Docker and want agent memory, skills and reminders on their own hardware.

**freddy-schuetz/n8n-claw** — OpenClaw-inspired autonomous AI agent built entirely in n8n. Adaptive RAG-powered memory, Skills via MCP templates, Expert Agents with delegated sub-agents, proactive task management, media understanding - self-hosted with one setup script

- Repository: https://github.com/freddy-schuetz/n8n-claw
- Website: https://n8n-claw.com
- Stars: 560 · Forks: 104
- Language: Shell
- License: not declared
- Published: 2026-09-10 · Updated: 2026-09-10 · Language: en
- Canonical page: https://hysenlabs.com/projects/freddy-schuetz-n8n-claw

## The problem n8n-claw solves, and who it is for

Most "AI agent" stacks are hosted services. You get a chat box, an API key, and no control over where conversation history, files or credentials live. n8n-claw takes the opposite position: it is a set of n8n workflows plus PostgreSQL, run through Docker Compose on your own machine, with Telegram as the primary interface and an HTTP webhook as the secondary one. The README describes it as "a fully self-hosted AI agent built on n8n + PostgreSQL + Claude."

The intended user is someone who already has n8n running, or is willing to run it, and wants the agent layer on top. That person gets task tracking, long-term memory, reminders, scheduled actions, web search through a bundled SearXNG instance, page reading through Crawl4AI, and browser automation through Browser Use. The README is explicit that API keys for Anthropic and embeddings are stored in the database in a tools_config table and read by workflows at runtime through PostgREST, not passed as environment variables. That is a deliberate choice with consequences for backup and rotation.

It is not for someone who wants an agent in five minutes with no infrastructure. The stack includes n8n itself, a Supabase PostgreSQL image, PostgREST, SearXNG, and optional bridges for Discord, email, browser and files. Each of those is a moving part you now own.

## How the workflow graph actually routes a message

The architecture section of the README lays out two entry points that converge: Telegram and a webhook at POST /webhook/agent. Both feed the same agent workflow, which the README labels as running on Claude Sonnet. From there the agent has a fixed set of tools rather than free rein: Task Manager, Project Manager, Memory, Knowledge Graph, MCP Client, Library Manager, MCP Builder, Reminder, Expert Agent, Agent Library, Telegram Status, HTTP Tool, Web Search, Web Reader and Self Modify.

Memory is the most specific piece. The README describes hybrid search combining semantic, full-text and entity matching, fused with reciprocal rank fusion, with time decay, tags, entity tracking, source attribution and category-based auto-expiry. Two claims there are worth separating. The fusion and decay are retrieval-quality decisions. The claim that it "survives embedding API outages" is an availability decision: if the embedding provider is down, the full-text and entity paths still return results. That is a real design commitment, not marketing.

Around the agent sit background workflows that run without a user turn: a heartbeat every five minutes for recurring actions, proactive reminders and file cleanup; a reminder runner every minute; a memory consolidation job daily at 3am that summarizes conversations into long-term memory; a background checker that stays silent unless it finds something new; and an error notification workflow that pushes workflow failures to Telegram and logs them to memory_long. That last one is the most useful piece of the design, because it means the agent can answer "did anything fail today?" from memory rather than sending you into n8n execution logs.

## Installing n8n-claw with setup.sh and Docker Compose

The repository root contains setup.sh, docker-compose.yml and .env.example. The README's installation section is the authority here, and the environment file is meant to be copied first, since setup.sh fills in several values and reads others. The .env.example says to copy it to .env and fill in your values, and warns that N8N_ENCRYPTION_KEY is auto-generated by setup.sh and must not be changed after the first run.

```bash
cp .env.example .env
./setup.sh
```

Before running setup.sh, fill in the values it cannot guess. The file groups them by concern, and the minimum set is the n8n API key, the Supabase URL and keys, the Telegram bot token and chat ID, and one LLM provider key.

```bash
N8N_API_KEY=your_n8n_api_key
SUPABASE_URL=http://your-server:8000
SUPABASE_ANON_KEY=your_anon_key
SUPABASE_SERVICE_KEY=your_service_role_key
TELEGRAM_BOT_TOKEN=your_bot_token
TELEGRAM_CHAT_ID=your_chat_id
ANTHROPIC_API_KEY=your_anthropic_key
```

The compose file defines the n8n service on port 5678 and a Supabase PostgreSQL image, supabase/postgres:17.6.1.063, with the database port bound to 127.0.0.1:5432 rather than exposed publicly. Migrations in ./supabase/migrations are mounted into the Postgres init directory, so schema is applied on first boot. n8n waits on the database health check before starting.

```bash
docker compose up -d
docker compose logs -f n8n
```

Once n8n is reachable, the README's Services and URLs section is where you confirm which ports each component landed on. The first real use is a Telegram message to your bot. Ask it to create a task with a due date, then ask it what is due. That exercises the Task Manager tool and the Telegram reply path end to end, and confirms the bot token and chat ID are correct. The README also documents connecting external clients such as Claude Desktop, ChatGPT, Claude Code, Cursor and Lovable, and an optional webhook adapter that maps Slack, Teams or a generic webhook onto POST /webhook/agent. The adapter is described as a Set node you customize without code.

## Where n8n-claw breaks or is the wrong choice

Browser sessions are the clearest limitation. The README states that sessions are pooled per domain so the agent stays logged in across calls, and then says plainly that this pool is in-memory and lost on restart. So any login-gated workflow has to be redone after a container restart. Interactive two-factor authentication works differently: the agent stops at the prompt, asks you for the code over Telegram, and enters it on the same live page. That is a good pattern, but it requires you to be reachable at that moment. It is not an unattended automation path.

The second constraint is the licence. The repository metadata does not state one. Before you build anything you intend to redistribute or run commercially, that is a question for the maintainers, and the absence is itself a signal about how the project is positioned.

The third is operational coupling. Because API keys live in the tools_config table rather than in the environment, restoring a database backup restores credentials too, and rotating a key means updating the database, not editing .env. The README's own release notes show how tightly this couples to the host: v1.9.1 is titled "Bugfix: agents table collision with n8n 2.21+". An agent framework whose storage layer collides with n8n's own tables is telling you that upgrading n8n is not a neutral act. If you need a stable, rarely-changing deployment, this is the wrong tool. If you want a managed agent with an SLA, it is also the wrong tool.

## How n8n-claw differs from wiring an agent in n8n yourself

The obvious alternative is not a competing product, it is n8n itself. You can build an agent in n8n with an AI Agent node, a chat trigger and a vector store, and many people do. The difference in approach is what n8n-claw adds on top of that starting point: opinionated persistence and scheduling. A hand-built agent typically gets a chat trigger and a memory node. n8n-claw ships a schema, a hybrid retrieval function with rank fusion and decay, a knowledge graph with multi-hop traversal, a consolidation job that runs at 3am, a heartbeat on a five-minute timer, and a reminder runner on a one-minute timer. Those are the parts people usually postpone and then never build.

The second alternative is a hosted agent platform. The trade is inverted: you give up control of data residency and credentials, and in exchange you get someone else's uptime and upgrade path. n8n-claw's answer is that the agent runs next to your own n8n, which already holds your other automations, so the agent can call the same services your workflows do. That is a genuine advantage if you are already invested in n8n, and a genuine cost if you are not, because you inherit n8n's upgrade cadence as well as your own.

## Maintenance, upgrades and licence status

The last push to the default branch was on 2026-09-08, and the repository is not archived. The most recent tagged release is v1.9.2 from 2026-06-04, described as "Config backup: 413 fix + claw_agents in backups". Before that, v1.9.1 on 2026-05-31 fixed an agents table collision with n8n 2.21+, and v1.9.0 on 2026-05-11 added browser use and interactive 2FA. The gap between the last release and the last push suggests work continues on the branch between tags.

The upgrade cost is real and shaped by the release notes. Because the project tracks n8n:latest in the compose file, a routine docker compose pull can move you onto an n8n version the workflows were not tested against. The v1.9.1 entry is direct evidence that this has already broken once. The README has an Updating section and a separate Postgres 17 upgrade section for existing installations, so upgrades are not a single command. Read both before you pull.

On licensing, the repository metadata does not name a licence. I cannot tell you what you are permitted to do with the code, and nothing here is legal advice. If you plan to redistribute it, host it for others, or use it inside a company with licence review, resolve that question with the maintainers first. The CHANGELOG.md and the docs directory at the repository root are the places to check for anything the README omits.

## Conclusion

Adopt n8n-claw if you already operate n8n or Docker and want agent memory, reminders and MCP skills on your own hardware rather than in a hosted product. Do not adopt it if you want a managed service, a signed release artifact, or a project with a stated software licence, because the repository does not give one. Before committing, read .env.example end to end, confirm which LLM provider you will use, and check the CHANGELOG and releases for how upgrades are meant to be applied.

## FAQ

### What is n8n-claw?

It is a self-hosted AI agent built as n8n workflows on top of PostgreSQL and Claude, with Telegram and an HTTP webhook as its interfaces. The README describes it as fully self-hosted and running on your own infrastructure.

### How do I install n8n-claw?

Copy .env.example to .env, fill in the n8n API key, Supabase keys, Telegram bot token and chat ID, and one LLM provider key, then run setup.sh. Docker Compose brings up n8n on port 5678 plus the PostgreSQL and PostgREST services.

### Does n8n-claw need an API key for web search?

No. The README states that web search runs through a built-in SearXNG instance and needs no API key.

### Which LLM providers can n8n-claw use?

The .env.example lists anthropic as the default, with openai, openrouter, ollama, deepseek, gemini and openai_compatible as supported alternatives. setup.sh prompts you to choose and saves the selection.

### Does n8n-claw keep browser logins between runs?

Only within a running container. The README says browser sessions are pooled per domain so the agent stays logged in across calls, but the pool is in-memory and lost on restart.

### What licence is n8n-claw released under?

The repository metadata does not state a licence, so the terms are not documented anywhere I can point you to. Ask the maintainers before redistributing or using it commercially.

## Sources

- [freddy-schuetz/n8n-claw on GitHub](https://github.com/freddy-schuetz/n8n-claw)
- [Issues](https://github.com/freddy-schuetz/n8n-claw/issues)
- [Project website](https://n8n-claw.com)
- [README](https://github.com/freddy-schuetz/n8n-claw/blob/main/README.md)
- [Releases](https://github.com/freddy-schuetz/n8n-claw/releases)

---

Hysen Labs editorial analysis, written from the project's own repository and release notes. Cite the canonical page: https://hysenlabs.com/projects/freddy-schuetz-n8n-claw
