Skip to content

Installation


NPM JSR BUN

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:

Terminal window
# Create a new project directory
mkdir my-agentforce-project
cd my-agentforce-project
# Initialize a new Bun project
bun init
# Install AgentForce ADK
bun add @agentforce/adk
# Create a test file to verify installation
touch test-installation.ts

Add the following content to test-installation.ts:

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:

Terminal window
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:

Terminal window
bun add @agentforce/adk
MethodBest ForBenefitsCompatibility
npmNode.js projects, existing npm workflowsLargest ecosystem, familiar toolingNode.js, Bun
JSRTypeScript-first projects, cross-runtime compatibilityNative TypeScript, better type checkingNode.js, Bun, Deno
Bun (npm)Fast development, modern JavaScript projectsFastest package manager, built-in TypeScriptBun, Node.js

Bun

Recommended Version: 1.0.0+

Terminal window
# Using Bun (from npm)
bun add @agentforce/adk
# Using JSR
bunx jsr add @agentforce/adk

Deno

Recommended Version: 1.40.0+

Terminal window
# Using JSR (recommended)
deno add jsr:@agentforce/adk

Node.js

Recommended Versions: 18.x, 20.x, 22.x+

Terminal window
# Using npm with tsc
npm install @agentforce/adk
# Using JSR using .js extension
npx 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:

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:

Terminal window
bun run 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:

  • Ensure you’re using the correct import syntax for your runtime
  • For Node.js with CommonJS, use require()
  • For ES modules, use import

TypeScript errors:

  • Update to TypeScript 4.5+ for best compatibility
  • Ensure moduleResolution is set to "bundler" or "node"

Deno permissions:

  • Deno may require network permissions for some operations:
    Terminal window
    deno run --allow-net your-script.ts

Version conflicts:

  • Use exact versions in package.json to avoid conflicts
  • Clear cache: 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:

  1. Provider Setup - Configure Ollama (local) or OpenRouter (cloud)
  2. Quick Start - Create your first agent
  3. Basic Agents Guide - Learn agent fundamentals