Quickstart

Get from zero to searching your data in under 5 minutes

This guide will take you from zero to searching your data with Airweave in under 5 minutes. You’ll create a collection, connect a data source, and make your first search query.

1

Choose Your Path

Start by deciding how you want to run Airweave. We recommend our cloud platform for the fastest setup, but you can also self-host for complete control.

Full control by running Airweave in your own environment.

Self-hosted setup
$# 1. Clone the repository
>git clone https://github.com/airweave-ai/airweave.git
>cd airweave
>
># 2. Build and run with Docker
>chmod +x start.sh
>./start.sh

That’s it! Access your dashboard at http://localhost:8080

Requirements: Docker and Docker Compose must be installed on your system.

2

Create Your First Collection

Collections are logical groups of data sources that get their own searchable endpoints. Start by choosing a source from the dashboard:

Create a collection programmatically with our REST API:

Create Collection Request
$curl -X POST 'https://api.airweave.ai/collections' \
> -H 'x-api-key: YOUR_API_KEY' \
> -H 'Content-Type: application/json' \
> -d '{
> "name": "My First Collection"
> }'

Response:

Response
1{
2 "id": "123e4567-e89b-12d3-a456-426614174000",
3 "name": "My First Collection",
4 "readable_id": "my-first-collection-abc123",
5 "created_at": "2024-01-15T10:30:00Z",
6 "status": "NEEDS SOURCE"
7}
Getting your API key

Find your API key in the dashboard under Settings > API Keys, or create one if you don’t have any yet.

Create Collection
1from airweave import AirweaveSDK
2
3client = AirweaveSDK(api_key="YOUR_API_KEY")
4
5collection = client.collections.create_collection(
6 name="My First Collection"
7)
8
9print(f"Created collection: {collection.readable_id}")

Install the SDK:

Install SDK
$pip install airweave-sdk
Getting your API key

Find your API key in the dashboard under Settings > API Keys, or create one if you don’t have any yet.

Create Collection
1import { AirweaveSDKClient } from "@airweave/sdk";
2
3const client = new AirweaveSDKClient({
4 apiKey: "YOUR_API_KEY"
5});
6
7const collection = await client.collections.createCollection({
8 name: "My First Collection"
9});
10
11console.log(`Created collection: ${collection.readableId}`);

Install the SDK:

Install SDK
$npm install @airweave/sdk
Getting your API key

Find your API key in the dashboard under Settings > API Keys, or create one if you don’t have any yet.

3

Connect Your First Data Source

Now you’ll authenticate and configure your chosen data source. The process varies by source type:

After creating your collection, you’ll be prompted to connect to the source:

  1. Enter Connection Details
  2. Authenticate

OAuth2 sources (Google, Slack) open a popup for authorization. API key sources (Stripe, Notion) validate immediately.

  1. Configure Source (Optional)

Some sources have config options like exclude patterns (Google Drive) or specific branches (GitHub).

  1. Connect
🎉 You're connected!

➡️ You’ll automatically be taken to your collection detail view to watch the sync progress!

Create source connections programmatically with our REST API. Here’s an example using Stripe (API key authentication):

Create Source Connection Request
$curl -X POST 'https://api.airweave.ai/source-connections' \
> -H 'x-api-key: YOUR_API_KEY' \
> -H 'Content-Type: application/json' \
> -d '{
> "name": "My Stripe Connection",
> "short_name": "stripe",
> "collection": "my-first-collection-abc123",
> "auth_fields": {
> "api_key": "sk_test_your_stripe_api_key"
> },
> "config_fields": {},
> "sync_immediately": true
> }'

Response:

Response
1{
2 "id": "123e4567-e89b-12d3-a456-426614174000",
3 "name": "My Stripe Connection",
4 "short_name": "stripe",
5 "collection": "my-first-collection-abc123",
6 "status": "SYNCING",
7 "created_at": "2024-01-15T10:30:00Z",
8 "sync_id": "456e7890-e89b-12d3-a456-426614174000"
9}
OAuth2 Sources

