Skip to content
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

Feat defillama. - ETHGlobal #316

Open
wants to merge 8 commits into
base: main
Choose a base branch
from

Conversation

bilgin-kocak
Copy link

@bilgin-kocak bilgin-kocak commented Feb 9, 2025

#317

What changed? Why?

Added a new DefiLlama action provider to enable interaction with the DefiLlama API for fetching DeFi protocol information and token prices. This implementation addresses the wishlist item for DeFi data integration

The implementation includes three main actions:

  • get_token_prices: Fetches current prices for specified tokens with chain prefixes
  • get_protocol: Retrieves detailed information about specific DeFi protocols
  • search_protocols: Enables searching through DeFi protocols

Key features:

  • Clean error handling and response formatting
  • Comprehensive unit tests for all actions
  • Type-safe implementation using Zod schemas
  • No external dependencies beyond the core AgentKit requirements

Qualified Impact

Affected Components:

  • Action Providers module
  • LangChain integration when using DeFi-related queries

Potential Impact & Resolution:

  • Low risk as this is an additive change
  • No modifications to existing action providers

In case of errors:

  • API-related issues can be resolved by updating endpoint URLs or error handling
  • Integration issues can be fixed by updating the provider implementation
  • No database or state changes involved
  • Can be disabled by removing the provider from the actionProviders array in AgentKit initialization

Testing:

  • Unit tests cover successful and error scenarios for all actions
  • Manual testing can be performed using the provided chatbot implementation
  • Integration tested with LangChain using example queries

This PR helps expand AgentKit's capabilities in the DeFi space by providing easy access to DefiLlama's comprehensive DeFi data, enabling developers to build more sophisticated DeFi-aware AI agents.

@cb-heimdall
Copy link

cb-heimdall commented Feb 9, 2025

🟡 Heimdall Review Status

Requirement Status More Info
Reviews 🟡 0/1
Denominator calculation
Show calculation
1 if user is bot 0
1 if user is external 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

@0xRAG 0xRAG added action provider New action provider needs review PR / issue needs review banana labels Feb 10, 2025
Copy link
Contributor

@0xRAG 0xRAG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @bilgin-kocak! I left one request. One other thing that will be needed before merging is to update the CHANGELOG.md: https://github.com/coinbase/agentkit/blob/master/typescript/agentkit/CHANGELOG.md

Please add an entry there with your changes!

@0xRAG 0xRAG added changes requested PR / Issue has changes requested and removed needs review PR / issue needs review labels Feb 11, 2025
@cb-heimdall
Copy link

Review Error for 0xRAG @ 2025-02-11 19:27:38 UTC
User failed mfa authentication, public email is not set on your github profile. see go/mfa-help

@bilgin-kocak
Copy link
Author

bilgin-kocak commented Feb 12, 2025

Hey @0xRAG CHANGELOG.md file is updated and more tests added

@0xRAG 0xRAG added needs review PR / issue needs review typescript and removed changes requested PR / Issue has changes requested labels Feb 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
action provider New action provider banana needs review PR / issue needs review typescript
Development

Successfully merging this pull request may close these issues.

3 participants