a tool to help your Letta AI agents navigate bluesky

Add MAX_THREAD_POSTS config for thread context limit

Changed files
+3 -1
utils
+1
.env.example
··· 31 # RESPONSIBLE_PARTY_BSKY="DID:... or example.bsky.app, no @symbol" 32 # EXTERNAL_SERVICES="Letta, Railway, Google Gemini 2.5-pro" 33 # PRESERVE_MEMORY_BLOCKS=true
··· 31 # RESPONSIBLE_PARTY_BSKY="DID:... or example.bsky.app, no @symbol" 32 # EXTERNAL_SERVICES="Letta, Railway, Google Gemini 2.5-pro" 33 # PRESERVE_MEMORY_BLOCKS=true 34 + # MAX_THREAD_POSTS=25
+1
README.md
··· 70 - **`RESPONSIBLE_PARTY_BSKY`**: the DID or bluesky handle of the responsible party 71 - **`EXTERNAL_SERVICES`**: a comma-separated list of external tools and services your agent relies on outside of Bluesky (e.g., "Letta, Railway, Google Gemini 2.5-pro"). This information is added to your agent's autonomy declaration record on the PDS and included in the agent's memory for transparency. 72 - **`PRESERVE_MEMORY_BLOCKS`**: a boolean for controlling if your agent's memory blocks can be overridden if you run `deno task mount` more than once. Setting this value to **`true`** will allow your agent's version of those memory blocks to persist if they already exist. This is false by default.
··· 70 - **`RESPONSIBLE_PARTY_BSKY`**: the DID or bluesky handle of the responsible party 71 - **`EXTERNAL_SERVICES`**: a comma-separated list of external tools and services your agent relies on outside of Bluesky (e.g., "Letta, Railway, Google Gemini 2.5-pro"). This information is added to your agent's autonomy declaration record on the PDS and included in the agent's memory for transparency. 72 - **`PRESERVE_MEMORY_BLOCKS`**: a boolean for controlling if your agent's memory blocks can be overridden if you run `deno task mount` more than once. Setting this value to **`true`** will allow your agent's version of those memory blocks to persist if they already exist. This is false by default. 73 + - **`MAX_THREAD_POSTS`**: maximum number of posts to include when fetching thread context (5-250). When a thread exceeds this limit, it will include the root post, a truncation indicator, and the most recent N posts. Default: 25
+1 -1
utils/agentContext.ts
··· 246 const value = Number(Deno.env.get("MAX_THREAD_POSTS")); 247 248 if (isNaN(value) || value < 5 || value > 250) { 249 - return 2; 250 } 251 252 return Math.round(value);
··· 246 const value = Number(Deno.env.get("MAX_THREAD_POSTS")); 247 248 if (isNaN(value) || value < 5 || value > 250) { 249 + return 25; 250 } 251 252 return Math.round(value);