plugins/plugin-mysticism/README.md
Mystical divination engines for ElizaOS agents — Tarot, I Ching, and Astrology readings with progressive revelation, emotional attunement, and optional payment integration.
This plugin gives ElizaOS agents the ability to perform three classical divination systems as interactive, multi-turn conversations:
Each system follows a phased reading lifecycle: intake → casting → interpretation → synthesis → closing, allowing the agent to pace the experience naturally and respond to user feedback between revelations.
npm install @elizaos/plugin-mysticism@next
# or
bun add @elizaos/plugin-mysticism@next
@elizaos/core (v2.x)@elizaos/plugin-form for shared FORM service intake flowsAdd the plugin to your agent's character configuration:
{
"plugins": ["@elizaos/plugin-mysticism"]
}
Or import and register it directly:
import { mysticismPlugin } from "@elizaos/plugin-mysticism";
// Add to your agent's plugin list
const character = {
plugins: [mysticismPlugin],
};
| Action | Similes | Description |
|---|---|---|
TAROT_READING | READ_TAROT, DRAW_CARDS, TAROT_SPREAD, CARD_READING | Initiate a tarot card reading |
ICHING_READING | CAST_HEXAGRAM, CONSULT_ICHING, THROW_COINS, ORACLE_READING | Initiate an I Ching divination |
ASTROLOGY_READING | BIRTH_CHART, NATAL_CHART, HOROSCOPE_READING, ZODIAC_READING | Initiate a natal chart reading |
READING_FOLLOWUP | CONTINUE_READING, NEXT_CARD, NEXT_LINE, PROCEED_READING | Reveal the next element in an active reading |
DEEPEN_READING | EXPLORE_DEEPER, TELL_MORE, ELABORATE_READING | Provide deeper interpretation of a specific element |
REQUEST_PAYMENT | CHARGE_USER, ASK_FOR_PAYMENT | Request payment for a reading session |
CHECK_PAYMENT | VERIFY_PAYMENT, PAYMENT_STATUS | Verify payment status for the current session |
| Provider | Description |
|---|---|
READING_CONTEXT | Injects active reading session state into the agent's context |
ECONOMIC_CONTEXT | Provides payment history and revenue facts |
MYSTICAL_KNOWLEDGE | Grounds the agent's interpretations with domain-specific symbolism |
| Form | Description |
|---|---|
tarot-intake | Collects the user's question and preferred spread |
astrology-intake | Collects birth date, time, and location |
reading-feedback | Captures user reflection after each revealed element |
The plugin registers HTTP routes on the agent's API server:
| Method | Path | Description |
|---|---|---|
POST | /api/readings/tarot | Start a tarot reading |
POST | /api/readings/iching | Start an I Ching reading |
POST | /api/readings/astrology | Start an astrology reading |
GET | /api/readings/status | Poll reading session status |
curl -X POST http://localhost:3000/api/readings/tarot \
-H "Content-Type: application/json" \
-d '{
"entityId": "user-uuid",
"roomId": "room-uuid",
"question": "What should I focus on this month?",
"spreadId": "celtic_cross"
}'
curl -X POST http://localhost:3000/api/readings/astrology \
-H "Content-Type: application/json" \
-d '{
"entityId": "user-uuid",
"roomId": "room-uuid",
"birthYear": 1990,
"birthMonth": 6,
"birthDay": 15,
"birthHour": 14,
"birthMinute": 30,
"latitude": 40.7128,
"longitude": -74.006,
"timezone": -5
}'
Optional pricing parameters can be set via agentConfig.pluginParameters or environment variables:
| Parameter | Description | Default |
|---|---|---|
READING_PRICE_TAROT | Price in USDC base units for a tarot reading | 0 (free) |
READING_PRICE_ICHING | Price in USDC base units for an I Ching reading | 0 (free) |
READING_PRICE_ASTROLOGY | Price in USDC base units for an astrology reading | 0 (free) |
When prices are set to 0, the payment actions (REQUEST_PAYMENT, CHECK_PAYMENT) are effectively no-ops and readings proceed without a payment gate.
plugin-mysticism/
├── typescript/ # TypeScript implementation (published to npm)
│ ├── src/
│ │ ├── actions/ # Agent actions (tarot, iching, astrology, payment, followup)
│ │ ├── engines/ # Pure divination logic, no runtime dependencies
│ │ │ ├── tarot/ # 78-card deck, spreads, interpretation
│ │ │ ├── iching/ # 64 hexagrams, trigrams, coin casting
│ │ │ └── astrology/# Chart calculation, zodiac, aspects, houses
│ │ ├── forms/ # Intake and feedback form definitions
│ │ ├── providers/ # Context providers for the LLM
│ │ ├── routes/ # REST API endpoints
│ │ ├── services/ # MysticismService — session and state management
│ │ └── types.ts # Shared type definitions
│ └── __tests__/ # Vitest test suite
├── python/ # Python implementation of divination engines
├── rust/ # Rust implementation of divination engines
└── package.json # Root package (monorepo orchestration)
The engines (TarotEngine, IChingEngine, AstrologyEngine) are pure computational modules with no ElizaOS runtime dependency. They operate on structured data (JSON card decks, hexagram tables, zodiac definitions) and return typed results. This makes them independently testable and reusable outside the plugin context.
MysticismService manages reading session lifecycle, tracks per-entity active sessions, handles progressive reveal state, records user feedback, detects crisis language (with severity tiers and appropriate referral messaging), and integrates with the payment flow.
The service includes built-in crisis detection that scans user input for indicators of distress. When detected, the agent pauses the reading and provides appropriate mental health resource referrals rather than continuing with potentially harmful mystical interpretations.
# Install dependencies
bun install
# Build
bun run build
# Run tests
bun run test
# Type check
bun run typecheck
# Lint & format
bun run lint
bun run format
MIT