Bun
Recommended Version: 1.0.0+
# Using Bun (from npm)bun add @agentforce/adk
# Using JSRbunx jsr add @agentforce/adk
AgentForce 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.ts
Add 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.ts
You should see output confirming that AgentForce ADK is installed and working correctly.
Choose your preferred package manager and runtime:
bun add @agentforce/adk
npm install @agentforce/adk
npx jsr add @agentforce/adk
bunx jsr add @agentforce/adk
deno 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/adk
Deno
Recommended Version: 1.40.0+
# Using JSR (recommended)deno add jsr:@agentforce/adk
Node.js
Recommended Versions: 18.x, 20.x, 22.x+
# Using npm with tscnpm install @agentforce/adk
# Using JSR using .js extensionnpx jsr add @agentforce/adk
Browsers
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.ts
deno run test-installation.ts
node test-installation.js# or for TypeScriptnpx tsx test-installation.ts
For 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()
import
TypeScript errors:
moduleResolution
is set to "bundler"
or "node"
Deno permissions:
deno run --allow-net your-script.ts
Version conflicts:
npm cache clean --force
or bun cache clean
Now that AgentForce ADK is installed, you’ll need to set up AI providers to power your agents: