#JS Agent
52 messages · Page 1 of 1 (latest)
GPTAgent.js is a composable and extensible framework for creating AI agents with TypeScript/JavaScript.
Creating AI agents requires a lot of experimentation. GPTAgent.js makes the agent configuration explicit, so you can easily understand and adjust what the agent is doing.
thanks
i am gonna test that
Cool! lmk if you have questions or run into thing that it doesn't support yet!
i tried to build and run , but got an error , i used esbuild:
{
"build": "esbuild --bundle --format=cjs --platform=node main.js --outdir=build"
}
Looks like a bundling issue. I'll see if I can reproduce it, thanks for reporting!
GPTAgent.js v0.0.4 🤖
You can now easily tweak the agent to work on your own git project. It is useful for smaller programming tasks, writings docs & tests, refactoring, etc.
#AutoGPT #TypeScript
I just tried to reproduce it, it works for me though:
Wondering what could be different in your vs my setup that would cause esbuild to fail
did you run it ?
ah - now I have the same issue
it's an esbuild import issue (see https://github.com/evanw/esbuild/issues/17 ).
Try
import * as $ from "@gptagent/agent";
import { ActionRegistry, Agent, runCLIAgent } from "@gptagent/agent";
for importing on top of main js. That fixed it for me (with gptagent.js 0.0.4 and the corresponding example from 0.0.4)
when i get free time, i will check it more .
The example needs to match the gptagent.js version, right now it's evolving a lot and the API breaks between versions. Updating to the latest example from the website might fix it.
^ v0.0.5 changes the agent structure slightly (code might need to be updated)
@fierce drum i see the example of js developer, would that work if i have a large js/ts file that is way over the token limit?
Not at the moment. There are a few ways to make this work (e.g. splitting & embedding), but right now the codebase needs to be "ai-ready" by having smaller files (which I think is something that's going to stay with us - there'll be AI-ready codebases in the future that'll make it easy for AI to work in).
ok, human beings last job: decouple/refactor large single file into multiple meaningful files 😉
i am going to put a eslint rule in our project to limit them producing files greater than the limit of openAPI token 😉
AI's like good, well structured codebases.
Would be hilarious to see an ESLint rule set to make codebases better for AI
i am on golang these days and i can't remember too much details about ts/js. in go, i can just decouple things into multiple files as long as they are under the same package. i bet i can do similar with ts
// index.ts
export * from './func_group1'
export * from './func_group2'
...
export * from './func_group9999'
🧌
Lol yeah, those index files... one of the things i like about gptagent.js is that it can write/update them.
i am going to give it try. I am thinking about let it write some cypress e2e test and i can let the manual testers go ... they don't produce much and my devs hate writing e2e ui test cause it take a lot of time 😦
Cool, let me know how it goes - the task seems ambitious for the current state of things. Doing E2E testing (and maybe even automated exploratory UI testing) with agents is very exciting!
GPTAgent.js v0.0.6 🤖
Example implementation of @yoheinakajima 's BabyAGI in TypeScript
https://t.co/gvFfmnVFaQ
New model: gpt-3.5-turbo support
#BabyAGI #typescript
GPTAgent.js v0.0.7 🦾
- integrated UpdateTasksLoop concept from #babyagi into library
- Steps are always associated with agent runs
- Text summarization is now fully recursive (to support larger texts)
- Improved agent run observers
Looks pretty awesome, good work!
GPTAgent.js v0.0.8
- Extracted generalized Loop concept (with generate next step loops and task planning loops)
- Restructured tools and actions to provide a functional interface
- ResultFormatters for all tools
#AutoGPT #typescript
JS Agent v0.0.10
- refactored prompts into functional interface
- new "ask user" tool
- improved error handling in "read file" tool
JS Agent v0.0.11
- OpenAI text completion model support (text-davinci-003 etc.)
- FlexibleJsonActionFormatter (huge improvement for agent performance with gpt-3.5-turbo)
JS Agent v0.0.12
- agent runs collect all LLM calls to facilitate debugging, optimization and cost analysis
- agent run controllers can stop agent runs early (e.g. when a maximum number of steps is exceeded)
#babyagi #AutoGPT
JS Agent v0.0.13
- Calculate LLM call costs of agent runs
- Analyze LLM calls after an agent run
JS Agent v0.0.14
- Agent runs have user-defined properties that can be accessed in prompts
- Switched remaining agent definition parts to functional programming
JS Agent v0.0.15
- New PDF summarizer example with GPT-4 and extract & rewrite pipeline
- PDF loading
- Better text extraction prompts
- Changed summarize to extract text
#ChatGPT #buildinpublic
The documentation page with a very basic overview is up now: https://js-agent.ai/docs/intro
Let's discover JS Agent in less than 5 minutes.
JS Agent v0.0.16
- early version of an agent server
- changed run properties to run state
- simplified typescript generics for tools
- fixed pdf-related breakage in javascript developer example agent
JS Agent v0.0.17
Introducing the agent server:
- Can host multiple agents
- Agent runs can be started, stopped, and observed via HTTP API
Updated @babyAGI_ example that uses the agent server:
https://t.co/8cgHObHaq0
#babyagi
JS Agent v0.0.18
New tool:
Call agent loops with a parameter (e.g. a next step generation loop).
- This lets you effectively create sub-routines that execute different prompts (e.g. for summarization)
New tool:
write string property on agent run
JS Agent v0.0.19 released:
- New: embedding support (OpenAI text-embedding-ada-022)
- Redesigned API - utility functions can now be used on their own more easily
JS Agent v0.0.20 released:
- New: GPT3 token splitter
- Fixed: broken chat API url
Basic API docs: https://js-agent.ai/api/modules/
Namespaces
JS Agent v0.0.21 released:
- Tiktoken tokenizer which supports the 'cl100k_base' encoding that is used by gpt-4, gpt-3.5-turbo and text-embedding-ada-002 (using the great JS implementation by @__dqbd )
- Restructured provider package into api, cost, model, and tokenizer
- API…