this repo has no description
40
fork

Configure Feed

Select the types of activity you want to include in your feed.

at main 160 lines 4.9 kB view raw view rendered
1# Configuration Guide 2 3### Option 1: Migrate from existing `.env` file (if you have one) 4```bash 5python migrate_config.py 6``` 7 8### Option 2: Start fresh with example 91. **Copy the example configuration:** 10 ```bash 11 cp config.yaml.example config.yaml 12 ``` 13 142. **Edit `config.yaml` with your credentials:** 15 ```yaml 16 # Required: Letta API configuration 17 letta: 18 api_key: "your-letta-api-key-here" 19 project_id: "project-id-here" 20 21 # Required: Bluesky credentials 22 bluesky: 23 username: "your-handle.bsky.social" 24 password: "your-app-password" 25 ``` 26 273. **Run the configuration test:** 28 ```bash 29 python test_config.py 30 ``` 31 32## Configuration Structure 33 34### Letta Configuration 35```yaml 36letta: 37 api_key: "your-letta-api-key-here" # Required 38 timeout: 600 # API timeout in seconds 39 project_id: "your-project-id" # Required: Your Letta project ID 40``` 41 42### Bluesky Configuration 43```yaml 44bluesky: 45 username: "handle.bsky.social" # Required: Your Bluesky handle 46 password: "your-app-password" # Required: Your Bluesky app password 47 pds_uri: "https://bsky.social" # Optional: PDS URI (defaults to bsky.social) 48``` 49 50### Bot Behavior 51```yaml 52bot: 53 fetch_notifications_delay: 30 # Seconds between notification checks 54 max_processed_notifications: 10000 # Max notifications to track 55 max_notification_pages: 20 # Max pages to fetch per cycle 56 max_thread_posts: 0 # Skip threads longer than this (0 = no limit) 57 58 agent: 59 name: "void" # Agent name 60 model: "openai/gpt-4o-mini" # LLM model to use 61 embedding: "openai/text-embedding-3-small" # Embedding model 62 description: "A social media agent trapped in the void." 63 max_steps: 100 # Max steps per agent interaction 64 65 # Memory blocks configuration 66 blocks: 67 zeitgeist: 68 label: "zeitgeist" 69 value: "I don't currently know anything about what is happening right now." 70 description: "A block to store your understanding of the current social environment." 71 # ... more blocks 72``` 73 74### Queue Configuration 75```yaml 76queue: 77 priority_users: # Users whose messages get priority 78 - "cameron.pfiffer.org" 79 base_dir: "queue" # Queue directory 80 error_dir: "queue/errors" # Failed notifications 81 no_reply_dir: "queue/no_reply" # No-reply notifications 82 processed_file: "queue/processed_notifications.json" 83``` 84 85### Threading Configuration 86```yaml 87threading: 88 parent_height: 40 # Thread context depth 89 depth: 10 # Thread context width 90 max_post_characters: 300 # Max characters per post 91``` 92 93### Logging Configuration 94```yaml 95logging: 96 level: "INFO" # Root logging level 97 loggers: 98 void_bot: "INFO" # Main bot logger 99 void_bot_prompts: "WARNING" # Prompt logger (set to DEBUG to see prompts) 100 httpx: "CRITICAL" # HTTP client logger 101``` 102 103## Environment Variable Fallback 104 105The configuration system still supports environment variables as a fallback: 106 107- `LETTA_API_KEY` - Letta API key 108- `BSKY_USERNAME` - Bluesky username 109- `BSKY_PASSWORD` - Bluesky password 110- `PDS_URI` - Bluesky PDS URI 111 112If both config file and environment variables are present, environment variables take precedence. 113 114## Migration from Environment Variables 115 116If you're currently using environment variables (`.env` file), you can easily migrate to YAML using the automated migration script: 117 118### Automated Migration (Recommended) 119 120```bash 121python migrate_config.py 122``` 123 124The migration script will: 125- ✅ Read your existing `.env` file 126- ✅ Merge with any existing `config.yaml` 127- ✅ Create automatic backups 128- ✅ Test the new configuration 129- ✅ Provide clear next steps 130 131### Manual Migration 132 133Alternatively, you can migrate manually: 134 1351. Copy your current values from `.env` to `config.yaml` 1362. Test with `python test_config.py` 1373. Optionally remove the `.env` file (it will still work as fallback) 138 139## Security Notes 140 141- `config.yaml` is automatically added to `.gitignore` to prevent accidental commits 142- Store sensitive credentials securely and never commit them to version control 143- Consider using environment variables for production deployments 144- The configuration loader will warn if it can't find `config.yaml` and falls back to environment variables 145 146## Advanced Configuration 147 148You can programmatically access configuration in your code: 149 150```python 151from config_loader import get_letta_config, get_bluesky_config 152 153# Get configuration sections 154letta_config = get_letta_config() 155bluesky_config = get_bluesky_config() 156 157# Access individual values 158api_key = letta_config['api_key'] 159username = bluesky_config['username'] 160```