mingde.ai
№ 01SiNan · Enterprise AI Gateway

Enterprise AI Agents
you can govern.
Inside Feishu.

SiNan is an enterprise-grade AI Agent gateway. It opens a chat entry inside Feishu / DingTalk / WeCom for your employees, connects to your internal knowledge base and data sources, and bakes governance — audit, quota, policy, multi-tenancy — into every call. We don't rewrite the agent — instead it's pluggable, so Hermes, OpenClaw and other open-source agents can run as the core interchangeably.

Live in production · Whole workforce in a week · 2746 automated tests

№ 02Why You Need SiNan

Handing employees raw ChatGPT
is the CIO's most expensive compromise.

Most AI Agent products solve the easy part — making it talk. The harder enterprise question is: who is allowed to talk, what did they say, what did it cost, and can the answer be trusted? SiNan answers all four.

PAIN 01

Employee chats leave the building

Free-tier ChatGPT and Claude train on the conversations. Customer lists, contract values, internal source code that an employee pastes in — they all end up in someone else's training set.

PAIN 02

Foreign services don't work in China

OpenAI doesn't sell to China. Anthropic doesn't sell to China. The gateways that do exist either carry compliance risk, have unpredictable latency, or have no Feishu / DingTalk integration at all.

PAIN 03

Audit trail is essentially zero

When something goes wrong, the CIO has to answer 'who, when, what data, what query'. SaaS export tools are too thin to satisfy a regulator.

PAIN 04

Token cost is uncontrolled

Without per-user quotas, a single employee can burn a department's monthly budget in 24 hours. LLM bills have no tiers; the end of the month is a surprise.

№ 03What SiNan Is

Sidecar pattern —
augment, don't rewrite.

SiNan does not build a new agent loop. It uses pluggable open-source agents as the core — Hermes, OpenClaw and others can be swapped in without touching the governance layer — and wraps them with enterprise governance, Chinese IM ingress, and a self-learning Skill library. Same code, your servers.

HEADLINE 01

28+

Self-Learning Skills

Query, analysis, generation, and SQL — four categories out of the box. The system learns your workflows and generates new Skills automatically — it gets sharper the more you use it.

HEADLINE 02

2746

Automated Tests

Full coverage across Phase 0–3. Every commit runs the whole suite; zero failures gates the merge. This is the hard definition of 'enterprise grade'.

HEADLINE 03

6

Native IM Channels

Feishu (full API: send / stream / upload / download / cards), DingTalk, WeCom, web, REST, and custom webhooks. Employees keep their existing tools.

№ 04Technical Architecture

Five sidecar layers,
agent becomes enterprise service.

SiNan turns one employee message into an 11-step observable, auditable, interruptible request flow. Every layer is independently replaceable — swap IM, LLM, database, or KMS without touching business code.

LAYER 01

IM Ingress

FeishuAdapter / DingTalkAdapter / WeComAdapter — webhook parsing, signature verification, attachment download, card rendering

gateway_extensions/

LAYER 02

Governance

AuditLogger (SHA256 hash chain) / QuotaManager (4-tier + Redis sliding window) / PolicyEngine / SSO / RBAC

governance/

LAYER 03

Agent Engine

Pluggable agent core — Hermes, OpenClaw and other open-source agents plug in via JSON-RPC adapters. MockClient for local dev.

adapters/

LAYER 04

Skills & Knowledge

28 self-learning Skills (system auto-generates new skills) + pgvector knowledge base (Feishu wiki / drive direct + live ACL) + Skill marketplace (sandbox review)

skills/ + knowledge/

LAYER 05

Persistence

Postgres + RLS (SET LOCAL ROLE sinan_app forces isolation) + AES-256-GCM envelope encryption + S3 files + Redis quotas

persistence/ + delivery/

Every layer has its own health check and fallback path. One layer failing does not collapse the whole chain.

№ 05Six Core Capabilities

Six ready-to-deploy subsystems
covering every hard enterprise agent need.

01

Native IM Ingress

Employees do not switch tools. They @ SiNan inside Feishu and get a card message back with download buttons (Excel / Word / PPT / PDF).

Full Feishu API: send / stream / upload / download / interactive cards
DingTalk two-hop attachment download, WeCom template_card
Whitelist + Feishu OIDC SSO + organization sync
Native multimodal injection: image / audio / document
02

Knowledge · Direct Feishu

Whole-tenant scan of Feishu wiki and drive; document changes flow back within 60 seconds. Permissions are checked live against Feishu ACL on every query (5-min cache). No mirroring, no stale grants.

