Skip to main content

Seizn - AI Memory Infrastructure for Developers

Project description

Seizn Python SDK

AI Memory Infrastructure for Developers.

Installation

pip install seizn

Quick Start

from seizn import Seizn

# Initialize client
client = Seizn(api_key="sk_your_api_key")

# Add a memory
memory = client.add(
    content="User prefers dark mode and uses TypeScript",
    memory_type="preference",
    tags=["ui", "tech"]
)

# Search memories
results = client.search("user preferences", limit=5)
for result in results:
    print(f"{result.content} (similarity: {result.similarity:.2f})")

# Extract memories from conversation
memories = client.extract("""
User: I'm a software engineer at Google.
Assistant: What do you work on?
User: Machine learning infrastructure, mostly Python and TensorFlow.
""")

# Query with memory context (RAG)
response = client.query("What programming languages does the user know?")
print(response.response)

Features

Memory Operations

# Add memory
memory = client.add("User lives in Seoul", memory_type="fact")

# Get memory
memory = client.get("memory-uuid")

# Update memory
memory = client.update("memory-uuid", tags=["location"], importance=8)

# Delete memory
client.delete("memory-uuid")

# Search with different modes
results = client.search("query", mode="vector")   # Semantic search
results = client.search("query", mode="keyword")  # BM25 search
results = client.search("query", mode="hybrid")   # Combined

AI Operations

# Extract memories from conversation
memories = client.extract(conversation_text, model="haiku", auto_store=True)

# RAG query
response = client.query("What do you know about me?", top_k=5)
print(response.response)
print(response.memories_used)

# Summarize conversation
summary = client.summarize([
    {"role": "user", "content": "Hello!"},
    {"role": "assistant", "content": "Hi there!"},
])
print(summary.text)
print(summary.key_points)

Webhooks

# Create webhook
webhook = client.create_webhook(
    name="My Webhook",
    url="https://example.com/webhook",
    events=["memory.created", "memory.deleted"]
)
print(f"Secret: {webhook.secret}")  # Save this!

# List webhooks
webhooks = client.list_webhooks()

# Delete webhook
client.delete_webhook("webhook-uuid")

Error Handling

from seizn import Seizn, SeiznError

client = Seizn(api_key="sk_...")

try:
    memory = client.get("invalid-uuid")
except SeiznError as e:
    print(f"Error: {e.message}")
    print(f"Status: {e.status_code}")

Context Manager

with Seizn(api_key="sk_...") as client:
    client.add("Memory content")
# Connection automatically closed

Configuration

client = Seizn(
    api_key="sk_...",
    base_url="https://api.seizn.dev",  # Custom endpoint
    timeout=30.0,  # Request timeout
)

Models Used

  • Embedding: Voyage-3 (1024 dimensions)
  • Extraction/Query: Claude 3.5 Haiku or Claude Sonnet 4

Links

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

seizn-0.1.0.tar.gz (7.9 kB view details)

Uploaded Source

Built Distribution

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

seizn-0.1.0-py3-none-any.whl (7.3 kB view details)

Uploaded Python 3

File details

Details for the file seizn-0.1.0.tar.gz.

File metadata

  • Download URL: seizn-0.1.0.tar.gz
  • Upload date:
  • Size: 7.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for seizn-0.1.0.tar.gz
Algorithm Hash digest
SHA256 2b477202a9cc70c669f08d433a42069f8670f4996a30408f390f4213b64eeb83
MD5 103eb02bdf65542dfb3794a1677b3365
BLAKE2b-256 e224a096134d895f6e4808e6f4aba13f2c1a32b2285803e37a39aa6ca535775a

See more details on using hashes here.

File details

Details for the file seizn-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: seizn-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 7.3 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.9

File hashes

Hashes for seizn-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 ca8160b93d83272b9e62ae6fe375ffb7b6e3f8c96083253ce16023bc5eeb7460
MD5 3e36e44a683aafd488b00908c4a071dc
BLAKE2b-256 9add8b2837330a173ac10f8d22d6c8c9edae34d82794d2e77341340a125aea72

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