skip to main content
10.1145/3662006.3662063acmconferencesArticle/Chapter ViewAbstractPublication PagesmobisysConference Proceedingsconference-collections
research-article
Open access

ChainStream: A Stream-based LLM Agent Framework for Continuous Context Sensing and Sharing

Published: 11 June 2024 Publication History

Abstract

This paper introduces ChainStream, an LLM-based framework for building and serving context-aware AI agents. Driven by the goal to enable context awareness of LLM agents and flexible information sharing between them, we adopt a stream-based design, in which the agents are responsible for producing and transforming different types of streams, including the low-level sensing signals and high-level semantic events. The streams can be shared between different agents at the system level, so that developers can build new features upon existing streams. Richer features and higher levels of intelligence can be obtained by agents collectively transforming the streams. ChainStream offers an easy-to-use programming interface to facilitate agent development and a runtime system that supports high-performance scalable agent serving. The system design is inspired by microkernel and dataflow computation. We demonstrate the feasibility and usefulness of ChainStream with several use cases in personal assistant, smart home, and business intelligence. The code is open-sourced at https://github.com/MobileLLM/ChainStream.

References

[1]
Harrison Chase. 2022. LangChain. https://github.com/hwchase17/langchain
[2]
David E Culler et al. 1986. Dataflow architectures. (1986).
[3]
Michel Gien. 1990. Micro-kernel architecture key to modern operating systems design. Unix Review 8, 11 (1990), 58--60.
[4]
Sirui Hong, Mingchen Zhuge, Jonathan Chen, Xiawu Zheng, Yuheng Cheng, Ceyao Zhang, Jinlin Wang, Zili Wang, Steven Ka Shing Yau, Zijuan Lin, Liyang Zhou, Chenyu Ran, Lingfeng Xiao, Chenglin Wu, and Jürgen Schmidhuber. 2023. MetaGPT: Meta Programming for A Multi-Agent Collaborative Framework. arXiv:2308.00352 [cs.AI]
[5]
Hyeyoung Ko, Suyeon Lee, Yoonseo Park, and Anna Choi. 2022. A survey of recommendation systems: recommendation models, techniques, and application fields. Electronics 11, 1 (2022), 141.
[6]
Devender Kumar, Steven Jeuris, Jakob E Bardram, and Nicola Dragoni. 2020. Mobile and wearable sensing frameworks for mHealth studies and applications: A systematic review. ACM Transactions on Computing for Healthcare 2, 1 (2020), 1--28.
[7]
Yuanchun Li, Fanglin Chen, Toby Jia-Jun Li, Yao Guo, Gang Huang, Matthew Fredrikson, Yuvraj Agarwal, and Jason I Hong. 2017. PrivacyStreams: Enabling transparency in personal data processing for mobile apps. Proceedings of the ACM on Interactive, Mobile, Wearable and Ubiquitous Technologies 1, 3 (2017), 76.
[8]
Yuanchun Li, Hao Wen, Weijun Wang, Xiangyu Li, Yizhen Yuan, Guohong Liu, Jiacheng Liu, Wenxing Xu, Xiang Wang, Yi Sun, Rui Kong, Yile Wang, Hanfei Geng, Jian Luan, Xuefeng Jin, Zilong Ye, Guanjing Xiong, Fan Zhang, Xiang Li, Mengwei Xu, Zhijun Li, Peng Li, Yang Liu, Ya-Qin Zhang, and Yunxin Liu. 2024. Personal LLM Agents: Insights and Survey about the Capability, Efficiency and Security. arXiv preprint arXiv:2401.05459 (2024).
[9]
Leandro Miranda, José Viterbo, and Flávia Bernardini. 2022. A survey on the use of machine learning methods in context-aware middlewares for human activity recognition. Artificial Intelligence Review 55, 4 (2022), 3369--3400.
[10]
OpenAI. 2022. Introduce ChatGPT. https://openai.com/blog/chatgpt.[Online; accessed November 28, 2023].
[11]
Hugo Touvron, Thibaut Lavril, Gautier Izacard, Xavier Martinet, Marie-Anne Lachaux, Timothée Lacroix, Baptiste Rozière, Naman Goyal, Eric Hambro, Faisal Azhar, Aurelien Rodriguez, Armand Joulin, Edouard Grave, and Guillaume Lample. 2023. LLaMA: Open and Efficient Foundation Language Models. arXiv:2302.13971 [cs.CL]
[12]
Hao Wen, Yuanchun Li, Guohong Liu, Shanhui Zhao, Tao Yu, Toby Jia-Jun Li, Shiqi Jiang, Yunhao Liu, Yaqin Zhang, and Yunxin Liu. 2023. Empowering llm to use smartphone for intelligent task automation. arXiv preprint arXiv:2308.15272 (2023).
[13]
Hao Wen, Hongming Wang, Jiaxuan Liu, and Yuanchun Li. 2023. DroidBot-GPT: GPT-powered UI Automation for Android. arXiv preprint arXiv:2304.07061 (2023).
[14]
Qingyun Wu, Gagan Bansal, Jieyu Zhang, Yiran Wu, Beibin Li, Erkang Zhu, Li Jiang, Xiaoyun Zhang, Shaokun Zhang, Jiale Liu, Ahmed Hassan Awadallah, Ryen W White, Doug Burger, and Chi Wang. 2023. AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation Framework. arXiv:2308.08155 [cs.AI]
[15]
Chengxu Yang, Yuanchun Li, Mengwei Xu, Zhenpeng Chen, Yunxin Liu, Gang Huang, and Xuanzhe Liu. 2021. TaintStream: fine-grained taint tracking for big data platforms through dynamic code translation (ESEC/FSE 2021). Association for Computing Machinery, New York, NY, USA, 806--817. https://doi.org/10.1145/3468264.3468532
[16]
Matei Zaharia, Mosharaf Chowdhury, Michael J Franklin, Scott Shenker, and Ion Stoica. 2010. Spark: Cluster computing with working sets. In 2nd USENIX Workshop on Hot Topics in Cloud Computing (HotCloud 10).

Recommendations

Comments

Information & Contributors

Information

Published In

cover image ACM Conferences
EdgeFM '24: Proceedings of the Workshop on Edge and Mobile Foundation Models
June 2024
44 pages
ISBN:9798400706639
DOI:10.1145/3662006
This work is licensed under a Creative Commons Attribution International 4.0 License.

Sponsors

In-Cooperation

Publisher

Association for Computing Machinery

New York, NY, United States

Publication History

Published: 11 June 2024

Check for updates

Author Tags

  1. AI agent
  2. Large language model
  3. context awareness
  4. development framework
  5. stream processing

Qualifiers

  • Research-article
  • Research
  • Refereed limited

Conference

MOBISYS '24
Sponsor:

Contributors

Other Metrics

Bibliometrics & Citations

Bibliometrics

Article Metrics

  • 0
    Total Citations
  • 634
    Total Downloads
  • Downloads (Last 12 months)634
  • Downloads (Last 6 weeks)143
Reflects downloads up to 06 Jan 2025

Other Metrics

Citations

View Options

View options

PDF

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader

Login options

Media

Figures

Other

Tables

Share

Share

Share this Publication link

Share on social media