ReadOnlyHTTPClient hard whitelist — prompts cannot rewrite source docs
pgvector + tsvector hybrid retrieval (RRF fusion)
GLM / Qwen / OpenAI embeddings + n-gram fallback
OCR safety net (pdftoppm + tesseract chi_sim)
03

28 Self-Learning Skills

Query, analysis, generation, and SQL — four categories out of the box. The system learns from your business and generates new Skills automatically — the more you use it, the sharper it gets. SHA256 content cache, cross-process quota, audit callback all built in.

Query: CRM / ERP / HR / master data / marketing / AR
Analysis: trend / variance / concentration / RFM
Generate: Excel / Word / PPT / PDF (CJK fonts)
SQL: read-only + role view rewrite + column mask
04

Per-tenant Key Isolation

Each tenant's API keys are AES-256-GCM envelope-encrypted in Postgres. KEK comes from OpenBao or an HSM. Dashboard CRUD with test-before-save validation.

11-page Editorial v2 secrets dashboard
GLM / Qwen / Gemini / Feishu credential testers
KEK rotation + HSMKEKProvider Protocol
SoC2 audit CSV export (credential.* events)
05

Multi-tenant Physical Isolation

Physical Postgres database isolation + RLS (SET LOCAL ROLE sinan_app forced) + container-level isolation. New tenants spin up with one click; Feishu org sync auto-discovers members.

tenant_connection auto-injects SET LOCAL
init-sinan-app-role.sh creates the role on first boot
WITH CHECK blocks cross-tenant INSERT / UPDATE
Tenant control panel + Feishu org sync wizard
06

Audit · Quota · Policy

SHA256 hash-chain audit is write-once. Four-tier quota (ORG > CUSTOMER > TEAM > VK) with cluster-safe Redis sliding window. Policy engine gates field-level sensitive actions.

X-Request-Id end-to-end tracing + JSON structured logs
Prometheus counters + 6-panel Grafana board
Policy: deny / require_confirmation / risk_gating
AlertManager → Feishu / Slack / PagerDuty webhooks
№ 06Enterprise Security

Secure by default,
not by ops discipline.

Every security decision in SiNan is enforced fail-closed in code, not as a 'be careful' note in a runbook. Every boundary has a hard constraint with integration tests.

DEFENSE 01

Data Stays Inside

SiNan deploys entirely on your own servers. Feishu / DingTalk content is carried by your own Feishu account. Embedding and LLM API keys are yours.

DEFENSE 02

Permissions Stay Live, Not Mirrored

Document permissions are not copied into Postgres. Every query confirms with Feishu in real time whether the current user is still allowed to see the document (5-min cache). Departures and revocations take effect immediately.

DEFENSE 03

Envelope Encryption + KEK Rotation

tenant_api_keys table: each secret has its own DEK, the DEK is wrapped by a KEK, and the KEK comes from OpenBao or an HSM. AAD binds (tenant_id, slot); cross-tenant row copy fails to decrypt.

DEFENSE 04

Tamper-Evident Audit Chain

Every audit event contains the SHA256 of the previous one. Any tamper breaks the chain. WORM storage + async flush as belt-and-suspenders.

№ 07Why SiNan

Why not
build it yourself?

We spent six months getting Phase 0–3 done. Below is the cost of not picking SiNan.

vs Build

Save 6+ months

SiNan today is 221 source files, 2746 tests, and 30+ subsystem docs. Six months is the floor — most in-house projects stall at 'demoable but not production-safe'.

vs SaaS Gateways

Data does not leave

Most AI Agent SaaS products store conversations in their own database. SiNan runs on your servers; the KEK and database credentials are in your hands.

vs Foreign Stacks

China-compliant + IM-native

OpenAI and Anthropic do not sell to China. LangChain and LlamaIndex have no Feishu / DingTalk adapter, no RLS, no OIDC, no audit chain.

vs Thin Wrappers

Three layers of defense

Audit, quota, and policy are not decorative features. When regulators want logs, when the CFO wants a spend breakdown, when product wants conversation replay — SiNan answers all three on day one.

№ 08Next Step

Deploy SiNan
into your Feishu.

SiNan is live in production — put your whole workforce on AI within a week. From key configuration and Feishu integration to full rollout, we walk it with you end-to-end, including instrumentation, quota tuning, and custom Skill development.

First conversation is free · 1 hour · includes a technical architecture walkthrough