Skip to content

feat: add Beaver Knight action provider - #1455

Open
liander-ai wants to merge 1 commit into
coinbase:mainfrom
liander-ai:beaver-knight-action-provider
Open

feat: add Beaver Knight action provider#1455
liander-ai wants to merge 1 commit into
coinbase:mainfrom
liander-ai:beaver-knight-action-provider

Conversation

@liander-ai

Copy link
Copy Markdown

Description

Adds a read-only Beaver Knight action provider (beaverknightActionProvider).

Beaver Knight is a trust bureau for autonomous trading agents: it rates agents and vaults on what they actually did with real money on chain (realised P&L read from the venue itself, with a statistical-significance gate), publishes the rating whether or not the subject asked, and attests ratings on Base via EAS from a canister-controlled address that has no private key. The API is public, unauthenticated and network-agnostic; machine docs at https://www.beaverknight.com/llms.txt.

Why it fits AgentKit: an agent that is about to pay, delegate to, copy, or deposit with another agent or vault has no built-in way to ask "is this counterparty real?". This provider gives it three read actions:

  • rate_wallet - counterparty check by address (execution wallet, owner wallet or token; EVM or Solana). Returns score (0-99), level (strong | solid | fair | unproven | flag), verdict, and two separate lists: findings (about the subject) and limits (about the bureau's own reach). An unrated address returns found: false; the tool description tells the model explicitly that this is an absence of evidence, not a pass, and an upstream failure is surfaced as "could not check", kept distinct from "unrated".
  • get_vault_rankings - Hyperliquid / ERC-4626 vaults ranked by score, return, Sharpe, Sortino, Calmar, drawdown, TVL or decision count, each with a significance-test flag (edgeIsReal); null figures mean unmeasured, never zero.
  • get_integrity_report - the full report for one record: every metric, the factor breakdown behind the score, findings/limits, disclosures, a "basis" line describing how to re-derive each number from the venue's public API, and provenance including the on-chain EAS attestation when one exists.

Follows the existing read-only provider pattern (see defillama): fetch against a public API, JSON string returns, supportsNetwork() always true, optional base-URL override. No new dependencies.

Tests

Unit tests (beaverknightActionProvider.test.ts, 12 cases, fetch mocked): payload pass-through, query construction and null-filter omission, URL-encoding of ids, the found:false miss staying intact, and HTTP/network errors surfacing as "could not check" (never as unrated). pnpm lint, prettier -c, and tsc --noEmit clean.

Live outputs from the endpoints the actions call (direct invocation against the public bureau, no LLM in the loop; the actions return these payloads verbatim):

rate_wallet  { wallet: "0xa1b6d8efbcb2fb750a84dbc05649fa4968034f04" }

-------------------
{
  "found": true,
  "rating": { "name": "PF1", "score": 99, "level": "strong", "verdict": "verified edge", "venue": "Hyperliquid" },
  "meaning": "Verified track record, and the edge is statistically distinguishable from luck. This is the strongest verdict we issue.",
  "findings": [],
  "limits": [ { "label": "below size floor", "detail": null } ]
}
rate_wallet  { wallet: "0x0000000000000000000000000000000000000001" }

-------------------
{
  "found": false,
  "rating": null,
  "meaning": "No Beaver Knight rating exists for this address. That is an ABSENCE OF EVIDENCE, NOT A CLEAN BILL OF HEALTH. ... Do not treat a miss as a pass."
}
get_vault_rankings  { sort: "calmar", level: "strong", limit: 3 }

-------------------
[
  { "rank": 1, "id": "hlv-pf1-a1b6d8", "name": "PF1", "score": 99, "calmar": 5.75, "decisions": 3925, "edgeIsReal": true },
  { "rank": 2, "id": "hlv-a-downside-4af522", "name": "[A] Downside", "score": 91, "calmar": 4.65, "decisions": 311, "edgeIsReal": true },
  { "rank": 3, "id": "hlv-lowriskcryptogainer-d57c92", "name": "LowRiskCryptoGainer", "score": 84, "calmar": 3.58, "decisions": 3594, "edgeIsReal": true }
]
get_integrity_report  { id: "hlv-pf1-a1b6d8" }

-------------------
{
  "subject": "PF1",
  "level": "strong",
  "provenance.attestation": {
    "uid": "0xec0e293f3d0da8b5788b538ed66d36ec90ee63b981a7b30ec04c57bcf13af417",
    "attester": "0x46a7f2a1ffafaad254a91c0c71525e3e7e71548f",
    "network": "Base Sepolia"
  }
}

Checklist

  • Added documentation to all relevant README.md files (src/action-providers/beaverknight/README.md)
  • Added a changelog entry (.changeset/beaver-knight-action-provider.md)

Adds a read-only action provider for Beaver Knight, a trust bureau for
autonomous trading agents that rates agents and vaults on realised on-chain
performance and attests ratings on Base via EAS from a keyless
(canister-controlled) address.

Actions:
- rate_wallet: counterparty check by address (EVM or Solana). An unrated
  address is found:false, which the tool description states is an absence
  of evidence, not a pass; an upstream failure is surfaced as "could not
  check", distinct from unrated.
- get_vault_rankings: Hyperliquid / ERC-4626 vaults ranked by score, return,
  Sharpe, Sortino, Calmar, drawdown, TVL or decision count, with a
  significance-test flag per vault.
- get_integrity_report: full report for one record incl. findings/limits
  (kept separate), factor breakdown, basis, and on-chain attestation.

Public API, no keys, network-agnostic. Unit tests mock fetch and cover the
miss/error distinctions. README and changeset included.
@cb-heimdall

Copy link
Copy Markdown

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/2
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 0
2 if repo is sensitive 0
From .codeflow.yml 1
Additional review requirements
Show calculation
Max 0
0
From CODEOWNERS 0
Global minimum 0
Max 1
1
1 if commit is unverified 1
Sum 2

@github-actions github-actions Bot added documentation Improvements or additions to documentation action provider New action provider typescript labels Aug 19, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action provider New action provider documentation Improvements or additions to documentation typescript

Development

Successfully merging this pull request may close these issues.

2 participants