GithubHelp home page GithubHelp logo

rwmjhb / generalagent Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cosmosshadow/generalagent

0.0 0.0 0.0 6.97 MB

A simple, general, customizable Agent Framework

License: MIT License

Shell 0.59% JavaScript 1.19% Python 76.56% TypeScript 20.46% CSS 0.31% HTML 0.74% Dockerfile 0.16%

generalagent's Introduction

GeneralAgent: From LLM to Agent

EN doc CN 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.
  • AthenaAgent is a TypeScript port of GeneralAgent.

Architecture

GeneralAgent

Architecture

WebUI

WebUI

Demo

Version 0.03

webui

Version 0.0.2

GeneralAgent.Demo.mp4

Usage

docker

# pull docker
docker pull cosmosshadow/general-agent

# make .env
cp .env.example .env
vim .env
# Configure environment variables in the .env file, such as OPENAI_API_KEY, etc.

# 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

# open web with localhost:3000

Local installation and usage

Installation

pip install GeneralAgent

Set environment variables

cp .env.example .env
vim .env
# Configure environment variables in the .env file, such as OPENAI_API_KEY, etc.
export $(grep -v '^#' .env | sed 's/^export //g' | xargs)

Command line tool

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
# Preparation
cd webui/web/ && npm install && cd ../../
cd webui/server/server/ts_builder && npm install && cd ../../../../
# Start the server
cd webui/server/server/
uvicorn app:app --host 0.0.0.0 --port 7777
# Start the web service
cd webui/web
npm run start

Python usage

Please refer to the code for usage

Others

  • GeneralAgent uses litellm to access various platforms of large models.

Join us

Scan the QR code below with WeChat

wechat

discord is comming soon.

generalagent's People

Contributors

cosmosshadow avatar fangmartin avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.