-
Notifications
You must be signed in to change notification settings - Fork 580
Update Vaults.fyi provider #883
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Vaults.fyi provider #883
Conversation
✅ Heimdall Review Status
|
|
If a reviewer needs an API key for review I'm happy to share one. |
typescript/agentkit/src/action-providers/vaultsfyi/constants.ts
Outdated
Show resolved
Hide resolved
typescript/agentkit/src/action-providers/vaultsfyi/vaultsfyiActionProvider.ts
Outdated
Show resolved
Hide resolved
|
Thanks for the update @pawelpolak2, looks good to me! Could you please also update the typescript/agentkit README accordingly? |
Carson gave me an API key but it doesnt seem to work |
|
In |
|
Most actions require network as a mandatory schema parameter, would suggest to make it optional and default to connected network |
|
Token amounts are in atomic units. In my experience this often doesn't work well and the LLM wrongly converts the units. There is already a (currently unused) |
I think that would make sense for the transaction endpoints but most are readonly and are going to be used for analytics across all chains and i think making network optional might confuse the agent more than help as it actually is required for vault identification. |
I crafted the prompts so the agent understands that its all in atomic units and i found that it actually does really well with parsing those! I tried to avoid parsing them for it since it requires me to know the decimal of asset/LP token which would require additional calls and also i found that atomic units works better for the agent when LP tokens are scaled. Anyway I would keep it in atomic if you don't mind. lmk what you think 😁 |
I gave Carson a new key. The other one was in fact invalid, my bad. |
|
Thanks for the updates @pawelpolak2, I tested it out and the actions all work smoothly! Indeed, the prompts make a good job at guiding the LLM how to deal with the units, so we can leave it as is. Let's get this in @CarsonRoscoe |
Description
Updates the Vaults.fyi provider to use it's new v2 API which updates old action schemas and adds new actions, now using the Vaults.fyi SDK for better type safety.
Tests
Chatbot: langchain-cdp-smart-wallet-chatbot
Network: base
Setup: topped up with USDC and ETH
Prompt: "find me the best APY vault on base" (
vaults)Prompt: "what are my current positions" (
positions)Prompt: "can you withdraw half of my position?" (
transaction_context,execute_step)Prompt: "What was this vaults tvl like throughout october 2025? Prepare a table" (
vault_historical_data)Prompt: "how does its apy compare to the benchmarks?" (
historical_benchmark_apy)Prompt: "what is the benchmark apy currently?" (
benchmark_apy)Prompt: "do i have any rewards to claim?" (
rewards_context)Prompt: "yeah sure lets claim them!" (
claim_rewards) (couldn't claim because I only had some on gnosis but payload was generated properly)Prompt: "what assets do i have?" (
idle_assets)Prompt: "can you check 0x047e7CFA2702f95DE867A86a74CaF60E2DdBFF72 returns on the vault 0x444868B6e8079ac2c55eea115250f92C2b2c4D14 on arbitrum?" (
total_returns)Prompt: "can you check its action history on the vault?" (
user_events)Checklist
A couple of things to include in your PR for completeness: