feat: add Beaver Knight action provider - #1455
Open
liander-ai wants to merge 1 commit into
Open
Conversation
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.
🟡 Heimdall Review Status
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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) andlimits(about the bureau's own reach). An unrated address returnsfound: 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):fetchagainst a public API, JSON string returns,supportsNetwork()always true, optional base-URL override. No new dependencies.Tests
Unit tests (
beaverknightActionProvider.test.ts, 12 cases,fetchmocked): payload pass-through, query construction and null-filter omission, URL-encoding of ids, thefound:falsemiss staying intact, and HTTP/network errors surfacing as "could not check" (never as unrated).pnpm lint,prettier -c, andtsc --noEmitclean.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):
Checklist
src/action-providers/beaverknight/README.md).changeset/beaver-knight-action-provider.md)