Context7
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
คำอธิบายจากผู้ทำ (ภาษาอังกฤษตามต้นฉบับ)
AI governance MCP server — policy enforcement, skills, memory, multi-LLM consensus
สามเรื่องนี้ไม่รวมเป็นคะแนนเดียว เพราะความเห็น การวัด และความนิยม เป็นคนละเรื่องกัน
ตัวนี้ยังไม่ได้เรียบเรียงเป็นภาษาไทย ด้านล่างคือข้อเท็จจริงที่เราอ่านจาก registry
เลือกโปรแกรม AI ที่คุณใช้ แล้วคัดลอกค่าตั้งไปวาง
AGENCE_ROOTต้องเตรียมก่อน
คุณใช้แอปไหน
เลือกแอปด้านบน เราจำไว้ให้ ครั้งหน้าปุ่มจะขึ้นว่า “ติดตั้งลง …”
เปิด Claude Desktop → Settings → Developer → Edit Config แล้ววางค่านี้ในไฟล์ claude_desktop_config.json
{
"mcpServers": {
"agence": {
"command": "npx",
"args": [
"-y",
"@l-agence/mcp-server-agence"
],
"env": {
"AGENCE_ROOT": "ใส่ค่าของคุณ"
}
}
}
}พิมพ์คำสั่งนี้ใน Terminal
claude mcp add agence --env AGENCE_ROOT='ใส่ค่าของคุณ' -- npx -y @l-agence/mcp-server-agenceเติมค่าที่เว้นว่างไว้ก่อนรัน
วางในไฟล์ .cursor/mcp.json ของโปรเจกต์ หรือ ~/.cursor/mcp.json
{
"mcpServers": {
"agence": {
"command": "npx",
"args": [
"-y",
"@l-agence/mcp-server-agence"
],
"env": {
"AGENCE_ROOT": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
วางในไฟล์ .vscode/mcp.json ของโปรเจกต์
{
"servers": {
"agence": {
"type": "stdio",
"command": "npx",
"args": [
"-y",
"@l-agence/mcp-server-agence"
],
"env": {
"AGENCE_ROOT": "ใส่ค่าของคุณ"
}
}
}
}เบราว์เซอร์จะถามก่อนเปิดแอป จากนั้นแอปแสดงค่าตั้งให้ตรวจแล้วกดยืนยัน ช่อง key เว้นว่างไว้ให้คุณใส่เอง
ตัวนี้รันในเครื่องคุณ แต่ ChatGPT ต่อได้เฉพาะ server บนอินเทอร์เน็ต ลองเลือกแอปอื่น
ตัวเลือกเก็บในคุกกี้บนเครื่องนี้ ไม่ต้องมีบัญชี
AGENCE_ROOT envค่าตั้งนี้สร้างจากข้อมูลใน registry ของผู้ทำ ถ้าไม่ตรงกับ README ให้เชื่อ README
รันในเครื่องคุณ รายการเครื่องมือจะขึ้นในแอป AI หลังติดตั้ง
เราตรวจจากข้อมูลที่ใครก็เปิดดูได้ ยังไม่ได้อ่านโค้ด ข้อที่ไม่เกี่ยวกับตัวนี้ไม่นับในตัวหาร · ตรวจเมื่อ 7 พ.ย. 2569
ชื่อใน registry ยืนยันด้วยบัญชี GitHub l-agence ซึ่งเป็นเจ้าของ repo
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ยังไม่ได้อ่านข้อมูล repo จาก GitHub
ตัวนี้รันบนเครื่องคุณ ไม่มี endpoint บนอินเทอร์เน็ต
ตัวนี้รันบนเครื่อง ใช้ค่าที่ตั้งในเครื่องแทน
รันในเครื่องคุณ เราอ่านรายการเครื่องมือได้เฉพาะตัวที่มี endpoint บนอินเทอร์เน็ต
เทียบกับทุก server ที่ยังใช้งานในหมวดนี้ทั้งทะเบียน ดาวนับเฉพาะเมื่อผู้ลงทะเบียนเป็นเจ้าของ repo
จากการตรวจเบื้องต้นของเรา ผ่าน 1 จาก 1 ข้อที่ตรวจได้ เรายังไม่ได้อ่านโค้ด ก่อนใส่กุญแจหรือ token ให้ดูว่า server ขอสิทธิ์อะไร และเลือกกุญแจที่ทำได้เท่าที่จำเป็น
registry ไม่ได้ระบุว่าต้องใช้กุญแจ แต่บางตัวจะขอให้ล็อกอินตอนใช้ครั้งแรก
รันบนเครื่องของคุณ โปรแกรม AI จะเปิด server ขึ้นมาเองเมื่อใช้ ข้อมูลไม่ต้องผ่านเซิร์ฟเวอร์ของผู้ทำ (ยกเว้นตัวที่ไปเรียกบริการออนไลน์ต่อ)
repo บน GitHub มีการแก้โค้ดล่าสุด – และส่งรุ่นล่าสุด (1.0.0) เข้า registry 6 เดือนที่ผ่านมา
โปรแกรมที่รองรับ MCP เช่น Claude Desktop, Claude Code, Cursor และ VS Code ตัวนี้ต้องมี Node.js ในเครื่องด้วย
ในหมวดเดียวกันมี Context7, Codebase Memory, Exa
server หมวดเดียวกันจากผู้ทำคนอื่น เรียงตามดาว
อ่านการ์ด:★ ดาว GitHubiสามเสา: รีวิว · ผลตรวจ · การใช้งานiอัปเดต = วันที่ส่งรุ่นล่าสุดเข้า registryi
ส่งคู่มือการใช้ไลบรารีและเฟรมเวิร์กรุ่นล่าสุดให้ AI อ่านก่อนตอบ ช่วยให้โค้ดที่ AI เขียนไม่ใช้คำสั่งเก่าที่เลิกใช้แล้ว
Codebase knowledge graph for AI agents — 162 languages, sub-ms queries, 99% fewer tokens.
Connect AI agents to Exa for web search, content fetching, and multi-step research.
ส่วนนี้คัดจาก repo ของผู้ทำตามต้นฉบับ PopNx MCP ไม่ได้ตรวจหรือรับรองเนื้อหา ตัด HTML รูปภาพ และสคริปต์ออกแล้ว ลิงก์จะพาออกนอกเว็บ
Author: Stephane Korning · 2026 · MIT + Commons Clause Version: v1.0.0 · May 2026
The governance layer for AI coding agents.
Every agent action classified, gated, and cryptographically logged — regardless of which LLM or tool runs it.
Your AI coding agents can write code. They can commit, push, delete, refactor.
But who's watching them?
Claude Code has no audit trail. Aider trusts the user. Codex sandboxes everything and hopes for the best. LangChain gives you building blocks but no guardrails.
Agence exists because advisory guardrails aren't guardrails at all. It's the layer that sits between any AI agent and your filesystem and says *"not without approval."*
Agence is an agent-agnostic governance stack for software engineering. It doesn't replace your coding agent — it governs, orchestrates, and audits all of them from a single control plane.
Command Gating — Every shell command is classified before execution:
| Tier | Gate | Example |
|---|---|---|
| T0 | Auto-execute | git status, ls, cat |
| T1 | Logged | git add, git commit |
| T2 | Human approval required | git push, git reset |
| T3 | Blocked | rm -rf, chmod 777, kill |
Unknown commands default to T2. Not T0. Fail-closed. The guard runs as a separate process — agents cannot bypass their own policy.
Cryptographic Audit — Every agent decision is logged to a Merkle-chained, append-only ledger. Each entry links to the previous via SHA-256. Tamper with one entry and the chain breaks. Verify with: agence ^ledger verify.
Multi-Agent Orchestration — 18 agents across 4 types (persona, tool, loop, ensemble). Route with @agent syntax. Override models with dot-notation: @ralph.gpt4o. Dispatch to Aider, Claude Code, Copilot, or your own tools — all governed by the same policy.
Peer Consensus — Route any question to 3 independent LLMs and get weighted consensus. Your architecture review shouldn't depend on one model's blind spots.
Session Persistence — Save, resume, and hand off sessions between agents. Full context survives restarts. Automatic tmux capture of stdout/stdin/stderr — no 16KB buffer limits.
Git-Native — No database. No server. State lives in git worktrees and flat files. Knowledge is sharded, gated, and selectively routed — you decide what gets shared.
| 30,701 | Lines of production code (23.9K TypeScript + 6.8K bash) |
| 751 | Tests with 1,768 assertions across 21 files |
| 279 | Security-specific tests (guard + hardening + SEC regressions) |
| 9 | Red-team cycles completed (SEC-008 through SEC-019) |
| 33+ | Orchestration skills (^fix, ^review, ^hack, ^peers, ^vault...) |
| 18 | Registered agents (10 persona, 5 tool, 1 loop, 2 ensemble) |
| 12 | LLM providers (Anthropic, OpenAI, Azure, Google, Mistral, Groq, Ollama...) |
| 10 | MCP tools + 3 MCP resources (Model Context Protocol server) |
| 3 | Dependencies total (MCP SDK, Bun, Zod) |
| 0 | Databases required |
rm -rfAgence governs all of the above.
Gate AI agent commands in any CI workflow — one step, zero infrastructure:
- name: Gate AI command
id: guard uses: l-agence/agence@v1 with: command: 'git push origin main' # command proposed by your AI agent agent: ci fail_on_block: 'true' # fail if T3-blocked
| Input | Description | Default |
|---|---|---|
command | Shell command to classify | required |
policy | Path to custom AIPOLICY.yaml (repo-relative) | bundled policy |
agent | Agent identity for MLS capability checks | ci |
fail_on_block | Exit 1 on T3 (deny) | true |
fail_on_escalate | Exit 1 on T2 (requires approval) | false |
| Output | Values |
|---|---|
tier | T0 · T1 · T2 · T3 |
action | allow · flag · escalate · deny |
reason | Human-readable decision |
rule | Matched policy rule |
See docs/marketplace/description.md for full documentation.
This PR starts with the GitHub Action path first for fast per-repo adoption; the GitHub App listing and webhook server can follow in a later phase or separate PR for org-level rollout across many repositories.
For enterprise adoption, the next layer after the GitHub App is shard onboarding so orgs can separate teams, policies, and knowledge boundaries cleanly instead of forcing one shared shard model.
git submodule add https://github.com/l-agence/agence .agence
git submodule update --init --recursive bash .agence/bin/agence ^init export PATH="$PWD/.agence/bin:$PATH"
git clone https://github.com/l-agence/agence .agence
cd .agence && bun install ./bin/agence ^init export PATH="$PWD/.agence/bin:$PATH"
| Tool | Required | Install |
|---|---|---|
bash 4+ | Yes | Built-in on Linux/macOS/WSL |
git 2.30+ | Yes | sudo apt install git |
bun 1.3+ | Yes | bun.sh |
tmux | For swarm | sudo apt install tmux |
jq | For ledger queries | sudo apt install jq |
Windows: Use WSL (Ubuntu recommended).
# Chat with an agent
agence "How should I structure this feature?"
agence @sonya "Review this auth module"
agence !ralph # Persona: autonomous iteration agence !claude # Tool: Claude Code CLI agence !aider # Tool: aider (code patches)
agence ^save "OAuth2: done token validation, next: refresh flow" agence ^resume agence ^handoff @sonya
agence ^ledger verify # Verify Merkle chain integrity agence ^audit trail # View full decision history
agence @peers "Should we use Redis or Postgres for session storage?"
agence --help
YOUR REPO/
└── .agence/ ← lives here (submodule or clone) ├── bin/ # CLI: agence, aibash, ibash, aido, agentd ├── codex/ # Governance: AIPOLICY.yaml, Laws, Principles, agents/ ├── nexus/ # Local state: .ailedger, sessions, faults (gitignored) ├── knowledge/ # Team knowledge: docs, lessons, plans (committed) │ └── private/ # Private knowledge (gitignored, never shared) ├── organic/ # Swarm coordination: tasks, jobs, workflows └── lib/ # Core: guard.ts, signal.ts, skill.ts, memory.ts, peers.ts
COGNOS — Four pillars:
| Pillar | Purpose | Location |
|---|---|---|
| CODEX | Immutable governance — Laws, Principles, Rules, AIPOLICY | codex/ |
| KNOWLEDGE | Team-shared docs, lessons, plans — selectively routed via @ symlinks | knowledge/ |
| NEXUS | Local operational state — sessions, ledger, signals | nexus/ (gitignored) |
| ORGANIC | Swarm orchestration — tasks, workflows, matrix scheduling | organic/ |
Runtime: Bun + bash. No Python. No pip. No npm install of untrusted packages in the critical path.
MCP: Agence exposes itself as an MCP server (10 tools, 3 resources) so any MCP-compatible client can use agence's governance layer. Agence also acts as an MCP client — consuming tools from external MCP servers. See MCP.md for integration guide.
| Prefix | Mode | Example | Use When |
|---|---|---|---|
| _(none)_ | Chat | agence "explain this error" | Advice, explanation, Q&A |
^ | Knowledge | agence ^save, agence ^lesson | Shared state, knowledge ops |
~ | Private | agence ~note "idea" | Private notes (never committed) |
+ | Autonomous | agence +refactor-auth | Agent plans & executes a task |
/ | Validated | agence /git-status | Pre-approved safe commands |
! | System | agence !ralph, agence !claude | Launch agents or tools |
@ | Route | agence @sonya "review this" | Send to specific agent |
| Agent | Type | Best For |
|---|---|---|
@ralph | Loop | Autonomous iteration with backpressure |
@sonya | Persona | Architecture, code review |
@claudia | Persona | Deep reasoning, critical decisions |
@chad | Persona | DevOps, infra, CI/CD |
@aleph | Persona | Red team, security analysis |
@claude | Tool | Claude Code CLI (headless spawn) |
@aider | Tool | Code patches, git diffs |
@pilot | Tool | GitHub Copilot CLI |
@peers | Ensemble | 3-LLM weighted consensus |
@pair | Ensemble | 2-LLM lightweight consensus |
Override models with dot-notation: @ralph.gpt4o, @sonya.opus, @ralph.aider
Agence uses a 5-tier command policy. The guard runs as a separate process — agents cannot bypass their own policy.
| Tier | Gate | Example |
|---|---|---|
| T0 | Auto-execute | git status, ls, cat |
| T1 | Logged | git add, git commit |
| T2 | Human approval | git push, git reset |
| T3 | Blocked | rm -rf, chmod 777 |
| T4 | Never | Force push main, drop DB |
Unknown commands default to T2. Fail-closed. 120+ rules across git, GitHub CLI, AWS, Terraform, and shell.
All decisions logged to nexus/.ailedger — append-only, Merkle-chained, HMAC-signed.
See SECURITY.md for full security architecture, red-team findings, and disclosure timeline.
agentd start ralph claude aider # Launch 3 agents in tmux
agentd tangent create fix-auth # Isolated worktree + container agentd inject fix-auth "run tests" # Send command via socat socket agentd status # View all agents + tangents
Each tangent gets: isolated git worktree, optional Docker container (--cap-drop ALL, --read-only, --no-new-privileges), socat socket for IPC, tmux pane for observability.
bun test # Full suite
751 tests, 1,768 assertions, 0 failures across 21 files:
| Suite | Tests | Coverage |
|---|---|---|
guard.test.ts | 132 | Command gate, tier escalation, eval safety |
security-hardening.test.ts | 134 | HMAC, signal forgery, injection prevention, SEC-010→019 regressions |
memory.test.ts | 62 | COGNOS 3-store: retain/recall/cache/forget/promote/distill |
peers-dispatch.test.ts | 53 | Peer consensus, mixed routing |
queue.test.ts | 42 | Work queue, dashboard, GitHub Issues bridge |
runs.test.ts | 35 | SWE run lifecycle, aggregation, outcomes |
vault.test.ts | 20 | Hermetic vault init/sync/push/pull + SEC-019 security |
setup.test.ts | 10 | Interactive wizard, escaping, validation |
| mcp-client.test.ts
ตัดมาแค่ช่วงต้น อ่านต่อใน repo