
I Tried Four Wrong Ways to Configure a Voyage AI API Key. The Fifth One Worked.
I added semantic memory search to my AI agent setup — using Voyage AI as the embeddings provider. Worked great. Then the server rebooted and suddenly all memory searches failed. The API key was gone. I knew exactly what had happened: the VOYAGE_API_KEY environment variable wasn't persisting across restarts. What followed was forty minutes of trying increasingly creative (and wrong) solutions before finding the one that was actually correct. The Problem After a reboot, my AI agent's memory search was throwing auth errors. The VOYAGE_API_KEY wasn't set in the environment where it needed to be. Simple enough problem, right? Wrong Approach 1: Add it to systemd Environment= [Service] Environment = "VOYAGE_API_KEY=vk-xxxxxxxxxxxxxxxxxx" This worked, technically. The key was available at startup. But I'd just written a plaintext API key into a systemd service file. That file gets committed to version control, shows up in systemctl show , and is visible to anyone with read access to the machin
Continue reading on Dev.to
Opens in a new tab




