Proliferation of hardware and software sensors and our desire to determine relationships between the near-real- time data from multiple publishers motivates our introduction of Internet-scale context-awareness (ISCA). Content-based publish/subscribe (CBPS) seems the most natural substrate for ISCA because it provides the right separation of concerns, efficient event distribution, extensibility, and scalability. However, our evolving information environment is different from that for which CBPS was designed. Attempting to use the black-box style transparency afforded by CBPS precludes efficiently detecting data relationships for publication as context- aware events and leads to information glut and device saturation. We overcome these problems by recognizing that any component-based system is an ecology for which we can achieve global efficiencies by providing top-down and bottom-up context and collaboration. We extend CBPS with an open implementation approach to enable subscribers to inject domain-specific knowledge into the network in the form of first-class publish/subscribe agents. Agents are distributed algorithms that observe and transform data, dynamically manage bounding region filters, and exchange data only on an as-needed basis to eliminate useless event traffic at the sensor-edges of the network. Filtering at the network edge reduces bottlenecks in the network core to increase the scalability of the system. Content-based routing mechanisms are leveraged to allow the user to control where code is deployed, to develop complex relationship hierarchies, and to construct one-to-one conversations by leveraging existing network knowledge without flooding the network with either advertisements or subscriptions. We are programming the network. We add dynamic contextual message filtering and distributed memoization to minimize re-computation at downstream nodes. Combining open implementation, distributed processing, content-addressability, and distributed memoization satisfies the required increases in expressiveness, efficiency, and scalability necessary to achieve our Internet-scale context-awareness vision. Our algorithm detecting the proximity of mobile buddies reduced event traffic from O (events) to an expectation of about ln (movement) event-hops. Complex traffic-route monitoring used eight times fewer events than basic CBPS and reduced aggregation enhanced CBPS load imbalances by distributing relationship computations over the event- entry edge-brokers. Our algorithms are scalable with increased reporting rates because they measure data movement