open-source · self-hosted · audit-ready

Open-source AI orchestration
for processes you need to control.

janAGI composes an open-source stack for workflows you can actually control. n8n handles orchestration, OpenClaw reasoning, and MindsDB the data layer. Audit, approval gates, and model swap stay part of the design from day one.

audit log from day oneapproval gatesmodel swap without rewritesMIT + self-hosted

Want to start on your own? Use the open-source repo. Need a pilot or production rollout? Continue to contact or hezina.cz.

Operational pattern preview
request → decision → action
01 · TRIGGER

Email / webhook / cron

One ingress, a normalised event schema, and the first audit-log write.

02 · AGENT

OpenClaw + tool policy

The agent classifies and proposes actions, but nothing sensitive runs without policy.

03 · APPROVAL

Human gate before action

n8n routes the proposal for approval and only then calls SMTP, API, or the database.

stepownerevent
01n8nInbound payload received and normalised
02OpenClawIntent classified, tools checked
03HITLWaiting for human approval in Telegram
04n8nAction confirmed, write committed, audit persisted
STACK
n8n + OpenClaw + MindsDB + Postgres
GUARDRAILS
audit log, retries, approval gate, and tool whitelist
DELIVERY
self-hosted repo for builders, with pilot and rollout via hezina.cz
STACK
n8n + OpenClaw
+ MindsDB + Postgres
CONTROL
audit log + approval
for sensitive actions
MODELS
Claude / GPT / local
model = config
RUNTIME
docker compose
local or VPS

A framework, not a platform.

janAGI is a framework for building AI workflows over real business processes. Three separate layers, audit by default, and the model treated as configuration. Swap any layer without breaking the rest.

  • orchestrationn8n — triggers, routing, retries, audit log
  • reasoningOpenClaw — agents, classification, tool policy
  • dataMindsDB + PostgreSQL — federation, queries, predictions
  • runtimeDocker Compose — VPS, VM, managed Docker host
  • interfacesTelegram, REST, webhook, n8n UI
  • licenseMIT — fork, inspect, deploy

Three layers. Clean interfaces.

click for detail
n8n
L1 · ORCHESTRATION
triggersroutingapprovalretryaudit log
OpenClaw
L2 · AI AGENTS
reasoningclassificationaction proposaltool policy
MindsDB + PostgreSQL
L3 · DATA
federationpredictionscompany systems

L1 · Orchestration / n8n

n8n is the conductor. It holds workflows, triggers, retries, audit log and approval steps. When a request comes in — IMAP, webhook, cron — it decides which agent to call and what to do with the result.

interface
visual editor + REST
scope
triggers, routing, retries
runtime
Docker

How a request becomes a final reply.

click a step

Inbound · IMAP / webhook

An n8n trigger picks up an inbound email, webhook or cron event. No business logic — just payload normalisation and the first audit_log write.

node
n8n.IMAP
input
email / webhook / cron
audit
event.received
· each step is a separate n8n node, audit log written on every edge

Run it via Docker Compose.

4 services · Docker Compose
  1. git clone
    Clone the repo. Everything runs in Docker — nothing builds on the host.
  2. docker compose up -d
    4 services: n8n, OpenClaw, MindsDB, PostgreSQL. First start depends on image cache and network throughput.
  3. Import workflow
    In the n8n UI import a workflow JSON. Keep triggers, routing, and retry logic in separate nodes.
  4. Configure agent
    Edit the agent definition. Set tool policy, model, and system prompt.
  5. Connect data
    Wire company data through MindsDB — CRM, ERP, files, APIs. Federation over many sources.
shell
# 1. Clone & boot
 git clone https://github.com/HonzaHezina/janAGI.git
cd janAGI
docker compose up -d

# 2. Service URLs
# n8n       http://localhost:5678
# OpenClaw  http://localhost:7000
# MindsDB   http://localhost:47334
agents/main.yaml
name: main
model: claude-sonnet-4-6
role: dispatcher
routes:
  - email     → email_agent
  - research  → reality_browser
  - analytics → analytics_agent
tools:
  - n8n.webhook
  - mindsdb.query
  - postgres.read

What you build with it in practice.

Inbound email → drafted reply

n8n's IMAP listener picks up the message, OpenClaw classifies intent (offer / question / complaint), pulls context from Postgres, and drafts a reply. A human approves it in Telegram, and n8n sends the result via SMTP.

TRIGGERIMAP listener v n8n
AIOpenClaw email agent — klasifikace, draft
HITLschválení v Telegramu před odesláním
ACTIONSMTP odeslání + log do Postgres
DATAkontext zákazníka, hist. komunikace
workflows/email-assistant.json
# n8n nodes (excerpt)
trigger:  IMAP → INBOX
classify: openclaw.agents.email
enrich:   postgres.SELECT customer_ctx
draft:    openclaw.tools.compose
approve:  telegram.sendMessage
           waitForResponse('✓ / ✘')
