janAGI is an architecture for AI workflows over real business processes. It defines four things — the shape of an event, tool policy, the audit record, and the approval gate. The components that fulfil them are your choice, and swap out without rewriting the rest.
The reference implementation runs on n8n + OpenClaw + MindsDB + Postgres. Swap any of them for another — Hermes Agent, Windmill, Temporal — as long as it honours the contract.
Want to start on your own? Use the open-source repo. Need a pilot or production rollout? Continue to contact or hezina.cz.
One ingress, a normalised event schema, and the first audit-log write.
The agent classifies and proposes actions, but nothing sensitive runs without policy.
n8n routes the proposal for approval and only then calls SMTP, API, or the database.
01 · What it is
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.
02 · Architecture
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.
03 · Request flow
An n8n trigger picks up an inbound email, webhook or cron event. No business logic — just payload normalisation and the first audit_log write.
04 · Quick start
# 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
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
05 · Use cases
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.
# n8n nodes (excerpt) trigger: IMAP → INBOX classify: agent.email enrich: postgres.SELECT customer_ctx draft: agent.tools.compose approve: telegram.sendMessage waitForResponse('✓ / ✘') act: smtp.send audit: postgres.INSERT audit_log runtime: openclaw # ← vyměnitelné: hermes | nemoclaw | mastra
A cron or manual trigger fires reality_browser. The agent fetches sources, summarises, MindsDB scores relevance. Result lands in Postgres, notification on Telegram.
# 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 runtime: openclaw # ← vyměnitelné: hermes | nemoclaw | mastra
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.
# inbound from any system trigger: webhook POST /hooks/event validate: agent.validator.check against: postgres + mindsdb propose: openclaw.tool_policy.allow act: http.request CRM /api/v2 retry: 3x exp-backoff audit: postgres.INSERT audit_log runtime: openclaw # ← vyměnitelné: hermes | nemoclaw | mastra
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.
# conversational analytics trigger: telegram.onMessage parse: agent.analytics.nl2sql explain: preview SQL to user execute: mindsdb.query format: render table + chart reply: telegram.send + csv audit: postgres.INSERT audit_log runtime: openclaw # ← vyměnitelné: hermes | nemoclaw | mastra
06 · Agents
A large model only where judgment is actually required. Classification and routine work run on a small or local model, computation on CPU. This is not a cost optimisation — it is a condition for the system to make sense in production.
07 · Audit & HITL
08 · Infrastructure
Running costs — infrastructure for a pilot on one VPS starts around €15/month. In real production traffic, tokens are the dominant cost item, which is exactly why per-agent model choice is part of the design, not a later optimisation.
09 · Contribute
10 · Commercial
11 · Contact
Send a technical question, use case, or collaboration note. One form, same webhook, manual follow-up.