chatGPT 'Autonomous Agent' in Node.js, written/runs in Termux. Sandboxed REPL access, Termux:API interface, chain-of-thought Question-Observation-Thought-Action-Result reasoning. All in 600 lines of js
╭─arthur@hp4 in ~/ai-termux/autobabytermux-main via v19.9.0
╰─λ ls (base)
drwxr-xr-x - arthur 4 May 19:45 node_modules
.rw-r--r-- 17k arthur 4 May 16:27 autobabytermux.js
.rw-r--r-- 32k arthur 4 May 19:45 package-lock.json
.rw-r--r-- 79 arthur 4 May 19:45 package.json
.rw-r--r-- 2.7k arthur 4 May 16:27 README.md
╭─arthur@hp4 in ~/ai-termux/autobabytermux-main via v19.9.0 took 4ms
╰─λ cp autobabytermux.js babyautotermux.js (base)
╭─arthur@hp4 in ~/ai-termux/autobabytermux-main via v19.9.0 took 1ms
╰─λ node babyautotermux.js (base)
WELCOME! Usage: Preface prompt with [p] to use chain-of-thought preprompt. Otherwise no preprompt will be used.
Thought: I can use Google to search for this information.
Action: Search[closest distance between Mars and Earth]Result: "Sorry, Search is offline."
[/end prompt 1]----------