For OAuth2 sources (Google Drive, Slack, etc.), see our Direct Token Authentication guide for the multi-step authentication flow.

Create Source Connection
1from airweave import AirweaveSDK
2
3client = AirweaveSDK(api_key="YOUR_API_KEY")
4
5source_connection = client.source_connections.create_source_connection(
6 name="My Stripe Connection",
7 short_name="stripe",
8 collection="my-first-collection-abc123",
9 auth_fields={
10 "api_key": "sk_test_your_stripe_api_key"
11 },
12 config_fields={},
13 sync_immediately=True
14)
15
16print(f"Created connection: {source_connection.id}")
17print(f"Status: {source_connection.status}")
Getting your API key

Find your API key in the dashboard under Settings > API Keys, or create one if you don’t have any yet.

OAuth2 Sources

For OAuth2 sources (Google Drive, Slack, etc.), see our Direct Token Authentication guide to learn how to provide access tokens.

Create Source Connection
1import { AirweaveSDKClient } from "@airweave/sdk";
2
3const client = new AirweaveSDKClient({
4 apiKey: "YOUR_API_KEY"
5});
6
7const sourceConnection = await client.sourceConnections.createSourceConnection({
8 name: "My Stripe Connection",
9 shortName: "stripe",
10 collection: "my-first-collection-abc123",
11 authFields: {
12 apiKey: "sk_test_your_stripe_api_key"
13 },
14 configFields: {},
15 syncImmediately: true
16});
17
18console.log(`Created connection: ${sourceConnection.id}`);
19console.log(`Status: ${sourceConnection.status}`);
Getting your API key

Find your API key in the dashboard under Settings > API Keys, or create one if you don’t have any yet.

OAuth2 Sources

For OAuth2 sources (Google Drive, Slack, etc.), see our Direct Token Authentication guide to learn how to provide access tokens.

4

Search Your Data

Airweave offers two powerful search modes:

  • 🔍 Raw Results: Get relevant documents and data snippets directly
  • 🤖 AI Completion: Have an LLM analyze the data and provide intelligent responses

In your collection detail view:

  1. Watch the sync progress in real-time
  2. Use the search bar to query your data, e.g.:
    • “What are our product features?”
    • “Show me recent customer feedback”
    • “Find documentation about API authentication”

Results appear instantly with relevant snippets and source attribution! 🎉

Toggle between modes: Use the dropdown next to the search bar to switch between Raw Results and AI Completion modes.

Get Raw Search Results:

Search Request (Raw)
$curl -X GET 'https://api.airweave.ai/collections/my-first-collection-abc123/search?query=What%20are%20our%20product%20features&response_type=raw' \
> -H 'x-api-key: YOUR_API_KEY' \
> -H 'Content-Type: application/json'

Response:

Response
1{
2 "results": [
3 {
4 "content": "Our key product features include semantic search, real-time sync, and 28+ data connectors...",
5 "source": "notion",
6 "document_id": "abc123",
7 "relevance_score": 0.95,
8 "metadata": {
9 "title": "Product Overview",
10 "url": "https://notion.so/product-overview"
11 }
12 }
13 ],
14 "response_type": "raw",
15 "completion": null,
16 "status": "success"
17}

Get AI Completion:

Search Request (Completion)
$curl -X GET 'https://api.airweave.ai/collections/my-first-collection-abc123/search?query=What%20are%20our%20product%20features&response_type=completion' \
> -H 'x-api-key: YOUR_API_KEY' \
> -H 'Content-Type: application/json'

Response:

