Quickstart
Usage
Basic Operations
Initialize and Start a Node
import asyncio
from vectrs.network import KademliaNode
from vectrs.database import VectorDBManager
async def start_node():
# Initialize node
node = KademliaNode(host='127.0.0.1', port=8468)
db_manager = VectorDBManager()
node.set_local_db_manager(db_manager)
# Start node
await node.start()
# Optional: Connect to existing network
await node.bootstrap('bootstrap_host', 8468)
return node
# Run the node
node = asyncio.run(start_node())Create Database
Vector Operations
Graph Operations
AI and RAG Features
You can provide your Claude API key in three ways:
Pass it directly to the Swarms constructor
Set it as an environment variable:
export ANTHROPIC_API_KEY=your-api-keyUse the CLI argument:
python -m vectrs start-node --anthropic_api_key your-api-key
Advanced Features
Graphine Search
Command Line Interface
Last updated