Alfred: Personal Agentic Infrastructure
This guide provides comprehensive instructions for deploying and using Alfred, your self-hosted, always-on personal agentic infrastructure.
Prerequisites
Before installing Alfred, ensure you have the following:
- Python 3.11+: Alfred is built on Python 3.11 and newer.
- Agentic Runtime: Alfred connects to an existing agentic runtime. Choose one of the following:
- Claude Code: Requires
claudeto be available in your system's PATH. - OpenClaw: Requires
openclawto be available in your system's PATH. - Zo Computer: Requires a
ZO_API_KEYenvironment variable for HTTP API access.
- Claude Code: Requires
- Temporal: Alfred's workflow engine is powered by Temporal. You will need a Temporal cluster running or access to a Temporal Cloud instance.
- Obsidian: Alfred maintains a knowledge graph in an Obsidian vault. While not strictly a prerequisite for installation, you will need an Obsidian vault for Alfred to operate effectively.
- Hardware: A Mac Mini, VPS, or personal cloud instance to host Alfred.
Installation
Alfred can be installed directly from PyPI.
-
Install Alfred:
pip install alfred-vault -
Quickstart Setup: This command will guide you through initial configuration and create necessary files.
alfred quickstart -
Start Alfred:
alfred up
Configuration
Alfred's configuration is managed through a unified YAML file (typically created by alfred quickstart) and environment variables.
Environment Variables
ZO_API_KEY: Required if you are using Zo Computer as your agent backend..envfile: Alfred loads environment variables from a.envfile in its root directory. This file supportsKEY=VALUEpairs and does not override existing system environment variables.
Unified Configuration File
The alfred quickstart command generates a unified configuration file (e.g., config.yaml). This file contains settings for logging, agent backends, and worker configurations.
Example Configuration Snippets:
-
Logging:
logging: level: INFO # INFO, DEBUG, WARNING, ERROR dir: ./data # Directory for log files -
Agent Backend (Example: Zo Computer):
agent: backend: zo_computer # Other backend-specific settings
Vault Structure
Alfred expects an Obsidian vault with specific record types and YAML frontmatter. The alfred quickstart command should set up a basic vault structure.
- Record Types: Alfred works with 20 structured record types (e.g., people, tasks, conversations, projects).
- Wikilinks: Records are interlinked using Obsidian's wikilink syntax.
- Frontmatter: YAML frontmatter is used for structured metadata within records.
Build & Run
Alfred is a Python application primarily run via its CLI. There's no separate "build" step beyond installation.
Running Locally (Development)
-
Start Alfred's core services and dashboard:
alfred up --liveThe
--liveflag will launch a live TUI dashboard to monitor worker status, feed entries, and mutations. -
Start a Temporal Worker: In a separate terminal, start the Temporal worker to execute workflows.
alfred temporal worker
Running Workflows
-
Trigger a specific workflow:
alfred temporal run DailyBriefingReplace
DailyBriefingwith the name of your desired workflow. -
Register scheduled workflows:
alfred temporal schedule register crons.pyThis command registers workflows defined in
crons.py(or your specified file) with the Temporal scheduler.
Interacting with Alfred
- Inbox Processing: Drop files into the
inbox/directory, and the Curator worker will process them. - CLI Ingestion: Use
alfred ingestfor bulk ingestion of data. - Interface: Alfred meets you where you are, supporting various interfaces depending on your chosen agent runtime (Telegram, WhatsApp, Slack, iMessage, Email, CLI).
Deployment
Alfred is designed for self-hosting.
Recommended Platforms
- Mac Mini: For a local, always-on personal server.
- VPS (Virtual Private Server): Such as Hetzner, for cloud-based hosting with full control.
- Personal Cloud Instance: Any personal cloud environment where you can run Python applications and manage your data.
Deployment Steps (General)
-
Prepare your environment:
- Install Python 3.11+.
- Install necessary system dependencies for your chosen agent backend (e.g.,
claude,openclaw). - Set up your Obsidian vault directory.
- Ensure network access to your Temporal cluster.
-
Install Alfred: Follow the
pip install alfred-vaultstep. -
Configure Alfred:
- Run
alfred quickstartto generate your configuration. - Adjust
config.yamlto suit your deployment environment (e.g., log directories, agent backend settings). - Set any required environment variables (e.g.,
ZO_API_KEY) in your.envfile or directly in the environment.
- Run
-
Start Services:
- Start the main Alfred process:
alfred up. Consider using a process manager likesystemd,Supervisor, orpm2(for Node.js, but can manage Python scripts) to ensure it runs continuously and restarts on failure. - Start the Temporal worker:
alfred temporal worker. This should also be managed by a process manager for reliability.
- Start the main Alfred process:
-
Monitor: Use
alfred up --live(if running on a terminal you can access) or check logs in the directory specified bylogging.dirin your configuration.
Troubleshooting
Common Issues and Solutions
-
alfredcommand not found:- Solution: Ensure
pip's script directory is in your system's PATH. This is usually handled automatically bypipinstallations. You might need to restart your terminal.
- Solution: Ensure
-
Agent backend not found or configured incorrectly:
- Error: Messages indicating
claudeoropenclaware not in PATH, orZO_API_KEYis missing. - Solution:
- For
claudeoropenclaw: Verify the executables are installed and their location is included in your system's PATH environment variable. - For
Zo Computer: Ensure theZO_API_KEYenvironment variable is set correctly before starting Alfred. Check your.envfile or system environment.
- For
- Error: Messages indicating
-
Temporal connection issues:
- Error: Workflows fail to start or workers cannot connect to the Temporal cluster.
- Solution:
- Verify your Temporal cluster is running and accessible from the machine hosting Alfred.
- Check Temporal client configuration in Alfred (if applicable, often configured via environment variables or a
temporalio.worker.Workersetup). - Ensure necessary ports are open (default Temporal port is 7233).
-
Obsidian vault not found or inaccessible:
- Error: Workers report errors when trying to read from or write to the vault.
- Solution:
- Confirm the path to your Obsidian vault is correctly configured in Alfred's settings (usually established during
quickstart). - Check file system permissions to ensure Alfred has read/write access to the vault directory.
- Confirm the path to your Obsidian vault is correctly configured in Alfred's settings (usually established during
-
Workers crashing or restarting frequently:
- Error: The TUI dashboard shows workers in a "restarting" state, or logs indicate frequent failures.
- Solution:
- Examine the logs (
./data/alfred.logor tool-specific logs) for detailed error messages. - Common causes include LLM API errors (rate limits, invalid requests), file system issues, or misconfigurations.
- If an LLM is consistently failing, check your API keys and model availability.
- Examine the logs (
-
No activity after dropping files into
inbox/:- Error: Files in
inbox/are not processed by the Curator. - Solution:
- Ensure the
alfred upprocess is running. The Curator worker watches this directory. - Check the Curator's logs for any errors or indications it's not starting or processing files.
- Verify the
inbox/directory path is correctly configured and accessible.
- Ensure the
- Error: Files in