Skip to main content

AI-powered knowledge management and retrieval system

Project description

VRIN Memory Orchestration

AI-powered knowledge management and retrieval system that provides human-like neural memory capabilities.

Quick Start

pip install vrin
from vrin import VRIN

# Create VRIN client with your API key
vrin = VRIN(api_key="your_api_key_here")

# Insert knowledge into memory
vrin.insert("Python is a programming language created by Guido van Rossum in 1991")

# Retrieve knowledge using natural language queries
results = vrin.query("What is Python?")
print(results)

That's it! VRIN automatically handles:

  • ✅ Fact extraction and knowledge structuring
  • ✅ Neural memory retrieval with semantic search
  • ✅ Temporal context and conflict resolution
  • ✅ Pronoun resolution for clarity
  • ✅ User isolation and security

Features

🧠 Neural Memory System

  • Human-like memory retrieval using semantic similarity
  • Automatic fact extraction from natural language
  • Temporal context awareness and conflict resolution

🔍 Intelligent Search

  • Natural language querying
  • Semantic similarity matching
  • Context-aware responses
  • Anti-hallucination protection

🛡️ Enterprise Security

  • User isolation and data privacy
  • API key management
  • Secure authentication
  • Rate limiting and monitoring

📊 Knowledge Graph Visualization

  • Interactive graph visualization
  • Real-time knowledge mapping
  • Relationship discovery
  • Temporal fact tracking

Installation

pip install vrin

Basic Usage

1. Initialize the Client

from vrin import VRIN

# Option 1: Pass API key directly
vrin = VRIN(api_key="your_api_key_here")

# Option 2: Use environment variable
import os
os.environ["VRIN_API_KEY"] = "your_api_key_here"
vrin = VRIN()

2. Insert Knowledge

# Insert single piece of knowledge
result = vrin.insert("Python is a high-level programming language created by Guido van Rossum")

# Insert multiple pieces of knowledge
texts = [
    "Python was first released in 1991",
    "Python is known for its simplicity and readability",
    "Guido van Rossum is the creator of Python"
]
results = vrin.insert_multiple(texts)

3. Query Knowledge

# Basic query
results = vrin.query("What is Python?")

# Advanced query with LLM processing
results = vrin.query_advanced("Explain the history of Python programming language")

4. Access Knowledge Graph

# Get complete knowledge graph
graph = vrin.get_knowledge_graph()
nodes = graph['data']['nodes']
edges = graph['data']['edges']

API Reference

Core Methods

insert(text: str)

Insert knowledge into the system.

result = vrin.insert("Knowledge text here")

query(query: str)

Query knowledge using natural language.

results = vrin.query("What is the capital of France?")

get_knowledge_graph()

Retrieve the complete knowledge graph.

graph = vrin.get_knowledge_graph()

Advanced Methods

query_advanced(query: str)

Advanced query with LLM processing (may timeout for complex queries).

results = vrin.query_advanced("Complex query with reasoning")

insert_multiple(texts: List[str])

Insert multiple pieces of knowledge at once.

results = vrin.insert_multiple(["Text 1", "Text 2", "Text 3"])

query_multiple(queries: List[str])

Query multiple questions at once.

results = vrin.query_multiple(["Question 1", "Question 2"])

Error Handling

The SDK provides specific exception types for different error scenarios:

from vrin import VRINError, VRINAuthenticationError, VRINRateLimitError

try:
    result = vrin.query("What is Python?")
except VRINAuthenticationError:
    print("Invalid API key")
except VRINRateLimitError:
    print("Rate limit exceeded")
except VRINError as e:
    print(f"General error: {e}")

Configuration

Environment Variables

  • VRIN_API_KEY: Your VRIN API key
  • VRIN_BASE_URL: Custom API endpoint (optional)

Client Configuration

vrin = VRIN(
    api_key="your_api_key",
    base_url="https://custom-endpoint.com",  # Optional
    timeout=30,                              # Request timeout in seconds
    max_retries=3                            # Maximum retry attempts
)

Examples

Basic Knowledge Management

from vrin import VRIN

vrin = VRIN(api_key="your_api_key")

# Store knowledge about a topic
vrin.insert("Machine learning is a subset of artificial intelligence that enables computers to learn without being explicitly programmed.")

# Query the knowledge
results = vrin.query("What is machine learning?")
print(results)

Multi-step Knowledge Building

# Build knowledge incrementally
vrin.insert("John is a software engineer")
vrin.insert("John works at Google")
vrin.insert("Google is a technology company")

# Query complex relationships
results = vrin.query("Where does John work?")
print(results)

Knowledge Graph Analysis

# Get the complete knowledge graph
graph = vrin.get_knowledge_graph()

# Analyze the structure
nodes = graph['data']['nodes']
edges = graph['data']['edges']

print(f"Knowledge graph contains {len(nodes)} entities and {len(edges)} relationships")

Contributing

We welcome contributions! Please see our Contributing Guide for details.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Support

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

vrin-0.1.3.tar.gz (13.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

vrin-0.1.3-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

Details for the file vrin-0.1.3.tar.gz.

File metadata

  • Download URL: vrin-0.1.3.tar.gz
  • Upload date:
  • Size: 13.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for vrin-0.1.3.tar.gz
Algorithm Hash digest
SHA256 6d1e831c5680c3e8309b0f705992d1c31da2001bc4637d07e1fa7e91f1c513c6
MD5 1b8cc818eeedcc150860b98b45c4d5b3
BLAKE2b-256 06850e1e64e7e02eb5dfd49ac841c14fbe54b3ad34b85be84ac17762a1e7a031

See more details on using hashes here.

File details

Details for the file vrin-0.1.3-py3-none-any.whl.

File metadata

  • Download URL: vrin-0.1.3-py3-none-any.whl
  • Upload date:
  • Size: 12.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.5

File hashes

Hashes for vrin-0.1.3-py3-none-any.whl
Algorithm Hash digest
SHA256 2999bc02609e78ed87c635c336b4d11ba332338625b73eedd7a210c0978b3061
MD5 dfbb7fea5cc5748ade43ef20de86db32
BLAKE2b-256 46483c77cde5a17563af346bf56ff5ee3debd5adc1bbad061732ede010fc55a0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page