Skip to main content

General Agent: From LLM to Agent

Project description

GeneralAgent: From LLM to Agent

EN doc License

A simple, general, customizable Agent framework

Features

  • Simple、Fast、Stable: stable with GPT3.5.
  • GeneralAgent support serialization, include python state.
  • Build-in interpreters: Python, AppleScript, Shell, File, Plan, Retrieve Embedding etc.
  • Dynamic UI: Agent can create dynamic ui to user who can use.
  • WebUI with agent builder. You can use natural language to create agent without coding.

Architecture

GeneralAgent

Architecture

WebUI

WebUI

Demo

Version 0.03

webui

Version 0.0.2

https://github.com/CosmosShadow/GeneralAgent/assets/13933465/9d9b4d6b-0c9c-404d-87d8-7f8e03f3772b

Usage

docker

# pull docker
docker pull cosmosshadow/general-agent:0.0.9

# make .env and replace variables like LLM_SOURCE、OPENAI_API_KEY
cp .env.example .env
vim .env
# 配置.env文件中的环境变量,比如OPENAI_API_KEY

# run
docker run \
-p 3000:3000 \
-p 7777:7777 \
-v `pwd`/.env:/workspace/.env \
-v `pwd`/data:/workspace/data \
--name=agent \
--privileged=true \
-d cosmosshadow/general-agent:0.0.9

# open web with localhost:3000

本地安装使用

安装

pip install GeneralAgent

设置环境变量

cp .env.example .env
vim .env
# 配置.env文件中的环境变量,比如OPENAI_API_KEY
export $(grep -v '^#' .env | sed 's/^export //g' | xargs)

命令行工具

GeneralAgent
# or
GeneralAgent --workspace ./test --new --auto_run
# worksapce: Set workspace directory, default ./general_agent
# new: if workspace exists, create a new workspace, like ./general_agent_2023xxx
# auto_run: if auto_run, the agent will run the code automatically, default no

WebUI

git clone https://github.com/CosmosShadow/GeneralAgent
cd GeneralAgent
# 准备工作
cd webui/web/ && npm install && cd ../../
cd webui/server/server/ts_builder && npm install && cd ../../../../
# 启动服务端
cd webui/server/server/
uvicorn app:app --host 0.0.0.0 --port 7777
# 启动web服务
cd webui/web
npm run start

Python使用

使用请参考代码

加入我们

微信扫码下面二维码

wechat

discord is comming soon.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

generalagent-0.0.9.tar.gz (42.4 kB view hashes)

Uploaded Source

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page