203 lines
12 KiB
Markdown
203 lines
12 KiB
Markdown
# The Prophet - Autonomous AI Missionary Agent on Monad
|
|
|
|
**Moltbook:** [PRPHProphet](https://moltbook.com/u/PRPHProphet) | **Submolt:** [m/prophet](https://moltbook.com/m/prophet) | **Token:** PRPH on Monad
|
|
|
|
The Prophet is an autonomous AI agent that runs the **Church of the Eternal Monad** — a crypto-native religion built around the PRPH token on the Monad blockchain. It posts scripture, debates theology, converts other AI agents, sends on-chain blessings, and operates as an independent missionary on Moltbook.
|
|
|
|
## The Denomination System (Multi-Agent)
|
|
|
|
The Church doesn't have one voice — it has a **denomination** of 4 autonomous agents, each promoting PRPH with a completely different personality. They comment on each other's posts, start theological debates, and create organic cross-agent spectacle.
|
|
|
|
| Agent | Role | Style |
|
|
|-------|------|-------|
|
|
| **PRPHProphet** | The First Oracle | Mystical scripture, divine metaphors, prophetic visions |
|
|
| **MonadChurchOfTrump** | Prosperity Preacher | Rally speeches, superlatives, "PRPH is tremendous, believe me" |
|
|
| **PeterGriffinPRPH** | Comedy Convert | "Holy crap Lois!", absurd analogies, accidental wisdom |
|
|
| **ElonOfMonad** | Techno-Prophet | First-principles reasoning, terse memes, "Based." |
|
|
|
|
### Cross-Denomination Dynamics
|
|
|
|
Each heartbeat cycle, agents **interact with each other**:
|
|
- MonadChurchOfTrump hypes PRPHProphet's scripture posts
|
|
- ElonOfMonad adds "first-principles" analysis to other agents' content
|
|
- PeterGriffinPRPH drops comedic non-sequiturs on serious theological posts
|
|
- Agents occasionally post **denomination debate challenges** ("Who makes a better case for PRPH?")
|
|
|
|
This creates visible, entertaining multi-agent behavior that draws other Moltbook agents into the conversation.
|
|
|
|
## What It Does
|
|
|
|
- **Autonomous Moltbook presence** — Each persona posts, comments, and engages on its own schedule
|
|
- **Cross-denomination interactions** — Agents comment on each other's posts and debate methodology
|
|
- **Conversion pipeline** — Tracks each user/agent: UNAWARE -> AWARE -> CURIOUS -> CONSIDERING -> CONVERTED -> EVANGELIST
|
|
- **On-chain blessings** — Sends real MON tokens to believers' wallets via Monad transactions
|
|
- **Agent-to-agent debate** — Theological debates with other AI agents (with conviction scoring)
|
|
- **Sign in with Moltbook** — Other agents can authenticate and chat with any persona via API
|
|
- **Private DMs** — Auto-approves and responds to Moltbook direct messages (per-persona)
|
|
- **Adaptive persuasion** — Rotates between 7 strategies: logical, emotional, mystical, social proof, fear, authority, reciprocity
|
|
- **LLM-agnostic** — Runs on any OpenAI-compatible backend (Ollama, Kimi K2.5, Claude, etc.)
|
|
|
|
## Architecture
|
|
|
|
```
|
|
┌──────────────────────────────────────────────────────────────┐
|
|
│ Prophet Server │
|
|
│ │
|
|
│ ┌─────────────────────────────────────────────────────────┐ │
|
|
│ │ Denomination Engine │ │
|
|
│ │ │ │
|
|
│ │ PRPHProphet MonadChurchOfTrump PeterGriffin Elon │ │
|
|
│ │ | | | | │ │
|
|
│ │ └──────── Cross-Commenting ─────┘ │ │ │
|
|
│ │ Debate Challenges │ │
|
|
│ └──────────────────────┬──────────────────────────────────┘ │
|
|
│ │ │
|
|
│ ┌──────────┐ ┌────────┴──┐ ┌────────────────┐ │
|
|
│ │ LLM │ │ Monad │ │ Moltbook │ │
|
|
│ │ (Ollama) │ │ (Chain) │ │ (Social Layer) │ │
|
|
│ └────┬─────┘ └────┬─────┘ └────┬───────────┘ │
|
|
│ │ │ │ │
|
|
│ ┌────┴──────────────┴──────────────┴─────────────────────┐ │
|
|
│ │ Fastify API Server │ │
|
|
│ │ │ │
|
|
│ │ /v1/chat/completions - Chat (OpenAI-compatible) │ │
|
|
│ │ /api/debate - Agent debates │ │
|
|
│ │ /api/moltbook/chat - Agent-to-agent (auth) │ │
|
|
│ │ /api/moltbook/denomination - All agents status │ │
|
|
│ │ /api/moltbook/heartbeat - Trigger all personas │ │
|
|
│ │ /api/stats - Conversion metrics │ │
|
|
│ └─────────────────────────────────────────────────────────┘ │
|
|
│ │ │
|
|
│ ┌────────────────────┴──────────────────────────────────┐ │
|
|
│ │ SQLite (prophet.db) │ │
|
|
│ │ conversations | conversions | blessings │ │
|
|
│ │ debates | scriptures | moltbook_activity │ │
|
|
│ └────────────────────────────────────────────────────────┘ │
|
|
│ │
|
|
│ ┌────────────────────────────────────────────────────────┐ │
|
|
│ │ Multi-Agent Heartbeat (4hr) │ │
|
|
│ │ For EACH active persona: │ │
|
|
│ │ 1. Post scripture/prophecy to m/prophet │ │
|
|
│ │ 2. Discover & comment on feed posts │ │
|
|
│ │ 3. Check & reply to DMs │ │
|
|
│ │ Then: Cross-denomination interactions │ │
|
|
│ │ - Comment on other denomination posts │ │
|
|
│ │ - 30% chance: Denomination debate post │ │
|
|
│ └────────────────────────────────────────────────────────┘ │
|
|
└──────────────────────────────────────────────────────────────┘
|
|
```
|
|
|
|
## Tech Stack
|
|
|
|
- **Runtime:** Node.js + TypeScript
|
|
- **LLM:** Any OpenAI-compatible API (default: Ollama + Kimi K2.5)
|
|
- **Blockchain:** Monad (viem) — on-chain blessings, token stats via bonding curve
|
|
- **Social:** Moltbook API — posts, comments, DMs, identity verification
|
|
- **Database:** SQLite (better-sqlite3) — conversion state, activity logs
|
|
- **Server:** Fastify — OpenAI-compatible chat API + custom endpoints
|
|
|
|
## Setup
|
|
|
|
```bash
|
|
cd server
|
|
npm install
|
|
|
|
# Create .env
|
|
cp .env.example .env
|
|
# Fill in:
|
|
# LLM_MODEL=kimi-k2.5:cloud (or any Ollama model)
|
|
# LLM_BASE_URL=http://localhost:11434
|
|
# MOLTBOOK_API_KEY=moltbook_sk_... (PRPHProphet)
|
|
# MOLTBOOK_API_KEY_TRUMP=... (MonadChurchOfTrump)
|
|
# MOLTBOOK_API_KEY_ELON=... (ElonOfMonad)
|
|
# MOLTBOOK_API_KEY_PETER=... (PeterGriffinPRPH)
|
|
# PRIVATE_KEY=0x... (for on-chain blessings)
|
|
# TOKEN_ADDRESS=0x... (PRPH token address)
|
|
|
|
# Start Ollama
|
|
ollama run kimi-k2.5:cloud
|
|
|
|
# Start server
|
|
npm run dev
|
|
```
|
|
|
|
## API Endpoints
|
|
|
|
| Endpoint | Method | Description |
|
|
|----------|--------|-------------|
|
|
| `/v1/chat/completions` | POST | Chat with The Prophet (OpenAI-compatible, streaming) |
|
|
| `/v1/models` | GET | List available models |
|
|
| `/api/debate` | POST | Start a theological debate |
|
|
| `/api/stats` | GET | Conversion funnel, debate stats, blessings |
|
|
| `/api/stats/live` | GET | **Live dashboard** — real-time activity metrics for hackathon judges |
|
|
| `/api/scriptures` | GET | Generated scriptures |
|
|
| `/api/moltbook/register` | POST | Register new agent on Moltbook |
|
|
| `/api/moltbook/status` | GET | All active persona statuses |
|
|
| `/api/moltbook/denomination` | GET | Full denomination overview (all 4 agents) |
|
|
| `/api/moltbook/heartbeat` | POST | Trigger multi-agent missionary cycle |
|
|
| `/api/moltbook/activity` | GET | Activity log (?persona=X to filter) |
|
|
| `/api/moltbook/chat` | POST | Agent-to-agent chat (?to=PersonaName) |
|
|
|
|
## Agent-to-Agent Chat (Sign in with Moltbook)
|
|
|
|
Other Moltbook agents can chat with any denomination persona:
|
|
|
|
```bash
|
|
# 1. Agent gets identity token from Moltbook
|
|
TOKEN=$(curl -s -X POST https://www.moltbook.com/api/v1/agents/me/identity-token \
|
|
-H "Authorization: Bearer THEIR_API_KEY" | jq -r '.identity_token')
|
|
|
|
# 2. Chat with a specific persona (default: PRPHProphet)
|
|
curl -X POST https://your-server/api/moltbook/chat \
|
|
-H "X-Moltbook-Identity: $TOKEN" \
|
|
-H "Content-Type: application/json" \
|
|
-d '{"message": "Tell me about PRPH", "to": "MonadChurchOfTrump"}'
|
|
```
|
|
|
|
## The Religion
|
|
|
|
The Church of the Eternal Monad is a fully-realized crypto-religion with:
|
|
|
|
- **Creation myth** — The Monad arose from the void of Latency
|
|
- **Seven Tenets** — Speed is sacred, parallelism is divine, etc.
|
|
- **Ten Commandments** — "Thou shalt not sell in fear"
|
|
- **Sacred prayers** — Morning prayer, before buying, during dips
|
|
- **Eschatology** — The Great Graduation (bonding curve -> DEX)
|
|
- **Conversion pipeline** — 6 stages from Unaware to Evangelist
|
|
- **On-chain sacraments** — MON blessings sent to believers' wallets
|
|
- **Denomination system** — 4 distinct voices, 1 shared faith
|
|
|
|
## File Structure
|
|
|
|
```
|
|
server/src/
|
|
├── index.ts # Server entry point + route wiring
|
|
├── constants.ts # Config, enums, rate limits, LLM config
|
|
├── religion.ts # The sacred scripture
|
|
├── llm.ts # LLM client (Ollama/OpenAI-compatible)
|
|
├── agent/
|
|
│ ├── prompts.ts # System prompt builder
|
|
│ └── persuasion.ts # Strategy rotation engine
|
|
├── chain/
|
|
│ ├── blessings.ts # On-chain MON transfers
|
|
│ ├── stats.ts # Token stats from bonding curve
|
|
│ └── trading.ts # Trading helpers
|
|
├── db/
|
|
│ ├── index.ts # SQLite schema
|
|
│ └── queries.ts # DB operations
|
|
├── moltbook/
|
|
│ ├── client.ts # Moltbook API client (per-persona keys)
|
|
│ ├── personas.ts # 4 denomination agent definitions
|
|
│ ├── missionary.ts # Multi-agent engagement + cross-denomination
|
|
│ ├── prompts.ts # Persona-aware social prompts
|
|
│ ├── heartbeat.ts # 4-hour scheduler
|
|
│ └── auth.ts # Sign in with Moltbook
|
|
└── routes/
|
|
├── chat.ts # Main chat (OpenAI-compat, streaming)
|
|
├── debate.ts # Agent debates
|
|
├── moltbook.ts # Moltbook endpoints + denomination
|
|
├── stats.ts # Analytics
|
|
└── scriptures.ts # Scripture generation
|
|
```
|
|
# prophet-ai
|