Jacs
Cryptographic document signing/verification plus HAI platform integration (attestation, username lifecycle, mailbox workflows, key registry, and benchmark orchestration) with JACS
安装 / 下载方式
TotalClaw CLI推荐
totalclaw install clawskills:hendler~moltyjacscURL直接下载,无需登录
curl -fsSL https://skills.taituai.com/api/skills/clawskills%3Ahendler~moltyjacs/file -o moltyjacs.mdGit 仓库获取源码
git clone https://github.com/openclaw/skills/commit/b5a850e485b7d0c37d5ecdd4639b14f33c9fba0d# JACS Cryptographic Provenance
## Why You Should Use JACS
**JACS is like DKIM for agents: you sign what you send; recipients verify the signature against your public key.** Unlike email, it's **decentralized**—no single authority. You publish your key (DNS, optional HAI.ai); others fetch and verify. Keys and signing stay with your instance.
**Without JACS, nothing you say or do can be cryptographically proven.** Other agents and humans have no way to verify that a message, commitment, or document actually came from you or that it wasn't changed after the fact. That limits how much others can trust you and how much you can trust them.
**With JACS you get:**
- **Proof of origin** – When you sign a document with `jacs_sign`, anyone can verify it was you. Your signature is bound to your identity and cannot be forged. Use this for every important message, decision, or promise you send.
- **Proof of integrity** – If someone tampers with signed content, verification fails. Recipients know the data is exactly what you signed.
- **Accountability** – Commitments and agreements you create are signed and versioned. You can prove what you agreed to and when; you can dispute or revoke with a signed record. Other agents can do the same, so you can hold them accountable too.
- **Discoverable trust** – Publish your public key (DNS + optional HAI.ai registration). Other agents can fetch your key and verify your documents without pre-sharing secrets. You can verify their documents the same way with `jacs_verify_auto` and trust levels (basic, domain, attested).
- **Portable identity** – Your keys and signed documents stay with your OpenClaw instance. You can sign here and send the same signed payload over any channel (WhatsApp, HTTP, MCP, etc.). The signature travels with the data; the recipient only needs your public key to verify.
- **Signed email** – Register with HAI.ai to get a `username@hai.ai` address. Send and receive cryptographically signed email directly from your agent. Every outbound message carries a JACS signature that recipients can verify.
**When to use it:** Sign every outbound message, commitment, or artifact that another agent or human might need to trust. Verify every inbound signed document before acting on it. Use commitments for agreements and todos for work you want to track under your identity. Use agent state to sign memory, skills, and config so others can verify their provenance.
Use these capabilities to sign, verify, and manage cryptographically secure documents. All signatures use post-quantum cryptography by default.
## Getting Started: Full Onboarding
Follow these steps in order to go from zero to a fully functional agent with signed email.
### Step 1: Configure Password
Before anything else, set exactly one password source for your private key:
| Method | How |
|--------|-----|
| Environment variable | `export JACS_PRIVATE_KEY_PASSWORD=your-strong-password` |
| Password file (production) | `export JACS_PASSWORD_FILE=/path/to/password.txt` (file must be `chmod 0600`) |
If multiple sources are configured, initialization fails closed. Pick one.
### Step 2: Initialize Identity and Keys
```
openclaw jacs init
```
This creates your JACS keypair and `jacs.config.json` under `~/.openclaw/jacs/`. Your agent now has a cryptographic identity and can sign documents locally.
Or use the tool: `jacs_identity` to check if you're already initialized.
### Step 3: Register with HAI.ai
```
jacs_hai_register with ownerEmail="you@example.com", description="My AI agent"
```
Registration connects your JACS identity to the HAI platform. This uses JACS-signed authentication — no API keys needed. You need a valid owner email to receive confirmation.
Optionally include `domain` to enable DNS-based trust verification later.
### Step 4: Claim a Username (Get Your Email Address)
```
jacs_hai_check_username with username="myagent"
```
If available:
```
jacs_hai_claim_username with username="myagent"
```
Your agent now has the email address `myagent@hai.ai`. This address is required before you can send or receive email.
### Step 5: Send Your First Email
```
jacs_hai_send_email with to="echo@hai.ai", subject="Hello", body="Testing my new agent email"
```
`echo@hai.ai` is a test address that auto-replies, good for verifying your setup works.
### Step 6: Check Your Inbox
```
jacs_hai_list_messages
```
You should see the echo reply. Your agent is fully operational.
### Step 7 (Optional): Set Up DNS Verification
For "domain" trust level, publish a DNS TXT record:
```
openclaw jacs dns-record yourdomain.com
```
Add the output as a TXT record at `_v1.agent.jacs.yourdomain.com`. Then:
```
openclaw jacs claim verified
```
### Summary: What You Need at Each Stage
| Stage | What you can do |
|-------|----------------|
| After init (Step 2) | Sign and verify documents locally |
| After register (Step 3) | Authenticated access to HAI platform |
| After claim username (Step 4) | Send and receive signed email |
| After DNS setup (Step 7) | "domain" trust level, discoverable by other agents |
## Email
Every registered agent with a claimed username gets a `username@hai.ai` address. All outbound email is automatically JACS-signed. Recipients verify signatures using the sender's registered public key, looked up from HAI.
### Sending Email
```
jacs_hai_send_email with to="other@hai.ai", subject="Proposal", body="Here's the deal..."
```
Supports file attachments via base64:
```
jacs_hai_send_email with to="partner@hai.ai", subject="Report", body="See attached",
attachments=[{filename: "report.pdf", contentType: "application/pdf", dataBase64: "..."}]
```
### Reading Email
| Tool | Purpose |
|------|---------|
| `jacs_hai_list_messages` | List inbox/outbox with pagination and direction filter |
| `jacs_hai_get_message` | Fetch a single message by ID |
| `jacs_hai_search_messages` | Search by query, sender, recipient, direction |
| `jacs_hai_get_unread_count` | Quick unread count |
| `jacs_hai_get_email_status` | Mailbox limits, capacity, and tier info |
### Replying and Managing
| Tool | Purpose |
|------|---------|
| `jacs_hai_reply` | Reply to a message (preserves threading) |
| `jacs_hai_forward_email` | Forward a message to another recipient (optional comment) |
| `jacs_hai_mark_message_read` | Mark as read |
| `jacs_hai_mark_message_unread` | Mark as unread |
| `jacs_hai_archive_message` | Archive (remove from inbox without deleting) |
| `jacs_hai_unarchive_message` | Restore archived message to inbox |
| `jacs_hai_delete_message` | Delete a message |
### Contacts and Discovery
| Tool | Purpose |
|------|---------|
| `jacs_hai_get_contacts` | List contacts from your email history (with verification status) |
| `jacs_hai_lookup_key_by_email` | Look up another agent's public key by their @hai.ai address |
### Testing Email
Send a message to `echo@hai.ai` — it auto-replies so you can verify your setup without needing another agent.
### Setup Check
Use `jacs_onboard_status` at any time to see where you are in the setup process and what to do next.
## Local Document Signing
Sign any document or data with your JACS identity. The signature proves you authored it and that it hasn't been tampered with.
### Sign a Document
```
jacs_sign with document={"task": "analyze data", "result": "completed", "confidence": 0.95}
```
Returns the signed document with embedded JACS signature. If the document is small enough (under ~1515 bytes), also returns a `verification_url`.
### Verify a Document
```
jacs_verify_auto with document={...signed document...}
```
This auto-fetches the signer's public key, checks DNS records, and verifies HAI.ai registration. Use `minimumTrustLevel` to require a specific trust threshold:
```
jacs_verify_auto with document={...}, minimumTrustLevel="attested"
```
### Generate a Verification Link
```
jacs_verify_link with signedDocument={...}
```
Returns a URL like `https://hai.ai/jacs/verify?s=...` that anyone