Skip to content

Feat defillama. - ETHGlobal - #316

Merged
stat merged 11 commits into
coinbase:defillama-action-providerfrom
bilgin-kocak:feat-defillama
Mar 14, 2025
Merged

Feat defillama. - ETHGlobal#316
stat merged 11 commits into
coinbase:defillama-action-providerfrom
bilgin-kocak:feat-defillama

Conversation

@bilgin-kocak

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

Copy link
Copy Markdown
Contributor

#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

cb-heimdall commented Feb 9, 2025

Copy link
Copy Markdown

🟡 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

@0xRAG 0xRAG left a comment

Copy link
Copy Markdown
Contributor

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
Copy Markdown

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

bilgin-kocak commented Feb 12, 2025

Copy link
Copy Markdown
Contributor Author

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
stat pushed a commit that referenced this pull request Mar 4, 2025
stat pushed a commit that referenced this pull request Mar 4, 2025
stat pushed a commit that referenced this pull request Mar 13, 2025
@stat
stat changed the base branch from main to defillama-action-provider March 14, 2025 05:24
@stat
stat merged commit d8f8050 into coinbase:defillama-action-provider Mar 14, 2025
stat pushed a commit that referenced this pull request Mar 14, 2025
John-peterson-coinbase pushed a commit that referenced this pull request Mar 14, 2025
* feat(ts): defillama action provider (#316)

* feat(ts): defillama action provider refinements (#513)

---------

Co-authored-by: bilgin-kocak <kocakbilgin@gmail.com>
chenciao8 added a commit to TradeOnDESK/agentkit that referenced this pull request Mar 19, 2025
* feat: GHA Publish coinbase-agentkit-openai-agents-sdk to PyPI (coinbase#551)

* feat: python openai agents sdk support (coinbase#550)

* feat: initial commit

* chore: unit tests

* chore: updated readmes

* chore: updated to live openai-agents package

* fix: fix params schema to conform to openai requirements

* chore: updated README in /python

* chore: generated changelog changes (coinbase#552)

* chore: add next-template to workspaces (coinbase#544)

* chore: add next-template to workspaces

* chore: fix lint in next template

* chore: generated changeset

* chore: reverted img change

---------

Co-authored-by: CarsonRoscoe <carsonroscoe7@gmail.com>

* chore: python bump cdp sdk version (coinbase#554)

* chore: bump cdp-sdk version from 0.19.0 to 0.21.0 in python

* chore: generated changelog

* chore: generate changelog changes & bump coinbase-agentkit version

* Update README.md (coinbase#555)

* feat: model context protocol example (coinbase#546)

* feat: initial commit

* feat: working claude example

* chore: removed wallet read/writes

* chore: updated README

* chore: added examples to parent READMEs

* chore: format/lint

* chore: added build to ignore

* fix: package dependencies

* chore: change build folder to dist

* chore: package-lock

* chore: fixed package-lock.json

* chore: removed dotenv dependency

* chore: removed moduleResolution from tsconfig

* fix: package-lock

* pr feedback

* chore: lint format

* fix: package-lock

* fix: claud config arg for server location

* feat: pr feedback

* feat: npm cli - multi framework + Vercel AI SDK (coinbase#548)

* feat: initial commit

* fix: handleNextSelection call

* chore: format and lint

* chore: updated comments

* chore: changelog

* chore: updated readmes

* chore: added todo and removed MCP from Framework list for now

* chore: removed references to mcpServer and MCP. Will readd in its own PR

* chore: updated package-lock

* chore: removed missed mcpServer reference

* chore: lint

* chore: infer types from constants (coinbase#559)

* feat(python): add allora network price inference (coinbase#110)

* fix typo: OpenSeas to OpenSea (coinbase#564)

* fix typo (coinbase#563)

* feat: pipx cli - multi framework support + OpenAI Agents + Beginner template (coinbase#557)

* chore: refactored chatbot into prepare_agent, create_agent and chatbot

* feat: added openai agents sdk

* chore: pyproject.toml dependencies depends on framework selected

* fix: openai agents sdk dependencies

* feat: added paymaster comment to smart wallet scenario

* feat: added introduction template

* feat: cleaned up beginner template

* feat: changed --mode=beginnner arg to --beginner flag

* feat: improved wallet persistance and beginner flag

* chore: changelog

* chore: updated README

* chore: lint

* chore: updated beginner README

* feat(ts): defillama action provider (coinbase#513)

* feat(ts): defillama action provider (coinbase#316)

* feat(ts): defillama action provider refinements (coinbase#513)

---------

Co-authored-by: bilgin-kocak <kocakbilgin@gmail.com>

* chore: rm changelog workflow (coinbase#570)

* chore: add mcp template (coinbase#568)

* fix: readded missing .env.local file (coinbase#567)

* feat(py): hyperbolic action provider (coinbase#531)

* feat(py): hyperbolic action provider (coinbase#154)

* feat(py): hyperbolic action provider 0.1.0 migration (coinbase#509)

* feat(py): hyperbolic action provider refinements (coinbase#531)

---------

Co-authored-by: Kai Huang <kaihuang724@gmail.com>
Co-authored-by: Amr Elhady <theamrelhady@gmail.com>

* chore: fix nightly (coinbase#571)

* feat(create-onchain-agent): add mcp to typescript cli (coinbase#569)

* fix: Morpho Deposit Atomic Unit Conversion (coinbase#573)

* fix: Morpho Deposit Atomic Unit Conversion

* changesets

* chore: rm allora-sdk from example deps (coinbase#574)

* chore: added readme tip to surpress warning (coinbase#575)

* chore: added readme tip to surpress warning

* chore: added tip to agents example readme

* chore: version typescript packages (coinbase#576)

* chore: version python packages (coinbase#577)

* New SVGs in readme (coinbase#578)

* Add files via upload

* Add files via upload

* Update README.md

* Update README.md

* Update defillama.svg

* chore: add changesets action to automate version and publish (coinbase#582)

* feat: added gasless transfers for USDC/CBBTC on Base/Base-Sepolia (coinbase#584)

* docs: update broken links (coinbase#586)

---------

Co-authored-by: John Peterson <98187317+John-peterson-coinbase@users.noreply.github.com>
Co-authored-by: Carson Roscoe <CarsonRoscoe7@gmail.com>
Co-authored-by: Ryan Gilbert <ryangilbert7926@gmail.com>
Co-authored-by: Olexandr88 <radole1203@gmail.com>
Co-authored-by: fernandofcampos <fernandofcampos@gmail.com>
Co-authored-by: Oğuzhan Oğuz <46710637+ozzy35410@users.noreply.github.com>
Co-authored-by: Chris Gerber <csgerber@gmail.com>
Co-authored-by: bilgin-kocak <kocakbilgin@gmail.com>
Co-authored-by: Kai Huang <kaihuang724@gmail.com>
Co-authored-by: Amr Elhady <theamrelhady@gmail.com>
Co-authored-by: murrlincoln <65836530+murrlincoln@users.noreply.github.com>
Co-authored-by: Cypher Pepe <125112044+cypherpepe@users.noreply.github.com>
EdsonAlcala pushed a commit to EdsonAlcala/agentkit that referenced this pull request Mar 21, 2025
* feat(ts): defillama action provider (coinbase#316)

* feat(ts): defillama action provider refinements (coinbase#513)

---------

Co-authored-by: bilgin-kocak <kocakbilgin@gmail.com>
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.

6 participants