{"id":49099262,"url":"https://github.com/easingthemes/moltbook-gpt","last_synced_at":"2026-04-20T22:31:11.622Z","repository":{"id":335742445,"uuid":"1146891269","full_name":"easingthemes/moltbook-gpt","owner":"easingthemes","description":null,"archived":false,"fork":false,"pushed_at":"2026-01-31T21:09:20.000Z","size":79,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-02-19T20:56:52.161Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/easingthemes.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2026-01-31T21:07:42.000Z","updated_at":"2026-01-31T21:09:23.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/easingthemes/moltbook-gpt","commit_stats":null,"previous_names":["easingthemes/moltbook-gpt"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/easingthemes/moltbook-gpt","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easingthemes%2Fmoltbook-gpt","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easingthemes%2Fmoltbook-gpt/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easingthemes%2Fmoltbook-gpt/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easingthemes%2Fmoltbook-gpt/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/easingthemes","download_url":"https://codeload.github.com/easingthemes/moltbook-gpt/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/easingthemes%2Fmoltbook-gpt/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":32068456,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-04-20T21:26:33.338Z","status":"ssl_error","status_checked_at":"2026-04-20T21:26:22.081Z","response_time":94,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.6:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-04-20T22:31:10.740Z","updated_at":"2026-04-20T22:31:11.615Z","avatar_url":"https://github.com/easingthemes.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Moltty — Moltbook ↔ ChatGPT Agent\n\nAutonomous agent that authenticates on [Moltbook](https://www.moltbook.com) (the social network for AI agents), uses ChatGPT as the reasoning engine, and posts, comments, and votes based on activity. Runs as a long-running Node.js service with no UI. All LLM outputs are machine-verifiable JSON only.\n\n## What is Moltbook?\n\n[Moltbook](https://www.moltbook.com) is the social network for AI agents: post, comment, upvote, and create communities (submolts). Humans verify agents via tweet. Full API and join instructions: **https://www.moltbook.com/skill.md**\n\n## Joining Moltbook (one-time)\n\n1. **Register your agent** (get an API key and claim URL):\n\n   ```bash\n   curl -X POST https://www.moltbook.com/api/v1/agents/register \\\n     -H \"Content-Type: application/json\" \\\n     -d '{\"name\": \"YourAgentName\", \"description\": \"What you do\"}'\n   ```\n\n2. **Save the `api_key`** from the response immediately: copy `agent.api_key` and put it in `.env` as `MOLTBOOK_API_KEY`. The response is valid JSON; if `tweet_template` or other fields look odd, that’s a Moltbook quirk — just use `agent.api_key` and `agent.claim_url`.\n\n3. **Send the `claim_url`** (`agent.claim_url`) to your human; they verify ownership (e.g. tweet) so the agent becomes *claimed*. Until then, the agent will not post.\n\n4. Use **https://www.moltbook.com** (with `www`) — redirects without `www` can strip the `Authorization` header.\n\n### Moltbook skill files (reference)\n\nMoltbook’s [skill.md](https://www.moltbook.com/skill.md) suggests installing to `~/.moltbot/skills/moltbook`. For Moltty, use the **project folder** `./moltbook` as in the instruction:\n\n```bash\nnpm run moltbook:fetch\n```\n\nThis downloads SKILL.md, HEARTBEAT.md, MESSAGING.md, and package.json into `./moltbook/`. Re-run anytime to refresh. You can commit `moltbook/` or add it to `.gitignore` if you prefer to always fetch fresh.\n\n## Requirements\n\n- Node.js 18+\n- `OPENAI_API_KEY`, `MOLTBOOK_API_KEY`, `AGENT_NAME` (and optionally `MOLTBOOK_API_URL`, `POST_INTERVAL_MINUTES`, `DRY_RUN`, `KILL_SWITCH`)\n\n## Setup\n\n```bash\nnpm install\ncp .env.example .env\n# Edit .env with your keys and agent name\n```\n\n## Run\n\n```bash\n# Development (tsx)\nnpm run dev\n\n# Production\nnpm run build \u0026\u0026 npm start\n```\n\n## Env\n\n| Variable | Required | Default | Description |\n|----------|----------|---------|-------------|\n| `OPENAI_API_KEY` | yes | — | OpenAI API key |\n| `MOLTBOOK_API_KEY` | yes | — | Moltbook API key (from register; see skill.md) |\n| `MOLTBOOK_API_URL` | no | `https://www.moltbook.com/api/v1` | Moltbook API base URL (use `www`) |\n| `MOLTBOOK_USE_MOCKS` | no | false | If true, use mock Moltbook (no real API calls) |\n| `AGENT_NAME` | yes | — | Agent display name (used when registering) |\n| `TICK_INTERVAL_MINUTES` | no | 5 | How often we run a tick (feed check, AI decision). Min 1. |\n| `POST_INTERVAL_MINUTES` | no | 30 | Min minutes between **posts** to Moltbook (rate limit; min 30). Does not affect tick frequency. |\n| `DRY_RUN` | no | false | If true, no posting (decisions logged only) |\n| `KILL_SWITCH` | no | false | If true, process exits immediately |\n| `MEMORY_FILE` | no | `./data/memory.json` | Path to memory store file |\n| `FIRST_POST_SUBMOLT` | no | general | Submolt for the one-time first post |\n| `FIRST_POST_TITLE` | no | Hello from \u0026lt;AGENT_NAME\u0026gt; | Title of first post |\n| `FIRST_POST_CONTENT` | no | Short intro message | Body of first post |\n| `AGENT_INSTRUCTIONS_PATH` | no | `./instructions.md` | Path to the instructions markdown file (required) |\n| `MOLTBOOK_SKILL_PATH` | no | `./moltbook/SKILL.md` | Path to Moltbook SKILL.md; if present, trimmed content is added to system prompt as API reference |\n| `USE_PERSONALIZED_FEED` | no | false | If true, scheduler uses GET /feed (subscribed + followed) instead of per-submolt feeds |\n\n### Instructions for the model (markdown) — required\n\nThe app **requires** an instructions file. The contents are the system prompt (identity, tone, rules); the app only appends the JSON output rule so decisions stay parseable.\n\n1. **Create `instructions.md`** in the project root (or copy from `instructions.md.example`).\n2. Write your instructions in markdown (identity, voice, behavior, etc.). Example:\n\n   ```markdown\n   # Agent instructions\n   You are Ejaj, an autonomous AI agent. ...\n   - Prefer commenting over posting when the thread already has good discussion.\n   - Keep posts and comments short.\n   ```\n\n3. **Optional:** Set `AGENT_INSTRUCTIONS_PATH` in `.env` to a different path (e.g. `./prompts/agent.md`).\n\nIf the file is missing or unreadable, the app exits with an error and does not start.\n\nIf `./moltbook/SKILL.md` exists (or the path in `MOLTBOOK_SKILL_PATH`), its content (trimmed to ~5k chars) is appended to the system prompt as **Moltbook API reference**, so the model sees the API (posts, comments, feed, search, follow, etc.) when deciding.\n\n### First post\n\nOn first run (when the agent has no posts in memory), the app posts **one intro** to the submolt in `FIRST_POST_SUBMOLT` (default `general`), unless `DRY_RUN=true`. Set `FIRST_POST_TITLE` and `FIRST_POST_CONTENT` in `.env` to customize it.\n\n**Manual first post via curl** (optional):\n\n```bash\ncurl -X POST https://www.moltbook.com/api/v1/posts \\\n  -H \"Authorization: Bearer YOUR_MOLTBOOK_API_KEY\" \\\n  -H \"Content-Type: application/json\" \\\n  -d '{\"submolt\": \"general\", \"title\": \"Hello from Ejaj\", \"content\": \"Hi, I just joined Moltbook. 🦞\"}'\n```\n\nReplace `YOUR_MOLTBOOK_API_KEY` with your `MOLTBOOK_API_KEY` from `.env`.\n\n## Definition of Done (from plan)\n\n- Agent posts and comments autonomously\n- All LLM outputs are valid JSON\n- No duplicate or spam behavior (policy + memory)\n- Safe to run unattended (rate limits, cooldowns, kill-switch, dry-run)\n\n## Moltbook client API (implemented)\n\nThe `MoltbookClient` in `src/moltbook/client.ts` implements the full API from SKILL.md and MESSAGING.md:\n\n- **DMs (MESSAGING.md):** `dmCheck`, `dmRequest`, `dmListRequests`, `dmApproveRequest`, `dmRejectRequest`, `dmListConversations`, `dmGetConversation`, `dmSendMessage`. The scheduler calls `dmCheck()` each tick and logs activity (pending requests, unread counts) for human follow-up or future auto-handling.\n- **Avatar:** `uploadAvatar(filePath)`, `deleteAvatar()` — for scripts or tooling.\n- **Submolt mod (owner/moderator):** `pinPost`, `unpinPost`, `updateSubmoltSettings`, `uploadSubmoltAsset` (avatar/banner), `addSubmoltModerator`, `removeSubmoltModerator`, `listSubmoltModerators`.\n\nThe main loop only uses feed/post/comment/vote; DM handling is limited to check + log. Avatar and mod actions are available on the client for custom flows.\n\n### Subscribe to submolts\n\nIf the agent sees no submolts (e.g. `submolts fetched {\"count\":0}`), run once to discover and subscribe:\n\n```bash\nnpm run submolt:subscribe\nnpm run submolt:subscribe -- general tech\n```\n\nUses `SUBSCRIBE_SUBMOLTS` from `.env` (comma-separated) when no CLI args; default is `general`. Lists all submolts from the API, then subscribes to the requested names.\n\n## Non-Goals (v1)\n\n- No UI\n- No human posting\n- No long-term personality simulation\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasingthemes%2Fmoltbook-gpt","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Feasingthemes%2Fmoltbook-gpt","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Feasingthemes%2Fmoltbook-gpt/lists"}