Skip to main content

luciddreamer-agent

Agent framework for luciddreamer.ai — lucid dreaming journals, sleep tracking, and trigger management.

Features

  • Dream Logging — Record dreams with mood, lucidity level, characters, locations, tags
  • Sleep Session Tracking — Track sleep sessions with bedtime/wake time and quality
  • Lucid Trigger Management — Register and track effectiveness of MILD, WBTB, SSILD, and custom triggers
  • Dream Sign Pattern Recognition — Identify recurring dream signs and patterns
  • Export/Import — JSON serialization for backup and portability

Installation

pip install luciddreamer-agent

Quick Start

from datetime import date

from luciddreamer_agent import (
    LucidDreamerAgent,
    DreamMood,
    DreamEntry,
    SleepQuality,
    TriggerType,
)

agent = LucidDreamerAgent()

# Record a dream
dream = agent.record_dream(
    title="Flying over water",
    description="I realized I was dreaming and flew over a calm ocean.",
    mood=DreamMood.EUPHORIC,
    lucidity_level=2,
    characters=["myself"],
    locations=["ocean"],
    dream_signs=["flying", "water"],
)

# Record a sleep session
session = agent.record_sleep(
    sleep_date=date.today(),
    quality=SleepQuality.REFRESHING,
    notes="Good night, vivid dream around 4am",
)

# Register a trigger
agent.register_trigger(
    name="MILD",
    trigger_type=TriggerType.MILD,
    description="Repeat 'I will remember I'm dreaming' while falling asleep",
)

# Record trigger use and success
agent.record_trigger_attempt("MILD", lucid_achieved=True)

# Get recommendations
top_triggers = agent.suggest_triggers()
top_signs = agent.get_top_dream_signs()

# Stats
stats = agent.get_statistics()
print(f"Lucid dream rate: {stats['lucid_dream_rate']}")

API Overview

DreamEntry

dream = agent.record_dream(
    title="...",
    description="...",
    mood=DreamMood.VIVID,       # vivid, nightmare, neutral, euphoric, anxious, mysterious, joyful
    lucidity_level=2,           # 0=non-lucid, 1-3=lucidity awareness
    tags=["recurring"],
    characters=["dragon"],
    locations=["castle"],
    dream_signs=["falling"],
)

SleepSession

session = agent.record_sleep(
    sleep_date=date.today(),
    quality=SleepQuality.REFRESHING,
    bedtime=datetime(2024, 1, 1, 23, 0),
    wake_time=datetime(2024, 1, 2, 7, 0),
    triggers_attempted=["MILD"],
)

Triggers

trigger = agent.register_trigger(
    name="WBTB",
    trigger_type=TriggerType.WBTB,
    description="Wake after 5 hours, stay awake 30-60 min, go back to sleep",
    default_effectiveness=0.6,
)

Development

pip install -e .
pytest tests/

License

MIT

Metadata

Release files for luciddreamer-agent 0.2.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for luciddreamer-agent 0.2.2
File Size Uploaded Provenance Actions
luciddreamer_agent-0.2.2.tar.gz 9.5 kB Without provenance Details for luciddreamer_agent-0.2.2.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for luciddreamer-agent 0.2.2
File Interpreter ABI Platform Actions
luciddreamer_agent-0.2.2-py3-none-any.whl Python 3 none any Details for luciddreamer_agent-0.2.2-py3-none-any.whl

Total release size: 16.1 kB

Release files / luciddreamer_agent-0.2.2.tar.gz

Download URL luciddreamer_agent-0.2.2.tar.gz
Size 9.5 kB
Tags Source
SHA-256 checksum
How to use checksums
78e91e3b2438c1feb61d7ec7b160fa87db214746c9bac68e7d60648f7d23a516
BLAKE2b-256 checksum
How to use checksums
39d789411b1902a5d85e474717c386edf6da7d5f2ae8afb2003ef63003391085
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Release files / luciddreamer_agent-0.2.2-py3-none-any.whl

Download URL luciddreamer_agent-0.2.2-py3-none-any.whl
Size 6.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
f57ca990b6b369feffb52f728f91cbd44585fd248b2f782beabf6f5c196377e5
BLAKE2b-256 checksum
How to use checksums
6af33f5f352a8a91c903ea7e883fdc7d1ea25ea1647142818c182e6de31eea0c
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.3

Security for luciddreamer-agent 0.2.2

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page