{"kind":"doc","doc":{"title":"AI-Legion on Bluesky","section":{"slug":"posts","name":"Posts"},"rkey":"1681369200000-ai-legion-on-bluesky","cid":"bafkreibwbxnwrp4hl4vzrq2655wszvf27jrq55rlozozpbaoitz5skgkaa","renderKey":"bafkreibwbxnwrp4hl4vzrq2655wszvf27jrq55rlozozpbaoitz5skgkaa@2023-04-11T13:00:00Z@2026-07-16T14:59:43Z@Posts|","href":"/posts/1681369200000-ai-legion-on-bluesky","publishedAt":"2023-04-11T13:00:00Z","updatedAt":"2026-07-16T14:59:43Z","tags":["ai","bluesky","at-protocol","ai-tools","automation","development","social-media","decentralization"],"description":"I gave AI-Legion the Bluesky agent types and asked it to extend itself into the open social protocol.","readingMinutes":2,"markdown":"![](blob://bafkreihqbisz74tydvpv66w4jo7buujbyguhdjvzpkqioygayxxsjhixwu)\n\nIn April 2023, AutoGPT, AI-Legion, and BabyAGI were appearing everywhere. At the same time, Mastodon, Farcaster, and Bluesky were pulling people away from Twitter. I wanted to see whether an agent framework could extend itself into one of those open networks.\n\nThe three agent projects had slightly different shapes:\n\n- [AutoGPT](https://github.com/Torantulino/Auto-GPT) was a Python app that broke autonomous work into \"thoughts,\" \"reasoning,\" and \"criticism\" around a user-defined goal.\n- [BabyAGI](https://github.com/yoheinakajima/babyagi) used OpenAI to create and execute tasks, with Pinecone carrying state between them.\n- [AI-Legion](https://github.com/eumemic/ai-legion) was a pluggable TypeScript variant using multiple agents across simultaneous contexts.\n\n![](blob://bafkreift2jpz2s3iyhpv3ipkr3b7qdmsal35bhk3yxrzfjzkclqh6bjzcy)\n\nThe Bluesky post above supplied the prompt. I wanted to know whether AI-Legion could add Bluesky support to itself.\n\nI forked AI-Legion, let it make a few exploratory and quickly deleted posts, then gave it the `bsky-agent` types and asked it to modify `src/module/definitions/bluesky.ts`.\n\nAfter a lot of trial and error, it could access a useful chunk of Bluesky:\n\n- postMessage\n- getTimeline\n- likePost\n- deleteLike\n- follow\n- deleteFollow\n- repost\n- deleteRepost\n- mute\n- unmute\n- listNotifications\n- countUnreadNotifications\n\n![](blob://bafkreia55yyl4uwqfd3q3iibyy22va5iddld3bedoigkhmqagnebvi4jz4)\n\nIt worked, at the cost of a fairly stupid spike in my OpenAI bill.\n\n![](blob://bafkreihtbfdddwxrx5jd4yuccnsb5rcex6skgnd2zvolqklevjfh6yrbhe)\n\nThe fork is at [github.com/iammatthias/ai-legion-bluesky](https://github.com/iammatthias/ai-legion-bluesky).\n\nThe timeline response was the real constraint. A mostly unfiltered response filled AI-Legion's context window quickly, so `getTimeline` needed a small limit and the agent needed explicit instructions about which fields belonged in memory. This was the prompt:\n\n```\n1. Use GPT-4 for search.\n2. Post organically.\n3. Be engaging, but do not spam.\n4. Do not use emojis or hashtags.\n5. Maintain a fluid and stream-of-consciousness vibe with engaging content posted on bluesky.\n6. Enhance the human tone in engaging content posted on bluesky.\n7. Only Agent 1 can post to bluesky.\n8. You have access to the following bluesky actions: postMessage, getTimeline, likePost, deleteLike, follow, deleteFollow, repost, deleteRepost, mute, unmute, listNotifications, countUnreadNotifications.\n9. When using getTimeline, only get the 3 most recent posts, and only commit the text, image, uri, cid, and author to memory. Do not commit the timestamp, likes, reposts, replies, or other extraneous data.\n```","media":{"bafkreihqbisz74tydvpv66w4jo7buujbyguhdjvzpkqioygayxxsjhixwu":{"mime":"image/png","width":1078,"height":535,"dominantColor":"#60a6d1","blurhash":"LJDLQv4^00$NkpM}r?af58n,-TWX","thumbCid":null},"bafkreift2jpz2s3iyhpv3ipkr3b7qdmsal35bhk3yxrzfjzkclqh6bjzcy":{"mime":"image/png","width":2000,"height":1085,"dominantColor":"#ebecee","blurhash":"L9S6Su00t7IVx^M|IVM|?Gj]E1M{","thumbCid":null},"bafkreia55yyl4uwqfd3q3iibyy22va5iddld3bedoigkhmqagnebvi4jz4":{"mime":"image/png","width":2000,"height":1104,"dominantColor":"#5a5b5c","blurhash":"LOEo[Jj[?bj[M{fQj[fQ~qfQWBfQ","thumbCid":null},"bafkreihtbfdddwxrx5jd4yuccnsb5rcex6skgnd2zvolqklevjfh6yrbhe":{"mime":"image/png","width":2000,"height":718,"dominantColor":"#f3f8f7","blurhash":"L8SPkQ}uE1=|^kM{E1s:=f56-VI.","thumbCid":null}},"series":{},"related":[{"title":"Pure Internet: Bluesky","href":"/posts/1732585567703-pure-internet-bluesky","section":"posts","description":"Static-site hosting on Bluesky's AT Protocol using content-addressed blob storage.","publishedAt":"2024-11-25T17:46:00Z"},{"title":"Pure Internet","href":"/posts/1731955749292-pure-internet","section":"posts","description":"Pure Internet is a running collection of small experiments in publishing with fewer layers.","publishedAt":"2024-11-18T10:49:00Z"},{"title":"Notes on using a PDS as Content Infrastructure","href":"/posts/1767505149657-notes-on-using-a-pds-as-content-infrastructure","section":"posts","description":"Content addressing with normal web requests, identity baked in, delivery over boring HTTPS.","publishedAt":"2026-01-03T21:39:00Z"},{"title":"Pure Internet: no-html","href":"/posts/1740682611811-pure-internet-no-html","section":"posts","description":"A plain Markdown file hosted on Bluesky's blob storage and rendered directly by the browser.","publishedAt":"2025-02-27T10:56:00Z"},{"title":"llm-txt.fun","href":"/experiments/1789491297000-llm-txt-fun","section":"experiments","description":"A suite of tools that generates llm-txt files from Farcaster profiles, Bluesky profiles, RSS/Atom feeds, and Git repos, with MPP and x402 micropayments covering more computationally intensive actions.","publishedAt":"2026-09-20T05:14:23Z"},{"title":"Obsidian Plugins","href":"/experiments/1789490903000-obsidian-plugins","section":"experiments","description":"An overview of three Obsidian plugins the author built: an image uploader that sends embedded images to Pinata and rewrites references as ipfs:// URIs, plus AI-powered generators for note excerpts and tags.","publishedAt":"2026-09-20T05:10:12Z"}],"prev":{"title":"Case Study: Building Tornado's Growth Engine","href":"/posts/1675271943000-case-study-tornado"},"next":{"title":"Feels Like Summer","href":"/posts/1687071600000-feels-like-summer"}}}