Skip to content

Add application from Elastic Labs for Polkadot Agent Kit #2549

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

chungquantin
Copy link

Project Abstract

Polkadot Agent Kit is an open-source library provides developers with a set of tools to build AI Agents that interact autonomously with the Polkadot SDK-based networks.

Grant level

  • Level 1: Up to $10,000, 2 approvals
  • Level 2: Up to $30,000, 3 approvals
  • Level 3: Unlimited, 5 approvals (for >$100k: Web3 Foundation Council approval)

Application Checklist

  • The application template has been copied and aptly renamed (project_name.md).
  • I have read the application guidelines.
  • Payment details have been provided (Polkadot AssetHub (USDC & DOT) address in the application and bank details via email, if applicable).
  • I understand that an agreed upon percentage of each milestone will be paid in vested DOT, to the Polkadot address listed in the application.
  • I am aware that, in order to receive a grant, I (and the entity I represent) have to successfully complete a KYC/KYB check.
  • The software delivered for this grant will be released under an open-source license specified in the application.
  • The initial PR contains only one commit (squash and force-push if needed).
  • The grant will only be announced once the first milestone has been accepted (see the announcement guidelines).
  • I prefer the discussion of this application to take place in a private Element/Matrix channel. My username is: @_______:matrix.org (change the homeserver if you use a different one)

@github-actions github-actions bot added the admin-review This application requires a review from an admin. label Apr 29, 2025
Copy link
Contributor

github-actions bot commented Apr 29, 2025

CLA Assistant Lite bot All contributors have signed the CLA ✍️ ✅

@chungquantin
Copy link
Author

I have read and hereby sign the Contributor License Agreement.

@chungquantin
Copy link
Author

recheck

Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

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

Thanks @chungquantin I need to delve further into your application but in the meantime could you compare your project to the other agent kit application that is currently open and list the similarities/differences?

@chungquantin
Copy link
Author

chungquantin commented Apr 30, 2025

@keeganquigley Thanks for quick response on the application, our team is aware of the existing agent kit application but there are a lot of differences but these twos:

  • Fist point would be our library has been built since the start of 2025 to cover basic functionalities to manage wallets, connect to chains and transfer with real Telegram bot example.
  • Second point, our application mainly targets at DeFi and cross-chain use cases which are not covered in the other applications which are the main focus of our application. We found XCM / ISMP and cross-chain use cases are extremely hard to learn / integrated into existing DApps.
  • Focus more on distribution and real usage by delivering Agent Kit Playground and examples.
  • In terms of Agentic features, we want to focus more on making the library compatible with different agent toolings such as MCP, Eliza, A2A

Here's a breakdown of the similarities and key differences:

Similarities:

  • Core Goal: Both aim to create a toolkit/library for AI agents to interact with the Polkadot ecosystem.
  • Target Audience: Developers building AI-powered applications on Polkadot.
  • Key Functionality Areas: Wallet management, token transfers, Polkadot network interaction.
  • Technology Stack (Overlapping): Use of Polkadot API, integration with AI agent frameworks like LangChain.

Key Differences and Potential Strengths:

  • Pop Agent Kit CLI - Allows developers to initialize the agent kit starter code base easily.
  • Support multiple LLM models - Consider migrating the codebase to LiteLLM to support more LLM models.
  • Support multiple External Context Provider: MCP & Eliza OS compabitibility - Allows developers to integrate the Polkadot Agent Kit as Eliza OS plugin and easily hosting a MCP Server using the kit.
  • Options to deploy AI agents: Vercel AI SDK Deployment & PHALA TEE Deployment (This will need to be reconsidered in the future).

Potential Ecosystem Integrations:

  • Hydration
  • Apillon
  • PolkaAssembly

