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.1.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.1-py3-none-any.whl (12.2 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: vrin-0.1.1.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.1.tar.gz
Algorithm Hash digest
SHA256 42f8a4ce315eda4d0bb585a5ab726c1bdf83d583a2ec162b9aea2dfb61b11767
MD5 5cab32ef8e4f3e5a9995c77a5dc9720e
BLAKE2b-256 c328a309ee2e66bb02c62dee4440c58972d852787a125c711b941d3234116f53

See more details on using hashes here.

File details

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

File metadata

  • Download URL: vrin-0.1.1-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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 07acfe2dc69445aa3b20b17ebbb1470e67c459263e2192bf4807d2615d8f64ca
MD5 a4d23616a833b2df41d8a84c413c090d
BLAKE2b-256 5efa998ea68b4b3edf0b1f71bf3ee30dc9e4b4eef21533176e4d2e3885c4139a

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