ICP Agent Kit: Natural Language Interface for Internet Computer (LangChain Based)

ICP Agent Kit: Natural Language Interface for Internet Computer

Project highlights

ICP Agent Kit is a comprehensive TypeScript SDK that brings natural language processing to Internet Computer blockchain operations. Developers and users can interact with ICP through simple English commands like "transfer 5 ICP to alice" or “check my canister’s cycles balance” instead of complex blockchain calls.

Target users: ICP developers, DeFi users, AI enthusiasts, and anyone wanting simplified blockchain interactions without technical barriers.

Problems addressed: Eliminates the complexity of direct blockchain programming, makes ICP accessible to non-technical users, and bridges AI/LangChain ecosystem with Internet Computer’s unique capabilities.

Web3 advantages

Unlike traditional Web2 APIs that require intermediaries and centralized services, ICP Agent Kit enables:

  • Direct blockchain interaction through natural language
  • True ownership of digital assets without custodial services
  • Programmable money - users control their tokens and canisters directly
  • Decentralized execution - operations run on IC’s tamper-proof network
  • No API keys or rate limits for basic blockchain operations

How is it built

Core Architecture:

  • Language: TypeScript with strict typing
  • Blockchain Layer: Official DFINITY packages (@dfinity/agent, @dfinity/ledger-icp)
  • AI Layer: LangChain + OpenAI GPT-4 for natural language processing
  • Plugin System: Modular architecture (Identity, Token, Canister, Cycles)

Key Design Decisions:

  • Plugin-based architecture for extensibility
  • Dual interface: direct API methods + natural language processing
  • Network-aware configuration (mainnet/local)
  • Type-safe error handling throughout

Internet Computer superpowers

ICP Agent Kit leverages IC’s unique features:

  • HTTP Outcalls: Direct integration with external APIs and AI services
  • Canister Smart Contracts: Persistent, upgradeable backend logic
  • Cycles System: Sustainable computation model for continuous operation
  • Chain-Key Cryptography: Secure key management and identity systems
  • Native Token Integration: Direct ICP and ICRC standard support
  • Query vs Update Calls: Optimized for both fast reads and secure writes

These features enable seamless AI-blockchain integration impossible on other networks.

Go-To-Market strategy

Developer-First Approach:

  • Open source on GitHub with comprehensive documentation
  • Integration with popular developer tools (LangChain, TypeScript ecosystem)
  • Demo applications and tutorials for common use cases
  • Community building through ICP developer forums and events

Target Channels:

  • ICP developer community
  • LangChain and AI developer ecosystem
  • DeFi and blockchain automation communities
  • Educational content and workshops

Status of the project

Current Status: Live with core functionality complete

Technical Achievements:

  • :white_check_mark: 4 core plugins fully implemented (Identity, Token, Canister, Cycles)
  • :white_check_mark: 10 LangChain tools for natural language processing
  • :white_check_mark: 123 unit tests passing with integration test suite
  • :white_check_mark: Network-aware architecture (mainnet/local)
  • :white_check_mark: Comprehensive documentation and examples

Usage Metrics: Recently launched, focusing on developer adoption and feedback collection.

Resources

Future Plans

Technical Roadmap:

  • Governance Plugin: NNS integration for voting and neuron management
  • Advanced AI Agents: Specialized agents for DeFi, governance, and development
  • Multi-chain Support: Cross-chain operations and bridge integrations
  • Enterprise Features: Enhanced security, monitoring, and management tools

Community Goals:

  • Conference Presentations: ICP community events and AI/blockchain conferences
  • Partnership Development: Integration with major ICP projects and protocols
  • Developer Ecosystem: Growing community of contributors and integrations
3 Likes

Hi everyone,

Here is a short demo video of ICP Agent Kit: https://www.youtube.com/watch?v=Evu5LfD9VhQ&feature=youtu.be

Next week I will be make a detailed presentation on DeAI working group, meeting notes will be shared the after released.

1 Like

Very nice. Great documentation! Looks like you put a lof of work into it.

What is the role of the canisters, such as the agent connection canister? I see it’s hard coding tool responses. Is it supposed to be some sort of proxy for inter canister calls?

1 Like

Thanks @yrgg, glad you like that!

Actually canisters just for an example, I’ve created a few example canisters to show different use cases. At core, ICP Agent can interact with any canister thanks to Canister Plugin Implementation - GitHub

You can use ICPAgent in 2 ways,

  • Direct API Calls

    // Call greet
    const greeting = await agent.canisterPlugin.query({
      canisterId,
      methodName: 'greet',
      args: ['World'],
      idlFactory: greetingIDL,
    });
    console.log('Greeting:', greeting);
    
  • Natural Language (That is what makes that a real agent!)
    let result = await agent.processNaturalLanguage(
    Store data in canister ${canisterId} with key "test_key", value "Hello World", Private access level, and metadata [["type", "test"]],
    );
    console.log(‘Response:’, result, ‘\n’);

    Demo: icp-agent-kit/canisters/demos/persistent_storage_demo.js at master · justmert/icp-agent-kit · GitHub

So as you deployed the canister and know the required parameters like canisterId, you can just ask what you want to agent and it will decide to what to do, make related tool calls and give you a response.

I will give detailed explanations at DeAI group to explain how it works under the hood, will share the notes here after event.