[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"project-80258":3},{"id":4,"name":5,"fullName":6,"owner":7,"repo":5,"description":8,"homepage":8,"htmlUrl":8,"language":9,"languages":8,"totalLinesOfCode":8,"stars":10,"forks":11,"watchers":12,"openIssues":13,"contributorsCount":13,"subscribersCount":13,"size":13,"stars1d":13,"stars7d":13,"stars30d":14,"stars90d":13,"forks30d":13,"starsTrendScore":13,"compositeScore":15,"rankGlobal":8,"rankLanguage":8,"license":16,"archived":17,"fork":17,"defaultBranch":18,"hasWiki":19,"hasPages":17,"topics":20,"createdAt":8,"pushedAt":8,"updatedAt":21,"readmeContent":22,"aiSummary":23,"trendingCount":13,"starSnapshotCount":13,"syncStatus":24,"lastSyncTime":25,"discoverSource":26},80258,"purrfect-agent","Pieverse-Eng\u002Fpurrfect-agent","Pieverse-Eng",null,"TypeScript",40,27,1,0,25,43.84,"MIT License",false,"main",true,[],"2026-06-12 04:01:27","# 🐱 Purr-Fect Agent\n\n**The TypeScript agent harness we use inside Pieverse — now open source.**\n\n60 seconds from clone to an agent with:\n\n- a wallet (provisioned via Purr-Fect Claws)\n- **142 onchain skills** out of the box (Binance, OKX, PancakeSwap, OpenSea, BNB Chain, Mantle, Morph L2, Kaia, x402, Pieverse-A2A, and 130 more)\n- surfaces for your terminal, your editor (ACP), and every chat app you live in (Slack, Discord, Telegram, LINE, webhooks)\n\nMIT. TypeScript. ~1150 tests.\n\n> Status: **alpha (v0.1)**. APIs and storage formats may change.\n\n---\n\n## Part of the Pieverse stack\n\nPurr-Fect Agent is one open layer of three:\n\n| Layer | What | Status |\n|---|---|---|\n| 🛰 **Pieverse AI Gateway** | OpenAI-compatible model routing for any LLM | Shipped |\n| ☁️ **Purr-Fect Claws** | Cloud agent runtime — runs Hermes + OpenClaw today; Purr-Fect Agent next | Shipped |\n| 🐱 **Purr-Fect Agent** (this repo) | The open-source agent harness | Alpha |\n\nEach layer is optionality, not lock-in — pick your model, pick your harness,\npick your surface. Purr-Fect Agent talks to the Pieverse Gateway by default\nbut works against any OpenAI-compatible or Anthropic provider.\n\n## Why\n\nMost agent harnesses ship generic — you bring your own tools, your own\nwallet, your own integrations. Purr-Fect ships **batteries-included for the\nonchain stack**: one `purrfect setup` and you have an agent that knows the\nexchanges, chains, and protocols you actually use.\n\n- **Onchain skill commons** — 142 curated skills covering CEXs (Binance,\n  OKX, Gate, Kraken, Bitget), DEXs (PancakeSwap, Aster, DFlow), L1\u002FL2 chains\n  (BNB, Mantle, Morph L2, Kaia), NFT marketplaces (OpenSea), intelligence\n  (BlockBeats, PANews, RootData), and A2A payment protocols (x402,\n  Pieverse-A2A). Maintained at\n  [Pieverse-Eng\u002Fpurrfect-skills](https:\u002F\u002Fgithub.com\u002FPieverse-Eng\u002Fpurrfect-skills).\n- **Agent wallet** — `purrfect setup` (with Y default) registers an agent\n  identity on Purr-Fect Claws and stores the wallet in `~\u002F.purrfect\u002Fagent.env`.\n  Required for onchain WRITE skills (signing, swaps, sends); read-only skills\n  work without it.\n- **Multi-surface** — same agent core runs in terminal, editor, and chat\n  apps. Build once, deploy anywhere a user can reach it.\n- **Self-learning** — memory + runtime skill authoring so the next session\n  doesn't restart from scratch.\n\nTranslation: open it, run `setup`, and you have a working agent for the\nonchain economy. Iterate from there.\n\n## Install\n\n```bash\ngit clone https:\u002F\u002Fgithub.com\u002FPieverse-Eng\u002Fpurrfect-agent\ncd purrfect-agent\nnpm install\nnpm run build\nnode dist\u002Fcli\u002Findex.js setup     # interactive first-run setup\n```\n\nRequires Node ≥ 20 and a C++ toolchain for `better-sqlite3` on platforms\nwithout a prebuilt binary.\n\n## 60-second quickstart\n\n```bash\npurrfect setup           # config + install onchain skills + onboard agent wallet\npurrfect doctor          # verify the install\npurrfect \"what's in this repo?\"   # one-shot prompt\npurrfect                 # interactive REPL\n```\n\n`setup` does three things in one flow:\n\n1. Writes your LLM config (`~\u002F.purrfect\u002Fconfig.json`).\n2. Installs the Pieverse onchain skill commons (Binance, OKX, PancakeSwap,\n   OpenSea, BNB Chain, x402, and ~25 more — see `purrfect skills` after).\n3. Onboards an agent wallet via Purr-Fect Claws (`~\u002F.purrfect\u002Fagent.env`).\n   Y is the default — required for onchain WRITE skills (signing, swaps,\n   sends). Decline if you only need read-only onchain skills, or skip and\n   onboard later via `purrfect onboard`.\n\nIf any step fails because of no network, the others still complete. Re-run\nthe missing step manually:\n\n```bash\npurrfect skills install --all     # finish the skill install\npurrfect onboard                  # finish the wallet onboard\n```\n\nBy default, `setup` points at the Pieverse AI Gateway\n(`https:\u002F\u002Fai.pieverse.io\u002Fv1`). Swap to any OpenAI-compatible endpoint or\nnative Anthropic by editing `~\u002F.purrfect\u002Fconfig.json`.\n\n## The five surfaces\n\nOne core, five front doors.\n\n### 1. Terminal\n\n```bash\npurrfect                 # REPL\npurrfect --plan          # REPL in read-only planning mode\npurrfect \"\u003Cprompt>\"      # one-shot\npurrfect sessions browse # pick a past session to resume\n```\n\n### 2. Editor (ACP)\n\nACP-compatible editors (Zed, and others) launch Purr-Fect over stdin\u002Fstdout:\n\n```bash\npurrfect acp\n```\n\nJSON-RPC frames go to stdout; logs to stderr.\n\n### 3. Chat apps (Gateway)\n\nOne gateway, five adapters. Drop tokens into `gateway.yaml` or env vars and\nstart it:\n\n```bash\npurrfect gateway start\npurrfect gateway status\n```\n\nAdapters:\n\n- **Slack** (Bolt-style events)\n- **Discord** (discord.js)\n- **Telegram** (grammy)\n- **LINE** (@line\u002Fbot-sdk)\n- **Webhook** (HMAC-signed delivery)\n\nMulti-user gateways ship with a built-in ACL — pair specific external users\nto internal identities:\n\n```bash\npurrfect pairing add slack U01234 alice\npurrfect pairing list\n```\n\n### 4. HTTP API\n\n```bash\npurrfect serve --port 8080\n# POST \u002Fchat, POST \u002Fchat\u002Fstream, GET \u002Fsessions\n```\n\n### 5. Background tasks & schedules\n\n```bash\npurrfect cron create \"0 9 * * MON\" \"summarize last week's commits\"\npurrfect tasks list\n```\n\n## Self-learning, concretely\n\n### Memory\n\nThe agent calls a `memory` tool to persist tagged entries to `MEMORY.md` \u002F\n`USER.md`. Entries are injected into the next session's prompt automatically.\n\n```bash\npurrfect memory list\npurrfect memory add prefers-tabs \"user prefers tabs over spaces in TS files\"\npurrfect memory remove prefers-tabs\n```\n\nBackends are pluggable (local markdown today, HTTP for shared\u002Fteam memory).\nAll writes are scanned for prompt-injection patterns before they hit disk.\n\n### Skills\n\nA skill is a markdown file with YAML frontmatter (`name`, `description`,\n`triggers`) and an instruction body. The agent can manage skills at runtime\nvia the `skill_manage` tool, and you can manage them from the CLI:\n\n```bash\npurrfect skills list                 # what's installed\npurrfect skills install --all        # install every skill in every tap\npurrfect skills install \u003Cname>       # install one\npurrfect skills tap add \u003Cname> \u003Curl> # register a new skill source\npurrfect skills audit                # check installed-vs-source integrity\n```\n\nThe Pieverse onchain skill commons (`Pieverse-Eng\u002Fpurrfect-skills`) is\nregistered as the default tap and installed automatically by `purrfect setup`.\nRemove it with `purrfect skills tap remove pieverse` if you want a clean\nslate.\n\nSkill precedence: workspace → project → personal → managed → bundled.\n\n## Multi-identity profiles\n\nOne install can host several isolated agents — each with its own memory,\nsessions, skills, and gateway channels:\n\n```bash\npurrfect profile create work\npurrfect --profile work \"draft the standup post\"\npurrfect profile list\n```\n\n## Architecture in 60 seconds\n\n```\nAgentLoop  ← the engine\n  ├── Provider           (Anthropic native or OpenAI-compat HTTP)\n  ├── ToolRegistry       (built-in + MCP + plugin tools)\n  ├── PromptBuilder      (identity + context files + memory + skills)\n  ├── SessionStore       (SQLite + FTS5)\n  ├── ContextCompressor  (trajectory + structured summary)\n  ├── PermissionModel    (allow\u002Fdeny + dangerous-command guards)\n  └── SkillRegistry      (layered markdown skills hub)\n```\n\nThe core is a library (`.\u002Fdist\u002Fcore\u002Findex.js`). The CLI, ACP server, HTTP\nserver, and gateway are all thin consumers of the same engine.\n\n## Configuration\n\nConfig lives at `~\u002F.purrfect\u002Fconfig.json` (or `$PURRFECT_CONFIG_DIR`). Run\n`purrfect setup` to generate it interactively, or hand-edit. Per-profile\nconfigs live at `~\u002F.purrfect\u002Fprofiles\u002F\u003Cname>\u002F`.\n\nSensitive values can be referenced as env vars:\n\n```json\n{ \"apiKey\": { \"env\": \"ANTHROPIC_API_KEY\" } }\n```\n\n## Extensibility\n\n- **MCP** — stdio MCP servers register tools alongside built-ins\n  (`purrfect mcp add \u003Cname> --command \u003Ccmd>`).\n- **Plugins** — manifest-first discovery; plugins register tools, hooks, and\n  capabilities.\n- **User hooks** — shell commands fired on `preToolUse` \u002F `postToolUse` \u002F\n  `stop` (`purrfect hooks add ...`).\n\n## Development\n\n```bash\nnpm test            # vitest, ~1130 unit\u002Fintegration tests (no network)\nnpm run smoke       # real-LLM wire-format checks (auto-skips without an API key)\nnpx tsc --noEmit    # type-check\nnpm run build       # tsc + chmod +x dist\u002Fcli\u002Findex.js\n```\n\nTests mirror `src\u002F` paths under `test\u002F`. The default suite is hermetic — all\nprovider calls go through a queue-based fetch mock. The smoke suite under\n`test\u002Fsmoke\u002F` hits a real LLM endpoint to validate the wire format and runs\nonly when `ANTHROPIC_API_KEY` or `OPENAI_API_KEY` is set (picks the cheapest\nmodel on each provider; well under $0.01 per full run).\n\n## What's next\n\nThis is the harness layer. Purr-Fect Claws (managed cloud) and the Pieverse\nAI Gateway sit beside it. Together they form what we believe an open A2A stack\nshould look like: any model, any harness, your choice. More open contributions\nto follow as we go.\n\n## License\n\nMIT — see [LICENSE](LICENSE).\n","Purr-Fect Agent 是一个用 TypeScript 编写的开源代理框架，旨在为区块链经济提供一站式的自动化解决方案。该项目预装了142种链上技能，涵盖主流交易所、链和协议，如Binance、OKX、PancakeSwap等，并通过Purr-Fect Claws配置了一个钱包功能，支持终端、编辑器及多种聊天应用（Slack, Discord, Telegram, LINE）的接入。它特别适合需要快速构建具有丰富链上操作能力代理的应用场景，比如去中心化金融项目开发或个人资产管理工具。此外，Purr-Fect Agent还具备自我学习的能力，能够记忆并积累经验以优化后续任务执行效率。",2,"2026-06-11 03:59:51","CREATED_QUERY"]