act:      smtp.send
audit:    postgres.INSERT audit_log

Cron → web scrape → summary in DB

A cron or manual trigger fires reality_browser. The agent fetches sources, summarises, MindsDB scores relevance. Result lands in Postgres, notification on Telegram.

TRIGGERmanuální nebo cron v n8n
AIreality_browser → analytics
ACTIONzápis do DB, notifikace přes Telegram
DATAMindsDB predikce relevance
workflows/research.json
# schedule: 08:00 daily
trigger:  cron('0 8 * * *')
fetch:    reality_browser.scrape
           sources: [hn, rss, custom_urls]
score:    mindsdb.predict relevance
filter:   relevance > 0.65
store:    postgres.INSERT findings
notify:   telegram.send digest

Webhook → validating agent → CRM write

An external system fires a webhook, n8n hands it to OpenClaw for validation. The reality_calibrator checks consistency, an action is proposed, n8n calls the CRM/ERP API.

TRIGGERwebhook z externího systému
AIreality_calibrator — validace & akce
ACTIONREST call do CRM/ERP
DATAMindsDB federace nad více zdroji
workflows/crm-bridge.json
# inbound from any system
trigger:  webhook POST /hooks/event
validate: reality_calibrator.check
           against: postgres + mindsdb
propose:  openclaw.tool_policy.allow
act:      http.request CRM /api/v2
retry:    3x exp-backoff
audit:    postgres.INSERT audit_log

SQL question → analytics agent → report

User asks in natural language via Telegram. The analytics agent runs MindsDB over company data and returns table + commentary. The exact query that ran is always in the audit log.

TRIGGERTelegram message v přirozeném jazyce
AIanalytics — NL2SQL přes MindsDB
ACTIONTelegram odpověď + CSV link
DATAMindsDB → Postgres + ERP federace
workflows/analytics.json
# conversational analytics
trigger:  telegram.onMessage
parse:    openclaw.analytics.nl2sql
explain:  preview SQL to user
execute:  mindsdb.query
format:   render table + chart
reply:    telegram.send + csv
audit:    postgres.INSERT audit_log

Specialised agents instead of one do-it-all model.

#
name
role
description
01
main
dispatcher
routes requests to specialised agents
02
reality_calibrator
validator
verifies output consistency
03
reality_browser
research
web scraping & research
04
analytics
data
data analysis through MindsDB
05
email
comms
handles email communication
06
reality_dom_analyzer
ui
analyses DOM/UI state
Custom agent? → docs/agents/custom.md · WIP

Every step is traceable. Sensitive actions go through human approval.

built-in defaults
postgres > audit_log · tail -fsample stream
  • 01audit_logevery flow edge writes to Postgres — trigger, agent, tool, result, latency
  • 02tool policyYAML whitelist of what an agent may call. No explicit allow = no.
  • 03HITL gateanything sensitive (sending email, CRM writes, payments) waits for human approval in Telegram
  • 04replayany run can be replayed step-by-step in n8n — debug and compliance
  • 05model swapswap Claude / GPT / local model without changing the rest — model is config, not code

Runs anywhere you already have Docker.

  • 01hostHetzner VPS, AWS EC2, vlastní server — kdekoli máš Docker
  • 02deployplain docker compose nebo managed Docker host
  • 03ci/cdexterní pipeline — build, test, deploy hooks
  • 04contextrepo docs, DB stav a audit log
  • 05interfaceuživatel komunikuje přes Telegram, REST API nebo n8n UI
  • 06backupPostgres dump cron + S3-compatible bucket

cost · indicative minimum

~ 15 €/mo

Indicative budget for a small pilot on one VPS. Actual cost depends on traffic, model choice, and data retention.

  • VPS · Hetzner CX22~ 4.50 €
  • Backups · S3~ 1 €
  • LLM tokens · light usage~ 9.50 €

Open code for teams that want to understand the runtime.

REPOSITORYHonzaHezina/janAGIprimary project repository — janAGI source, configuration, workflows, and project context.→ open on GitHub
PULL REQUESTCONTRIBUTING.md · WIPpublic contribution guidelines are not published yet. The workflow stays fork → branch → PR.→ guidelines soon
DISCUSSGitHub Discussions · Private betapublic discussions are not open yet. Questions, proposals, and RFCs currently run in private beta.→ request access

One path for questions. GitHub for contributions.

1 form · GitHub · hezina.cz
WHERE NEXT

Contribute, ask a question, or deploy commercially.

Code, issues, and pull requests belong on GitHub. Send technical questions, use cases, or feedback through the single form below. If you need a commercial rollout, continue to hezina.cz.

WEBHOOK · CONTACT

Question / collaboration

Send a technical question, use case, or collaboration note. One form, same webhook, manual follow-up.

Open-source contributions go through GitHub. Commercial delivery goes through hezina.cz.