Installation Guide
Connecting your application to the Datafuse Active Integration network requires installing our lightweight client SDK. Datafuse provides first-class support for both Node.js/TypeScript and Python environments.
Prerequisites
Before installing the SDK, ensure you have:
- A Datafuse developer account.
- An active API Key (e.g.
df_live_...ordf_test_...), which you can fetch from your developer dashboard. - Node.js (version 18 or higher) or Python (version 3.8 or higher) installed in your workspace.
1. Python SDK Installation
For Python-based AI agent setups (supporting LangChain, LlamaIndex, CrewAI, AutoGen, and custom LLM loops), install our unified SDK via pip, poetry, or uv.
Core Package
pip install datafuse
From Local Source (For Developers)
If you are developing locally inside the Datafuse monorepo and want to link the development SDK directly:
pip install -e sdks/python
Quick Verification
Verify that the Python client can be imported without errors:
python -c "import datafuse; print('Python SDK successfully installed!')"
2. TypeScript SDK Installation
For Node.js, Next.js, Cloudflare Workers, or Vercel AI SDK setups, install the TypeScript client package.
Core Package
Install the client using your preferred JS package manager:
npm install @datafuse/sdk
Quick Verification
Check that the JS/TS dependency has successfully registered in your workspace:
node -e "const { Datafuse } = require('@datafuse/sdk'); console.log('TypeScript SDK successfully installed!');"
Environment Configuration
Datafuse clients automatically look for standard environment variables to initialize credentials, keeping your secrets out of source control.
Configure the following variables in your local .env file:
# Primary API Key from your Datafuse developer console
DATAFUSE_API_KEY=df_live_your_secret_key_here
# Base API Server Endpoint (defaults to https://api.datafuse.xyz)
DATAFUSE_API_URL=https://api.datafuse.xyz
!TIP If you are running Datafuse inside a private self-hosted VPC, change
DATAFUSE_API_URLto point to your secure internal load balancer (e.g.http://datafuse-gateway.internal).
Next Steps
Now that the SDK is successfully installed:
- Follow the 5-Minute Quickstart to list integrations, resolve tools, and invoke a tool.
- Prefer the terminal? Use the 5-Minute Quickstart with curl.
- Explore our TypeScript client guide or Python client guide.