This chapter gives an introduction to agent-oriented programming in JavaScript. It provides an example-based walk-through of how to implement abstractions for reasoning loop agents in vanilla JavaScript. The initial example is used as a stepping stone for explaining how to implement slightly more advanced agents and multi-agent systems using JS-son, a JavaScript library for agent-oriented programming. In this context, the chapter also explains how to integrate reasoning loop agents with generative AI technologies--specifically, large language models. Finally, application scenarios in several technology ecosystems and future research directions are sketched.
翻译:本章介绍了JavaScript中的面向智能体编程。通过基于示例的逐步讲解,展示了如何在原生JavaScript中实现推理循环智能体的抽象。初始示例作为铺垫,用于解释如何使用JS-son(一个面向智能体编程的JavaScript库)实现更高级的智能体与多智能体系统。在此背景下,本章还阐述了如何将推理循环智能体与生成式人工智能技术——特别是大语言模型——进行集成。最后,概述了在若干技术生态系统中的应用场景及未来研究方向。