Epsilla
HomeDiscordTwitterGithubEmail
  • Welcome
    • Register and Login
    • Explore App Portal
  • Build Your First AI Agent
    • Create a Knowledge Base
    • Set Up Your AI Agent
    • Publish Your AI Agent
  • Knowledge Base
    • Local Files
    • Website
    • Google Drive
    • S3
    • Notion
    • Share Point
    • Google Cloud Storage
    • Azure Blob Storage
    • Confluence
    • Jira
    • Advanced Settings
      • Auto Sync
      • Embedding
      • Data Parsing
      • Data Chunking
      • Hypothetical Questions
      • Webhook
      • Meta Data
    • Data Storage
    • Programmatically Manage Knowledge Bases
  • Application
    • Create New AI Agent
    • Basic Chat Agent Config
    • Basic Smart Search Agent Config
    • Advanced Workflow Customization
    • Publish and Deployment
    • User Engagement Analytics
  • Evaluation
    • Create New Evaluation
    • Run Evaluation
    • Evaluation Run History
  • Integration
  • Team Member Management
  • Project Management
  • Billing Management
  • Release Notes
  • Epsilla Vector Database
    • Overview
    • Quick Start
      • Run with Docker
      • Epsilla Cloud
    • User Manual
      • Connect to a database
      • Create a new table
      • Drop a table
      • Delete a database
      • Insert records
      • Upsert records
      • Search the top K semantically similar records
      • Retrieve records (with filters and pagination)
      • Delete records
      • Performance Tuning
    • Advanced Topics
      • Embeddings
      • Dense vector vs. sparse vector
      • Hybrid Search
    • Integrations
      • OpenAI
      • Mistral AI
      • Jina AI
      • Voyage AI
      • Mixedbread AI
      • Nomic AI
    • Roadmap
Powered by GitBook
On this page
  • 1. Installation
  • 2. Connect to Epsilla server
  • 3. Create or load a database
  • 4. Create a table
  • 5. Insert new records
  • 6. Search
  • 7. Drop a table
  • 5. Unload a database
  • Next steps​
  1. Epsilla Vector Database
  2. Quick Start

Run with Docker

You can locally deploy the open-source Epsilla vector database by using its Docker image.

PreviousQuick StartNextEpsilla Cloud

Last updated 7 months ago

1. Installation

To run the pre-built Epsilla docker image on your machine, make sure Docker is installed on your system. Then download image from .

docker pull epsilla/vectordb

Start the docker as the backend service

docker run --pull=always -d -p 8888:8888 epsilla/vectordb

Your Epsilla service is up and running. You can use REST API to interact with Epsilla, or install a Python/JavaScript client.

pip3 install --upgrade pyepsilla
npm install epsillajs

2. Connect to Epsilla server

from pyepsilla import vectordb

## connect to vectordb
db = vectordb.Client(
  host='localhost',
  port='8888'
)
const epsillajs = require('epsillajs');

// connect to vectordb
const db = new epsillajs.EpsillaDB({
  host: 'localhost',
  port: 9999
});
curl -X GET "http://localhost:8888"

Response

Welcome to Epsilla VectorDB.

Hint: if you are connecting to a secure server, use protocol parameter:

db = vectordb.Client(
  protocol='https',
  host=...
)
const db = new epsillajs.EpsillaDB({
    protocol: 'https',
    host: ...
});

3. Create or load a database

db.load_db(db_name="MyDB", db_path="/tmp/epsilla")
db.use_db(db_name="MyDB")
await db.loadDB('/tmp/epsilla', 'MyDB');
db.useDB("MyDB");
curl -X POST 'http://localhost:8888/api/load' \
    -d '{
        "path": "/tmp/epsilla",
        "name": "MyDB"
    }'

Response:

{
    "statusCode": 200,
    "message": "Load/Create MyDB successfully."
}

4. Create a table

db.create_table(
  table_name="MyTable",
  table_fields=[
    {"name": "ID", "dataType": "INT", "primaryKey": True},
    {"name": "Doc", "dataType": "STRING"}
  ],
  indices=[
    {"name": "Index", "field": "Doc"}
  ]
)
await db.createTable(
  'MyTable',
  [
    {"name": "ID", "dataType": "INT", "primaryKey": true},
    {"name": "Doc", "dataType": "STRING"}
  ],
  [
    {"name": "Index", "field": "Doc"}
  ]
);
curl -X POST 'http://localhost:8888/api/MyDB/schema/tables' \
    -d '{
        "name": "MyTable",
        "fields": [
          {
            "name": "ID",
            "dataType": "INT",
            "primaryKey": true
          },
          {
            "name": "Doc",
            "dataType": "STRING"
          }
        ],
        "indices": [
          {
            "name": "Index",
            "field": "Doc"
          }
        ]
     }'

Response:

{
    "statusCode":200,
    "message":"Create MyTable successfully."
}

5. Insert new records

You can insert multiple records in a batch.

