Skip to main content

An AI agent framework.

Project description

Intro

Magic-Assistant is an open source AI agent framework. You can use it to develop multiple types of agent. Now support 4 types of agent:

chat

Chat agent chats with you like a human. It is the most normal and simple type.

execute_cmd

Execute cmd agent uses built-in plugins to try to accomplish your task. This agent type applies to simple tasks which can be accomplished by one plugin.

plan

Plan agent makes a plan and use built-in plugins to execute plan items according to try to accomplish your task. Agent evaluate the result of execution and adjust plan if necessary. This agent type applies to complicated tasks which can not be accomplished by one plugin.

role_play

Role play agent usually does not work alone. Each agent has its own name, role and memory. They coordinate with each other in your defined sandbox. This agent type is inspired by "Generative Agents: Interactive Simulacra of Human Behavior" (https://arxiv.org/abs/2304.03442).

Install

Magic-Assistant supports two installation types: metal and docker.

llm

Magic-Assistant has been developed and tested with the model 'vicuna'(https://github.com/lm-sys/FastChat.git). You need to prepare the llm model in advance and configure the llm model path in the config/magic_assistant.yml. More llm modules will be integrated. If you want to use a llm which has not been integrated yet, you can integrate it yourself in the magic_assistant/model/llm directory.

metal

1, Setup your own python environment, require python3.10+. For example, execute "conda create -n mojing python=3.10" in shell; 2, Install python packages. In shell, cd to the directory of Magic-Assistant and execute " pip3 install -e .".

docker

The Magic-Assistant docker image has already installed the python dependencies and Magic-Assistant and starts up in restful_api mode. If you want to use it in cli mode, you can execute "docker exec -ti $docker_name /bin/bash" and execute "python3 -m magic_assistant.main $ args".

usage

Magic-Assistant supports two usage types: cli and restful_api. If you want to use or test Magic-Assistant in shell, choose the cli type. If you want to integrate Magic-Assistant into own products, choose the restful_api type.

cli

Execute "python3 -m magic_assistant.main --help" to show the supported args. Refer to the examples in the "Magic-Assistant/examples" directory. For example, you can execute "python3 -m magic_assistant.main --gui_type cli --agent_type plan" to start a plan agent

restful api

Will support 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

magic_assistant-0.0.1.tar.gz (47.5 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

magic_assistant-0.0.1-py3-none-any.whl (72.8 kB view details)

Uploaded Python 3

File details

Details for the file magic_assistant-0.0.1.tar.gz.

File metadata

  • Download URL: magic_assistant-0.0.1.tar.gz
  • Upload date:
  • Size: 47.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.11

File hashes

Hashes for magic_assistant-0.0.1.tar.gz
Algorithm Hash digest
SHA256 7c3f3196ee669ae29832c828e8c22ab74292884dd95bc0a651376ce6f4954da7
MD5 2ffe2b9188ec32e90cf27acf36500d5c
BLAKE2b-256 5d0e0f76496412e6fe6cbc671bd5d7a3fc34ca703be8143b33a91acf4845e603

See more details on using hashes here.

File details

Details for the file magic_assistant-0.0.1-py3-none-any.whl.

File metadata

File hashes

Hashes for magic_assistant-0.0.1-py3-none-any.whl
Algorithm Hash digest
SHA256 1eed8977e2b0936e37d4ecb8c3fd5eafebd4a8d5f39c2648ecef90f57b184a74
MD5 080e562d17ca1e5207e5a67c0222a069
BLAKE2b-256 f855f39e07fac877e8499687b87607ac4d82bdb385deb555b6b2abf7924ae110

See more details on using hashes here.

Supported by

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