The disclosed embodiments provide a system for processing data. During operation, the system obtains a feature configuration for a feature. Next, the system obtains, from the feature configuration, an anchor containing metadata for accessing the feature in an environment. The system then uses one or more attributes of the anchor to retrieve one or more feature values of the feature from the environment. Finally, the system provides the one or more feature values for use with one or more machine-learning models.