Response
1{
2 "results": [
3 {
4 "content": "Our key product features include semantic search, real-time sync, and 28+ data connectors...",
5 "source": "notion",
6 "document_id": "abc123",
7 "relevance_score": 0.95,
8 "metadata": {
9 "title": "Product Overview",
10 "url": "https://notion.so/product-overview"
11 }
12 }
13 ],
14 "response_type": "completion",
15 "completion": "Based on your documentation, your product offers three main features: 1) Semantic search that understands natural language queries, 2) Real-time data synchronization across all connected sources, and 3) A comprehensive library of 28+ pre-built data connectors including popular tools like Notion, Slack, and GitHub.",
16 "status": "success"
17}
Response Types
  • raw: Returns search results only
  • completion: Returns search results + AI-generated response based on the data

Get Raw Search Results:

Search (Raw Results)
1from airweave import AirweaveSDK
2from airweave.schemas import ResponseType
3
4client = AirweaveSDK(api_key="YOUR_API_KEY")
5
6# Raw search results
7results = client.collections.search_collection(
8 readable_id="my-first-collection-abc123",
9 query="What are our product features?",
10 response_type=ResponseType.RAW
11)
12
13print(f"Found {len(results.results)} relevant documents:")
14for result in results.results:
15 print(f"📄 {result.metadata.title}")
16 print(f"📝 {result.content[:200]}...")
17 print(f"🔗 {result.metadata.url}\n")

Get AI Completion:

Search (AI Completion)
1from airweave import AirweaveSDK
2from airweave.schemas import ResponseType
3
4client = AirweaveSDK(api_key="YOUR_API_KEY")
5
6# AI completion based on search results
7results = client.collections.search_collection(
8 readable_id="my-first-collection-abc123",
9 query="What are our product features?",
10 response_type=ResponseType.COMPLETION
11)
12
13print("🤖 AI Response:")
14print(results.completion)
15print(f"\n📚 Based on {len(results.results)} sources:")
16for result in results.results:
17 print(f" • {result.metadata.title}")

Import ResponseType from airweave.schemas to use type-safe response type constants.

Get Raw Search Results:

Search (Raw Results)
1import { AirweaveSDKClient, ResponseType } from "@airweave/sdk";
2
3const client = new AirweaveSDKClient({ apiKey: "YOUR_API_KEY" });
4
5// Raw search results
6const results = await client.collections.searchCollection(
7 "my-first-collection-abc123",
8 {
9 query: "What are our product features?",
10 responseType: ResponseType.RAW
11 }
12);
13
14console.log(`Found ${results.results.length} relevant documents:`);
15results.results.forEach(result => {
16 console.log(`📄 ${result.metadata.title}`);
17 console.log(`📝 ${result.content.substring(0, 200)}...`);
18 console.log(`🔗 ${result.metadata.url}\n`);
19});

Get AI Completion:

Search (AI Completion)
1import { AirweaveSDKClient, ResponseType } from "@airweave/sdk";
2
3const client = new AirweaveSDKClient({ apiKey: "YOUR_API_KEY" });
4
5// AI completion based on search results
6const results = await client.collections.searchCollection(
7 "my-first-collection-abc123",
8 {
9 query: "What are our product features?",
10 responseType: ResponseType.COMPLETION
11 }
12);
13
14console.log("🤖 AI Response:");
15console.log(results.completion);
16console.log(`\n📚 Based on ${results.results.length} sources:`);
17results.results.forEach(result => {
18 console.log(` • ${result.metadata.title}`);
19});

Use ResponseType enum for type-safe response type selection: ResponseType.RAW or ResponseType.COMPLETION.

5

🎉 You’re All Set!

Congratulations! You’ve successfully:

  • ✅ Set up Airweave (cloud or self-hosted)
  • ✅ Created your first collection
  • ✅ Connected a data source with proper authentication
  • ✅ Made your first search query

Your data is now searchable and ready for your AI agents to use!

🎯 Pro Tip

For the best agent experience: Once you have multiple sources connected, try asking complex questions that span different data sources. Airweave’s semantic search will find relevant information across all your connected apps!

What’s Next?

Now that you have Airweave running, here are some powerful ways to extend your setup:

Get Support