db.insert(
  table_name="MyTable",
  records=[
    {"ID": 1, "Doc": "The garden was blooming with vibrant flowers, attracting butterflies and bees with their sweet nectar."},
    {"ID": 2, "Doc": "In the busy city streets, people rushed to and fro, hardly noticing the beauty of the day."},
    {"ID": 3, "Doc": "The library was a quiet haven, filled with the scent of old books and the soft rustling of pages."},
    {"ID": 4, "Doc": "High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below."},
    {"ID": 5, "Doc": "At the beach, children played joyfully in the sand, building castles and chasing the waves."},
    {"ID": 6, "Doc": "Deep in the forest, a deer cautiously stepped out, its ears alert for any signs of danger."},
    {"ID": 7, "Doc": "The old town's historical architecture spoke volumes about its rich cultural past."},
    {"ID": 8, "Doc": "Night fell, and the sky was a canvas of stars, shining brightly in the moon's soft glow."},
    {"ID": 9, "Doc": "A cozy cafe on the corner served the best hot chocolate, warming the hands and hearts of its visitors."},
    {"ID": 10, "Doc": "The artist's studio was cluttered but inspiring, filled with unfinished canvases and vibrant paints."}
  ]
)
await db.insert('MyTable',
  [
    {"ID": 1, "Doc": "The garden was blooming with vibrant flowers, attracting butterflies and bees with their sweet nectar."},
    {"ID": 2, "Doc": "In the busy city streets, people rushed to and fro, hardly noticing the beauty of the day."},
    {"ID": 3, "Doc": "The library was a quiet haven, filled with the scent of old books and the soft rustling of pages."},
    {"ID": 4, "Doc": "High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below."},
    {"ID": 5, "Doc": "At the beach, children played joyfully in the sand, building castles and chasing the waves."},
    {"ID": 6, "Doc": "Deep in the forest, a deer cautiously stepped out, its ears alert for any signs of danger."},
    {"ID": 7, "Doc": "The old town's historical architecture spoke volumes about its rich cultural past."},
    {"ID": 8, "Doc": "Night fell, and the sky was a canvas of stars, shining brightly in the moon's soft glow."},
    {"ID": 9, "Doc": "A cozy cafe on the corner served the best hot chocolate, warming the hands and hearts of its visitors."},
    {"ID": 10, "Doc": "The artist's studio was cluttered but inspiring, filled with unfinished canvases and vibrant paints."}
  ]
);
curl -X POST 'http://localhost:8888/api/MyDB/data/insert' \
  -d '{
        "table": "MyTable",
        "data": [
          {
            "ID": 1,
            "Doc": "The garden was blooming with vibrant flowers, attracting butterflies and bees with their sweet nectar."
          },
          {
            "ID": 2,
            "Doc": "In the busy city streets, people rushed to and fro, hardly noticing the beauty of the day."
          },
          {
            "ID": 3,
            "Doc": "The library was a quiet haven, filled with the scent of old books and the soft rustling of pages."
          },
          {
            "ID": 4,
            "Doc": "High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below."
          },
          {
            "ID": 5,
            "Doc": "At the beach, children played joyfully in the sand, building castles and chasing the waves."
          },
          {
            "ID": 6,
            "Doc": "Deep in the forest, a deer cautiously stepped out, its ears alert for any signs of danger."
          },
          {
            "ID": 7,
            "Doc": "The old town's historical architecture spoke volumes about its rich cultural past."
          },
          {
            "ID": 8,
            "Doc": "Night fell, and the sky was a canvas of stars, shining brightly in the moon's soft glow."
          },
          {
            "ID": 9,
            "Doc": "A cozy cafe on the corner served the best hot chocolate, warming the hands and hearts of its visitors."
          },
          {
            "ID": 10,
            "Doc": "The artist's studio was cluttered but inspiring, filled with unfinished canvases and vibrant paints."
          }
        ]
      }'          

Response:

{
    "statusCode": 200,
    "message": "Insert data to MyTable successfully."
}

6. Search

status_code, response = db.query(
  table_name="MyTable",
  query_text="Where can I find a serene environment, ideal for relaxation and introspection?",
  limit=2
)
print(response)

Output

{
  'message': 'Query search successfully.',
  'result': [
    {'Doc': 'The library was a quiet haven, filled with the scent of old books and the soft rustling of pages.', 'ID': 3},
    {'Doc': 'High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below.', 'ID': 4}
  ],
  'statusCode': 200
}
// search
const query = await db.query(
  'MyTable',
  {
    query: "Where can I find a serene environment, ideal for relaxation and introspection?",
    limit: 2
  }
);
console.log(JSON.stringify(query));

Output:

{
  "statusCode":200,
  "message":"Query search successfully.",
  "result":[
    {"Doc": "The library was a quiet haven, filled with the scent of old books and the soft rustling of pages.", "ID": 3},
    {"Doc": "High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below.", "ID": 4}
  ]
}
curl -X POST 'http://localhost:8888/api/MyDB/data/query' \
    -d '{
        "table": "MyTable",
        "query": "Where can I find a serene environment, ideal for relaxation and introspection?",
        "limit": 2
     }'        

Response:

{
    "statusCode": 200,
    "message": "Query search successfully.",
    "result": [
        {"Doc": "The library was a quiet haven, filled with the scent of old books and the soft rustling of pages.", "ID": 3},
        {"Doc": "High in the mountains, the air was crisp and clear, revealing breathtaking views of the valley below.", "ID": 4}
    ]
}

7. Drop a table

db.drop_table("MyTable")
await db.dropTable('MyTable');
curl -X DELETE 'http://localhost:8888/api/MyDB/schema/tables/MyTable'      

Response:

{
    "statusCode": 200,
    "message": "Drop MyTable from MyDB successfully."
}

5. Unload a database

Offload a database that is not in use to release memory (the database files are still on disk).

db.unload_db("MyDB")
await db.unloadDB('MyDB');
curl -X POST 'http://localhost:8888/api/MyDB/unload'      

Response:

{
    "statusCode": 200,
    "message": "Unload MyDB successfully."
}

Next steps

Epsilla is designed to be simple enough to get started. Refer to for more flexibility and options on each API.

We are tirelessly working to enhance Epsilla with more features. Please consult our to glimpse into the future developments.

Dockerhub
​
Vector Database
Roadmap