Developer onboarding and distribution (additional scope - voluntary):

  • Launch comprehensive documentation, quick-start guides, and interactive demos to lower the barrier to entry for new developers.
  • Utilize OpenGuild as a distribution platform through online/offlines workshop, collaborate with Polkadot’s flagship events to distribute/promote the kit.
  • Introduce open-source bounties at OpenGuild’s meetups to incentivize developers to build agentic applications using the kit, increase mindshare.

@takahser
Copy link
Collaborator

takahser commented May 2, 2025

@chungquantin

Key Differences and Potential Strengths of Your Proposal ("Polkadot Agent Kit"):

What do you mean by "Your Proposal"?

MCP & Eliza OS compabitibility - Allows developers to integrate the Polkadot Agent Kit as Eliza OS plugin and easily hosting a MCP Server using the kit.

Regarding Eliza OS compatibility: Will this depend on the acceptance of the ElizaOS team of your project? In other words, if you opened an PR on their side and it's not merged, would usability and visibility of the integration be impacted by that?

@chungquantin
Copy link
Author

@chungquantin

Key Differences and Potential Strengths of Your Proposal ("Polkadot Agent Kit"):

What do you mean by "Your Proposal"?

MCP & Eliza OS compabitibility - Allows developers to integrate the Polkadot Agent Kit as Eliza OS plugin and easily hosting a MCP Server using the kit.

Regarding Eliza OS compatibility: Will this depend on the acceptance of the ElizaOS team of your project? In other words, if you opened an PR on their side and it's not merged, would usability and visibility of the integration be impacted by that?

About Eliza OS compability, this does not require the plugin to be merged to Eliza to be used innthe framework. Eliza is designed to be modular, references from https://github.com/elizaos-plugins which are not in Eliza OS main repo.

@chungquantin chungquantin requested a review from keeganquigley May 5, 2025 13:13
Copy link
Contributor

@keeganquigley keeganquigley left a comment

Choose a reason for hiding this comment

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

Thanks @chungquantin I'm willing to support it. While waiting for further reviews, please submit KYB verification for Elastic Labs legal entity when you get a chance. Thanks!

@keeganquigley keeganquigley added the ready for review The project is ready to be reviewed by the committee members. label May 14, 2025
Copy link
Member

@semuelle semuelle left a comment

Choose a reason for hiding this comment

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

Thanks again for the application, @chungquantin. It looks like you already put quite a bit of thought into it, so I am also happy to support it. I just have some questions for my understanding.

  • Are there safety mechanisms to ensure that the agent doesn't misinterpret details, such as confusing Plancks with DOTs, or when someone uses a comma as a decimal point?
  • I have never used LangChain. Can you explain the steps how to get from a prompt to the correct transaction?
  • I've been trying to understand how one would add more high-level functionality to, say, the Telegram bot. Do I understand correctly that it's enough to define a LangChain "tool" and then register it with the bot? The reason I'm asking is because I think the user demands will be a lot more varied once pallet-revive is live.

@chungquantin
Copy link
Author

Thanks again for the application, @chungquantin. It looks like you already put quite a bit of thought into it, so I am also happy to support it. I just have some questions for my understanding.

  • Are there safety mechanisms to ensure that the agent doesn't misinterpret details, such as confusing Plancks with DOTs, or when someone uses a comma as a decimal point?
  • I have never used LangChain. Can you explain the steps how to get from a prompt to the correct transaction?
  • I've been trying to understand how one would add more high-level functionality to, say, the Telegram bot. Do I understand correctly that it's enough to define a LangChain "tool" and then register it with the bot? The reason I'm asking is because I think the user demands will be a lot more varied once pallet-revive is live.

Thanks @semuelle, you raised very reasonable questions.

Are there safety mechanisms to ensure that the agent doesn't misinterpret details, such as confusing Plancks with DOTs, or when someone uses a comma as a decimal point?

I have discussed with the team in we confirm that in the inital MVP of the library, we did not handle accepting the DOT unit directly but must be in planck unit, I have created an issue here for my team to tackle: elasticlabs-org/polkadot-agent-kit#43

