Bun
Recommended Version: 1.0.0+
# Using Bun (from npm)bun add @agentforce/adk
# Using JSRbunx jsr add @agentforce/adkAgentForce ADK is available on both NPM and JSR (JavaScript Registry), making it easy to install in any JavaScript/TypeScript project regardless of your runtime preference.
Here’s a complete example of setting up a new project with AgentForce ADK using Bun:
# Create a new project directorymkdir my-agentforce-projectcd my-agentforce-project
# Initialize a new Bun projectbun init
# Install AgentForce ADKbun add @agentforce/adk
# Create a test file to verify installationtouch test-installation.tsAdd the following content to test-installation.ts:
import { AgentForceAgent } from '@agentforce/adk';
const agent = new AgentForceAgent({ name: "TestAgent" });
console.log("✅ AgentForce ADK installed successfully!");console.log("Agent created:", agent);Run the test to verify everything is working:
bun run test-installation.tsYou should see output confirming that AgentForce ADK is installed and working correctly.
Choose your preferred package manager and runtime:
bun add @agentforce/adknpm install @agentforce/adknpx jsr add @agentforce/adkbunx jsr add @agentforce/adkdeno add jsr:@agentforce/adk| Method | Best For | Benefits | Compatibility |
|---|---|---|---|
| npm | Node.js projects, existing npm workflows | Largest ecosystem, familiar tooling | Node.js, Bun |
| JSR | TypeScript-first projects, cross-runtime compatibility | Native TypeScript, better type checking | Node.js, Bun, Deno |
| Bun (npm) | Fast development, modern JavaScript projects | Fastest package manager, built-in TypeScript | Bun, Node.js |
Bun
Recommended Version: 1.0.0+
# Using Bun (from npm)bun add @agentforce/adk
# Using JSRbunx jsr add @agentforce/adkDeno
Recommended Version: 1.40.0+
# Using JSR (recommended)deno add jsr:@agentforce/adkNode.js
Recommended Versions: 18.x, 20.x, 22.x+
# Using npm with tscnpm install @agentforce/adk
# Using JSR using .js extensionnpx jsr add @agentforce/adkBrowsers
Build Tools: Vite, Webpack, Rollup
Works with bundlers using any installation method above.
After installation, verify that AgentForce ADK is working correctly:
import { AgentForceAgent } from '@agentforce/adk';
const agent = new AgentForceAgent({ name: "TestAgent" });
console.log("✅ AgentForce ADK installed successfully!");console.log("Agent created:", agent);import { AgentForceAgent } from "jsr:@agentforce/adk";
const agent = new AgentForceAgent({ name: "TestAgent"});
console.log("✅ AgentForce ADK installed successfully!");console.log("Agent created:", agent);import { AgentForceAgent } from '@agentforce/adk';
const agent = new AgentForceAgent({ name: "TestAgent" });
console.log("✅ AgentForce ADK installed successfully!");console.log("Agent created:", agent);Run the test:
bun run test-installation.tsdeno run test-installation.tsnode test-installation.js# or for TypeScriptnpx tsx test-installation.tsFor the best TypeScript experience, ensure your tsconfig.json includes:
{ "compilerOptions": { "target": "ES2022", "module": "ESNext", "moduleResolution": "bundler", "allowSyntheticDefaultImports": true, "esModuleInterop": true, "strict": true, "skipLibCheck": true, "forceConsistentCasingInFileNames": true }}Module not found errors:
require()importTypeScript errors:
moduleResolution is set to "bundler" or "node"Deno permissions:
deno run --allow-net your-script.tsVersion conflicts:
npm cache clean --force or bun cache cleanNow that AgentForce ADK is installed, you’ll need to set up AI providers to power your agents: