A generalized information-seeking agent system with Large Language Models (LLMs).
KwaiAgents is an open-source project developed by KwaiKEG, a division of Kuaishou Technology, that focuses on creating advanced agent systems leveraging large language models (LLMs). The project encompasses several components, including KAgentSys-Lite, KAgentLMs, KAgentInstruct, and KAgentBench, each designed to enhance the capabilities of AI agents in tasks such as planning, tool usage, and instruction following. The primary audience includes AI researchers and developers looking to implement or experiment with agent-based systems. KwaiAgents addresses the need for robust, flexible agent frameworks that can operate effectively in various applications, utilizing technologies such as Python, Hugging Face datasets, and machine learning libraries.
To get started with KwaiAgents, follow these installation instructions:
Prebuild Environment:
conda create -n kagent python=3.10
conda activate kagent
pip install -r requirements.txt
Using AgentLMs:
pip install vllm
pip install "fschat[model_worker,webui]"
python -m fastchat.serve.controller
python -m fastchat.serve.vllm_worker --model-path $model_path --trust-remote-code
python -m fastchat.serve.openai_api_server --host localhost --port 8888
pip install "llama-cpp-python[server]"
python3 -m llama_cpp.server --model kagentlms_qwen_7b_mat_gguf/ggml-model-q4_0.gguf --chat_format chatml --port 8888
Using KAgentSys-Lite:
git clone git@github.com:KwaiKEG/KwaiAgents.git
cd KwaiAgents
python setup.py develop
export OPENAI_API_KEY=sk-xxxxx
export WEATHER_API_KEY=xxxxxx
kagentsys --query="Who is Andy Lau's wife?" --llm_name="gpt-3.5-turbo" --lang="en"
For detailed documentation, refer to the KwaiAgents documentation.
KwaiAgents is designed for both individual developers and enterprises, providing a comprehensive framework for building and deploying intelligent agent systems.