Use this file to discover all available pages before exploring further.
The ICP Agent Kit provides 10 pre-built LangChain tools that enable natural language interaction with the Internet Computer blockchain. These tools are automatically available when you use natural language processing or specialized agents.
Shows information about the current active identity.Usage:
// Natural language'Show me my current identity';'What is my principal?';'Display my account information';// Direct tool usageconst tool = createGetCurrentIdentityTool(agent);const result = await tool.invoke({}, { configurable: { agent } });
Checks ICP token balance for the current identity.Usage:
// Natural language'What is my ICP balance?';'Check my balance';'Show me how much ICP I have';// Direct tool usageconst tool = createGetBalanceTool(agent);const result = await tool.invoke({}, { configurable: { agent } });
Creates a new canister with specified cycles.Parameters:
cycles: Amount of cycles (e.g., “5T” for 5 trillion)
Usage:
// Natural language'Create a new canister with 5 trillion cycles';'Deploy new canister with 2T cycles';'Make a canister with 10T cycles';// Direct tool usageconst tool = createCreateCanisterTool(agent);const result = await tool.invoke( { cycles: '5T', }, { configurable: { agent } },);
// Natural language'Deploy my app.wasm to canister xyz';'Upgrade canister abc with new code';'Install WASM module to my canister';// Direct tool usageconst result = await deployWasmTool.invoke( { canisterId: 'canister-id', wasmPath: './build/app.wasm', mode: 'install', }, { configurable: { agent } },);
Retrieves detailed status information about a canister.Parameters:
canisterId: Canister ID to check
Usage:
// Natural language'Check status of canister xyz';'Show me canister abc information';'Get details about my canister';// Direct tool usageconst result = await getCanisterStatusTool.invoke( { canisterId: 'canister-id', }, { configurable: { agent } },);
When using natural language, tools are automatically selected:
// The NLP processor selects the appropriate toolawait agent.processNaturalLanguage('Create a canister and check its cycles balance');// This will use: create_canister → get_cycles_balance
Each tool has a defined Zod schema for validation. View the full schemas in the API Reference or the source code:
// Example: Transfer ICP schemaconst transferICPSchema = z.object({ to: z.string().describe('Recipient account ID or principal'), amount: z.union([z.string(), z.number()]).describe('Amount in ICP'), memo: z.string().optional().describe('Optional transaction memo'),});