Skip to main content

Install

pip install velixar

Quick Start

from velixar import Velixar

v = Velixar(api_key="vlx_your_key")

# Store
memory_id = v.store("Staging database is in us-west-2", tags=["infrastructure"])

# Search
results = v.search("staging database")
for mem in results.memories:
    print(mem.content)

# Knowledge graph
graph = v.graph_traverse("PostgreSQL", depth=2)
for node in graph.nodes:
    print(f"{node.label} ({node.entity_type})")

# Identity
profile = v.get_identity()

# CI/CD webhook
v.webhook("deployment", "Deployed v1.0.0", version="1.0.0")

Async Client

from velixar import AsyncVelixar

async with AsyncVelixar(api_key="vlx_your_key") as v:
    memory_id = await v.store("async memory")
    results = await v.search("async")
    graph = await v.graph_traverse("PostgreSQL")

Configuration

v = Velixar(
    api_key="vlx_your_key",          # Required (or set VELIXAR_API_KEY env var)
    base_url="https://...",           # Optional — custom endpoint
    workspace_id="my-project",        # Optional — workspace isolation
    max_retries=3,                    # Optional
    timeout=30.0,                     # Optional (seconds)
)
The API key and base URL can also be set via VELIXAR_API_KEY and VELIXAR_BASE_URL environment variables.

Methods

Memory

MethodReturnsDescription
store(content, **opts)str (ID)Store a memory
search(query, **opts)SearchResultSemantic search
list(**opts)SearchResultPaginated list
get(id)MemoryGet by ID
update(id, **opts)boolUpdate content or tags
delete(id)boolDelete
store_many(memories)BatchStoreResponseBatch store

Knowledge Graph

MethodReturnsDescription
graph_traverse(entity, **opts)TraverseResultWalk relationships
graph_search(query, **opts)list[GraphEntity]Search entities
graph_entities(**opts)list[GraphEntity]List entities

Cognitive

MethodReturnsDescription
get_identity(**opts)dictUser profile
overview()dictKnowledge graph stats
contradictions()list[dict]Conflicting facts

Integration

MethodReturnsDescription
webhook(event_type, content, **opts)dictCI/CD event
health()dictHealth check

Types

from velixar import Memory, SearchResult, MemoryTier, GraphEntity, GraphRelation, TraverseResult
  • MemoryTier.PINNED (0), SESSION (1), SEMANTIC (2), ORGANIZATION (3)
  • GraphEntityid, entity_type, label, properties, relevance
  • GraphRelationsource, target, relation_type, weight
  • TraverseResultnodes: list[GraphEntity], edges: list[GraphRelation]

Error Handling

from velixar import VelixarError, AuthenticationError, RateLimitError, NotFoundError

try:
    v.get("nonexistent-id")
except NotFoundError:
    print("Memory not found")
except RateLimitError as e:
    print(f"Rate limited, retry after {e.retry_after}s")
except VelixarError as e:
    print(f"API error: {e}")

Source

github.com/VelixarAi/velixar-python