YouBeAnything is a temporal pattern observer that learns about your behavioral patterns through your computer usage. It grounds its behavioral characterization on activity theory to build a comprehensive model of a user's behavior over time.
- Python 3.9 or higher
- An API key for either:
- OpenAI (for GPT models like
gpt-4o-mini,gpt-4o, etc.) - Google Gemini (for Gemini models like
gemini-1.5-pro,gemini-1.5-flash, etc.)
- OpenAI (for GPT models like
- Platform-specific permissions:
- macOS: Accessibility permissions for Terminal (System Settings → Privacy & Security → Accessibility)
- Linux/GNOME: Appropriate screen capture and input monitoring permissions
If you just want to pull the repo and run the Electron app with a single command:
./run.shThis will install Miniconda (if needed), create the tempo conda env, install Python and Electron dependencies, and then launch the app. You can also run setup only with:
./init.shgit clone https://github.com/GeneralUserModels/YouBeAnything.git
git checkout shardul/refactor_ubianything
cd YouBeAnythingYou can use either conda or Python's venv.
# Create a conda environment named 'tempo'
conda create -n tempo python=3.12.9
conda activate tempo# Create a virtual environment named 'tempo'
python3 -m venv tempo
# Activate the virtual environment
# On macOS/Linux:
source tempo/bin/activate
# On Windows (if applicable):
# tempo\Scripts\activateInstall the package in editable mode. Platform-specific dependencies (macOS or Linux) will be installed automatically:
pip install -e .You need to set up your API key for either OpenAI or Google Gemini. You can do this via environment variables:
export OPENAI_API_KEY="your-openai-api-key-here"You can get an API key from OpenAI's website.
export GOOGLE_API_KEY="your-google-api-key-here"You can get an API key from Google AI Studio.
You can also create a .env file in the project root (this file is gitignored):
# .env
OPENAI_API_KEY=your-openai-api-key-here
# OR
GOOGLE_API_KEY=your-google-api-key-here
# Optional: Override default model
MODEL_NAME=gpt-4o-miniThen install python-dotenv (already included in dependencies) and the environment variables will be automatically loaded.
-
Grant Accessibility Permissions:
- Go to System Settings → Privacy & Security → Accessibility
- Enable the Terminal (or your terminal app) option
- This is required for Tempo to observe your interactions
-
The
[macos]extra includespyobjc-framework-Quartzfor macOS-specific screen capture capabilities (which should already be installed from the platform specific set up already).
- Ensure you have the necessary permissions for screen capture and input monitoring
- Install GNOME-specific dependencies if needed
- The
[linux]extra includespyscreenshotandevdevfor Linux support
Start the Tempo observer to begin monitoring your computer usage:
tempo startBy default, this uses:
- Platform: macOS (use
--platform gnomefor Linux/GNOME) - Model:
gpt-4o-mini(or the model specified inMODEL_NAMEenvironment variable) - API: Detects your API key from environment variables (
OPENAI_API_KEYorGOOGLE_API_KEY)
tempo start [OPTIONS]Options:
--model MODEL: Specify the model to use (default:gpt-4o-minior$MODEL_NAME)- OpenAI models:
gpt-4o-mini,gpt-4o,gpt-4-turbo, etc. - Gemini models:
gemini-1.5-pro,gemini-1.5-flash, etc.
- OpenAI models:
--platform PLATFORM: Platform backend (macosorgnome, default:macos)--api-base URL: API base URL for OpenAI-compatible servers (e.g., vLLM deployments)--api-key KEY: Override API key (defaults to$TEMPO_LM_API_KEY,$OPENAI_API_KEY, or$GOOGLE_API_KEY)--debug: Enable debug logging
Using OpenAI with default settings:
tempo startUsing Gemini:
export GOOGLE_API_KEY="your-key"
tempo start --model gemini-1.5-flashUsing Linux/GNOME:
tempo start --platform gnomeUsing a custom API endpoint (e.g., local vLLM server):
tempo start --api-base http://localhost:8000/v1 --model Qwen/Qwen2-VL-7B-InstructDebug mode:
tempo start --debugSearch for activities, actions, or operations:
tempo query "email" # Search for anything related to "email"
tempo query "coding" --type activity # Search only activities
tempo query "browser" --limit 20 # Return up to 20 resultsOptions:
QUERY_TEXT: The search query (required)--type TYPE: Filter by entity type (operation,action, oractivity)--limit N: Maximum number of results to return (default: 10)
Tempo operates through a pipeline of observations:
- Observation → Operations: Screenshots are analyzed to extract discrete operations (e.g., "clicked button X", "typed in field Y")
- Operations → Actions: Related operations are grouped into actions (e.g., "composed email", "edited document")
- Actions → Activities: Actions are inferred into higher-level activities (e.g., "email management", "coding session")
All data is stored in a SQLite database located at ~/.cache/tempo/tempo.db. The system automatically:
- Buffers operations before processing
- Groups related operations based on temporal proximity and semantic similarity
- Continuously learns and updates your behavioral model
Tempo respects the following environment variables:
OPENAI_API_KEY: API key for OpenAI (for GPT models)GOOGLE_API_KEY: API key for Google Gemini (for Gemini models)TEMPO_LM_API_KEY: Override API key for Tempo (takes precedence)TEMPO_LM_API_BASE: Override API base URL for TempoOPENAI_API_BASE: API base URL for OpenAI-compatible serversMODEL_NAME: Default model name (used if--modelis not specified)
Tempo stores all data in:
- Database:
~/.cache/tempo/tempo.db(SQLite) - State:
~/.cache/tempo/state.json(saves buffered operations and job timestamps)
The database and state are automatically created on first run. To reset, simply delete these files and restart Tempo.
- Tempo uses SQLite with WAL mode and locking mechanisms to prevent this. If you encounter this, ensure only one Tempo instance is running.
- Verify your API key is correctly set:
echo $OPENAI_API_KEYorecho $GOOGLE_API_KEY - For Gemini, ensure
GOOGLE_API_KEYis set (it's required, unlike OpenAI where a dummy key can work for vLLM)
- Ensure Terminal has Accessibility permissions: System Settings → Privacy & Security → Accessibility
- You may need to restart Terminal after granting permissions
- Ensure you're using a valid model name for your chosen provider
- OpenAI models: Must start with
gpt-,o1-, etc. - Gemini models: Must start with
gemini-orclaude-
pip install -e ".[test]"
pytesttempo/: Main packagecli.py: Command-line interfacesystem.py: System initialization and managementproviders.py: AI model providers (OpenAI, Gemini)pipelines/: Processing pipelines (observation → operation → action → activity)observers/: Screen and interaction observersdb.py: Database managementstore.py: Data storage layeros_backends.py: Platform-specific backends