Harness Basic Architecture
Open-source (MIT) · claude_harness · shipping in stages, M0 Oct 2026 → v1.0 Feb 2027One template. Two doors in. Every solution is yours to keep.
Every di-factory solution — from an open, ready-to-use build on our OpenClaw + Paperclip stack, all the way to a fully tailored one — sits on claude_harness, the same MIT-licensed template.
Eighty percent is the template we maintain in the open. Twenty percent is your instance: your prompts, your data connectors, your policies.
You own the code. You own the cloud. You own the data.
Two doors in
Door 1 — Open, ready to use. The full OpenClaw + Paperclip stack, sitting on the same template. Fastest path in, lowest lift, calibrated for teams who want the template's opinion on how AI should run.
Door 2 — Tailored. Same 80/20 discipline, calibrated to your workflow, your data, your policies. Slower to build, closer to fit.
Same team. Same template. Same ownership sentence at the end. What changes is how much of the twenty percent we shape together.
Why it's built this way
You own the system, not a subscription. No SaaS trap. No metered access. When we finish, the repo, the cloud account, and the data are yours. If you stop calling us tomorrow, the system keeps running.
No lock-in — swap models, providers, clouds. The template is designed to be provider-neutral. Change your LLM provider, your vector DB, your cloud — without a rewrite. Everything replaceable is replaceable at the config layer.
Zero markup on third-party costs. You pay OpenAI, AWS, Anthropic, Pinecone, whoever — direct, at their price. We don't resell compute or tokens. Our fee is our fee.
Built for Mexico first. PII tokenization, LFPDPPP-compliant baseline, Spanish-first prompts and evals when you need them. Not a US template with a translation layer.
1. What this is
Every solution di-factory delivers — a tailored ML model, an MVP, an agentic transformation, a PyME automation — is built as an instance of claude_harness, our open-source (MIT) solution template. 80% is the template: the agent core, tool registry, memory, governance and ops layers we build and maintain in the open. 20% is your instance: the solution spec that encodes your prompts, your tools, your data connectors and your policies. Onboarding a client means writing that spec and connecting secrets — it does not mean writing new code.
Every di-factory solution is tailored — from an open, ready-to-use build on our own OpenClaw + Paperclip stack, to a fully custom one. Same template underneath. Same code, cloud, and data ownership at the end.
The template is open source and MIT-licensed: it runs in your own cloud account, on your keys, under your control. There is no lock-in to one model, one cloud, or one runtime — and third-party costs (model calls, messaging gateways, cloud infrastructure) pass through at zero markup, itemized per vendor.
The template lives in the open on GitHub, MIT-licensed, versioned, and audited: github.com/di-factory/claude_harness. Read the code before you sign anything — that's the point.
2. What's in the 80% — capability modules by line of business
The module matrix below shows which parts of the template a given instance actually needs. It is the same evidence base every line of business draws from — nothing here is bespoke per client.
| Module | PyME agents | Agentic cells | RAG assistant | ML models | Delivery agents (MVP, Consulting, VC) |
OPC (on request) |
|---|---|---|---|---|---|---|
| Core loop, providers, routing, budgets | ● | ● | ● | ● | ● | ● |
| Solution spec | ● | ● | ● | ● | ● | ● |
| Channels (WhatsApp, Telegram, web, email, Slack, voice) | ● | ● | ○ | ○ | – | ● |
| Triggers (schedule, webhook, event, batch) | ● | ● | ○ | ○ | ○ | ● |
| Tool registry + MCP connectors | ● | ● | ● | ● | ● | ● |
| Coding tool pack | – | ● (Dev) | – | – | ● (MVP) | ○ |
| Knowledge / RAG | ○ | ● | ● | – | ● | ○ |
| 5-layer memory | ● | ● | ○ | ○ | ● | ● |
| Agent teams (roles, handoffs, sub-agents) | ○ | ● | – | – | ○ | ● |
| Durable workflows (plans, queue, retries) | ● | ● | ○ | ○ | ○ | ● |
| Human-in-the-loop (approvals inbox, escalation) | ● | ● | ● | ○ | ● | ● |
| Verification | ● | ● | ● | ● | ● | ● |
| Governance (PII, consent, audit, retention, region) | ● | ● | ● | ● | ○ | ○ |
| ML models as tools | ○ | ○ | – | ● | – | ○ |
| Evals per solution | ● | ● | ● | ● | ● | ● |
| Tenancy, config versioning, secrets, deploy | ● | ● | ● | ● | ○ | ● |
● required · ○ optional · – not needed
3. What's in the 20% — the solution spec
A solution is a versioned, declarative spec — JSON, validated by schema — with prompt files and optional extensions alongside it. This is the file format your 20% gets written in:
| Section | Declares |
|---|---|
solution | id, version, line of business, description, locale |
agents | named agents — role, system prompt, model role, tools, memory policy, sub-agents |
models | per-role provider / model / effort and allowed provider regions |
tools | tool packs, MCP servers, HTTP connectors, ML-model tools |
knowledge | corpora to ingest and retrieval settings |
channels / triggers | inbound channels and schedules, webhooks, events |
workflows | durable multi-step flows and handoffs between agents |
policies | permissions, guardrail profile, budgets, verification, escalation |
governance | PII classes, consent rules, retention, audit level |
evals | eval set and pass thresholds for this solution |
deploy | deployment profile (local, container, AWS Terraform) and required secrets |
A pack is a reusable, versioned spec fragment — for example a "PyME Appointment Agent" base. An instance is one or more packs plus your overrides plus a tenant id. For a clinic's Appointment Agent, the 20% is the reminder templates, the Google Calendar connector, and the clinic's own patient-list rules — everything else is template.
4. How it's different
| vs. | The wedge |
|---|---|
| Black-box SaaS | You own the code, the data, the cloud account. Cancel us and the agent keeps running. |
| One-off custom build | 80% is a hardened template with evals and governance already built in. You're not paying to reinvent the loop. |
| A framework (LangGraph, no-code builder) | We don't hide the loop behind a graph DSL or a vendor console. Your engineers can read and debug it in plain Python. |
5. Roadmap
The diagram above tracks the actual build — five 4-week milestones from 2026-09-28: core skeleton (M0, 2026-10-23), agent core and console (M1, 2026-11-20), headless runtime and governance minimum (M2, 2026-12-18), intelligence modules (M3, 2027-01-15), and v1.0 operations hardening (M4, 2027-02-12). What this page claims publicly is gated to what has actually shipped and passed its tests at each milestone — not the roadmap date alone.
5.1 Governance
Shipping in M2 (2026-12-18). PII tokenization, consent and opt-out tracking, an immutable audit log, and per-data-class retention — built for Mexico first against the LFPDPPP baseline. This section will expand once the governance modules ship and pass their acceptance tests; nothing here is available before then.
6. Not an eighth line of business
The template sits underneath di-factory's seven lines of business — it is the delivery mechanism, not a competing offer. Tailored ML Models, MVP Development, Business Consulting, VC Partnership, Agentic Transformation, OPC Startup and SMB/PyME Solutions are all things you buy from di-factory; an instance of this template is how we build the one you choose.
Want to see the template running? Book a 30-minute discovery call — we'll show you an instance and walk the 80/20 split for your use case.
Book a discovery call →
Tech Stack
| Element | Core Stack Options |
|---|---|
| Language & packaging | Python 3.12+ · MIT · PyPI di-factory-general-harness · uv / pyproject.toml |
| Schemas, config & specs | Pydantic v2 — JSON specs and settings, versioned and hot-reloadable |
| Model providers | Anthropic SDK + OpenAI SDK (any OpenAI-compatible endpoint), conformance-tested |
| Tools | Official mcp Python SDK · HTTP/REST connectors · coding & general packs |
| Service / API / webhooks | FastAPI + Uvicorn — channel adapters, triggers, admin API |
| Storage | SQLite (local) · PostgreSQL + pgvector (production) |
| Console | Textual TUI, launched by a Typer CLI — build and test instances locally |
| Deploy | Docker · Terraform (AWS first, GCP/Azure later) |
| Tests & evals | pytest + pytest-asyncio · FakeProvider · conformance suite · per-solution eval sets |
| Lint / types | ruff · mypy (strict on core) |
Use Cases
Appointment Confirmation Agent
Problem
A clinic loses 20–30% of its daily schedule to no-shows; reception burns hours calling and messaging to confirm, reschedule and collect deposits, and NOM-024 requires an auditable record of every patient contact.
Solution
Single-purpose agent on the OSS harness: reads the schedule via a Google Calendar connector, sends WhatsApp confirmations 24h out, interprets free-text patient replies ("yes", "move to Tuesday", "cancel"), reschedules through the same tool and logs every event into the NOM-024-compliant audit trail. Runs on Python 3.12, MIT, in the clinic's cloud.
"Where Is My Order?" Agent
Problem
60–70% of a mid-size e-commerce's support tickets are "where is my order?". Each one costs 3–5 agent-minutes across OMS + carrier portal + CRM, and during Buen Fin the SLA slips and PROFECO complaints start landing.
Solution
Agent on the harness: registers the client's OMS, the carrier API and the channel webhook (WhatsApp / web) as tools, recognizes the order number in the message, pulls the status, drafts a reply with a real ETA and — if the order is late past a defined threshold — escalates to a human with the context already packed. All inside the base template, no queues, no agent teams.
Expense & CFDI Intake Agent
Problem
A 20–80-person firm or consultancy burns 8–12 hours/month on admin capturing expenses: the consultant sends receipt + XML on WhatsApp, someone else classifies them, validates the issuer RFC against SAT and uploads them to the ERP. Monthly closes slip and expired CFDIs go unclaimed.
Solution
Agent on the harness: receives the XML/PDF on WhatsApp or email, parses the CFDI 4.0, validates issuer RFC status against SAT's web service, classifies the expense against the client's catalog, pushes it to the ERP via a tool call and replies to the consultant with the journal reference. One agent, one tool registry, one deploy — the base template.
KYC Intake Agent for Onboarding
Problem
A neobank or Sofipo loses 30–50% of applicants in onboarding: the flow asks for INE, proof of address and a selfie, but half of submissions come in blurry, with an expired INE, or the name doesn't match the credit bureau — and each silent rejection loses the prospect. CNBV also requires a full record of every attempt, approved or not.
Solution
Agent on the harness: chats with the applicant on WhatsApp or web, runs OCR on the INE, verifies validity and face-match against the selfie (ML models registered as tools), cross-references the name against the credit bureau via API and picks one of three — approve, request a specific missing document, or escalate to a human analyst — with the decision package and CNBV-explainable reason already packed.
Ready to implement this architecture?
Let's discuss how to adapt this blueprint to your business case.
Schedule consultation