I have never used LangChain. Can you explain the steps how to get from a prompt to the correct transaction?

We have llm to handle all the NLP parts. In the llm package, you can provide a set of tools (Reference Langchain Tools) to the langchain framework. The tool itself will call the underlying polkadot-api to submit the transaction, and we have another post-submission process to handle the output from the agent. For example, below is the implementation flow for the DOT transferring feature:

  1. Langchain tool is defined with a prompt and a set of tools to trigger based on the provided input from the user's prompt: https://github.com/elasticlabs-org/polkadot-agent-kit/blob/main/packages/llm/src/langchain/transfer.ts#L12
  2. Then the underlying core API is called to submit the transaction to transfer: https://github.com/elasticlabs-org/polkadot-agent-kit/blob/main/packages/core/src/pallets/assets/transferNative.ts#L11

Hence, the integration guide for the library would be as simple as writing a new langchain tool and plug into the Agent Kit library. Right now, the library is still quite simple and we haven't handled the feature that allows external integrations yet, but I can say it is a part of the roadmap. Our plan is to support three standardized approaches here: MCP Servers, A2A protocol, other langchain tools.

I've been trying to understand how one would add more high-level functionality to, say, the Telegram bot. Do I understand correctly that it's enough to define a LangChain "tool" and then register it with the bot? The reason I'm asking is because I think the user demands will be a lot more varied once pallet-revive is live.

The Telegram Bot in this is a library client if I am correct? We will aggregate all the client integrations in one package soon called @polkadot-agent-kit/client that allows user to initialize the client (Discord, Telegram Bot, Twitter Bot) easily. Talking in terms of the pallet-revive, as mentioned above about langchain tools, similar to library like Coinbase Agent Kit or Solana Agent Kit. One can easily fork the library and add new tools to it (or remove tools which are not needed), reusing all the existing core APIs provided in @polkadot-agent-kit/core.

Just a note here what we are proposing is a library and not an agent framework like Eliza, so there are limits to add new features to the existing library, but our approach is to make easy for open contributors to add new feature on top of the library.

Copy link
Member

@semuelle semuelle 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 clarifications, @chungquantin. I am happy to support this project.

Our plan is to support three standardized approaches here: MCP Servers, A2A protocol, other langchain tools.

In that case, perhaps you can reach out to this grantee, to make sure your solutions work together and perhaps publish a user guide/tutorial together?

@chungquantin
Copy link
Author

Thanks for the clarifications, @chungquantin. I am happy to support this project.

Our plan is to support three standardized approaches here: MCP Servers, A2A protocol, other langchain tools.

In that case, perhaps you can reach out to this grantee, to make sure your solutions work together and perhaps publish a user guide/tutorial together?

Thanks for the suggestion, that's a great idea, we will see if there is a room for collaboration with the Substrate MCP team!

@chungquantin
Copy link
Author

Thanks @chungquantin I'm willing to support it. While waiting for further reviews, please submit KYB verification for Elastic Labs legal entity when you get a chance. Thanks!

Related to KYB verification, just to clarify that our company is still in the process of establishing the entity (which takes around the next 8 days). Wonder if it is ok to KYC first and I update the KYB later?

@semuelle semuelle requested a review from PieWol May 22, 2025 12:19
@keeganquigley
Copy link
Contributor

Thanks @chungquantin yes feel free to use this KYC verification link instead for now, and then KYB can be updated once the entity is in place.

@chungquantin
Copy link
Author

Thanks @chungquantin yes feel free to use this KYC verification link instead for now, and then KYB can be updated once the entity is in place.

Thanks @keeganquigley, I have finished the KYC process. Let me know if you need any further information from me or my team. And it would be great if we can have the information on the next step! Thanks again.

@semuelle semuelle requested a review from Noc2 May 23, 2025 11:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
admin-review This application requires a review from an admin. ready for review The project is ready to be reviewed by the committee members.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants