# Genius Agent
![PyPI - Version](https://img.shields.io/pypi/v/genius-agent)
![PyPI - Downloads](https://img.shields.io/pypi/dd/genius-agent)
![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/genius-agent)
![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/genius-agent)
![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/genius-agent)
![PyPI - License](https://img.shields.io/pypi/l/genius-agent)
![GitHub](https://img.shields.io/github/license/Knuckles-Team/genius-agent)
![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/genius-agent)
![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/genius-agent)
![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/genius-agent)
![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/genius-agent)
![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/genius-agent)
![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/genius-agent)
![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/genius-agent)
![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/genius-agent)
![PyPI - Wheel](https://img.shields.io/pypi/wheel/genius-agent)
![PyPI - Implementation](https://img.shields.io/pypi/implementation/genius-agent)
*Version: 2.11.0*
Deploy agents to solve problems using Autogen
This python library will accept an agent configuration file in YAML/JSON, or as a JSON String payload in CLI
or as a standalone uvicorn FastAPI Server
This repository comes with a Dockerfile and a docker-compose.yml file to host this yourself.
Agent Types:
- Assistant
- User Proxy
- Retrieve Assistant
- Retrieve User Proxy
- Teachable
- MemGPT
- GPT Assistant
- Multimodal Assistant
<details>
<summary><b>Usage:</b></summary>
### CLI
| Short Flag | Long Flag | Description |
|------------|-----------|-------------------------------------------------|
| -h | --help | See Usage |
| -f | --file | YAML/JSON file for agent configurations to load |
| -d | --data | JSON data for agent configurations to load |
| -p | --prompt | Prompt for chat conversation |
### API Endpoints
| Method | Endpoint | Parameters | Payload | Description |
|--------|--------------------|------------|-----------------------------------------------|---------------------------------------|
| GET | /api/health | | | Health of API Server |
| GET | /api/agents/{name} | name | | Get Agent configuration by name |
| GET | /api/agents | | | Get all Agent configurations |
| POST | /api/agents | | {"name": "agent_name", "llm_config": {...}} | Load agent configurations |
| POST | /api/chat/ | prompt | {"prompt": "This is a prompt for the agents"} | Prompt the agents provided |
</details>
<details>
<summary><b>Example:</b></summary>
### CLI Example
```bash
genius-agent --prompt "Create Snake using Pygame" --file "./agent_configs.yml"
```
<details>
<summary><b>Agent Config in YAML:</b></summary>
```yaml
---
agents:
- name: user_proxy
code_execution_config:
work_dir: coding
user_docker: false
llm_config:
seed: 42
temperature: 0
config_list:
- model: mistral-7b-instruct-v0.1.Q4_K_S
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
filter_dict:
model:
- mistral-7b-instruct-v0.1.Q4_K_S
request_timeout: 3600
repeat_penalty: 1.1
functions:
- name: python
description: run arbitrary python and return the result
parameters:
type: object
properties:
cell:
type: string
description: Valid Python code to execute.
required:
- cell
- name: bash
description: run a shell script and return the execution result.
parameters:
type: object
properties:
script:
type: string
description: Valid shell script to execute
required:
- script
- name: media_downloader
description: run media-downloader to download a video or audio from the internet
parameters:
type: object
properties:
url:
type: string
description: Valid url to download
audio:
type: bool
description: This optional argument is used if the link wants to be saved
as an mp3 or audio only
directory:
type: string
description: Directory to save the video
required:
- url
- name: write_to_file
description: Use this function to write content to a file
parameters:
type: object
properties:
filename:
type: string
description: The filename to write to
content:
type: string
description: The content to write
required:
- filename
- content
- name: read_from_file
description: Use this function to read the content of a file
parameters:
type: object
properties:
filename:
type: string
description: The filename to read from
required:
- filename
- name: read_pdf
description: Use this function to read the content of a pdf file
parameters:
type: object
properties:
filename:
type: string
description: The filename to read from
required:
- filename
- name: create_directory
description: Use this function to create a directory
parameters:
type: object
properties:
directory_path:
type: string
description: The directory path to create
required:
- directory_path
function_map:
python: exec_python
bash: exec_bash
media_download: exec_media_downloader
write_to_file: exec_write_to_file
read_from_file: exec_read_from_file
create_directory: exec_create_directory
human_input_mode: NEVER # Never - Never wait for human input, Alawys - Always waits for input from user before AI begins, Terminate - Wait for input for user when conversation terminates
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
max_consecutive_auto_reply: 10
agent_type: user_proxy
- name: validator
llm_config:
seed: 42
temperature: 0
config_list:
- model: mistral-7b-instruct-v0.1.Q4_K_S
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
filter_dict:
model:
- mistral-7b-instruct-v0.1.Q4_K_S
request_timeout: 3600
repeat_penalty: 1.1
functions:
function_map:
instructions: Validator. Execute the code written by the engineer and report the
result. Reply `TERMINATE` in the end when everything is done.
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
agent_type: user_proxy
- name: engineer
llm_config:
seed: 42
temperature: 0
config_list:
- model: mistral-7b-instruct-v0.1.Q4_K_S
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
filter_dict:
model:
- mistral-7b-instruct-v0.1.Q4_K_S
request_timeout: 3600
repeat_penalty: 1.1
functions:
- name: python
description: run arbitrary python and return the result
parameters:
type: object
properties:
cell:
type: string
description: Valid Python code to execute.
required:
- cell
- name: bash
description: run a shell script and return the execution result.
parameters:
type: object
properties:
script:
type: string
description: Valid shell script to execute
required:
- script
- name: media_downloader
description: run media-downloader to download a video or audio from the internet
parameters:
type: object
properties:
url:
type: string
description: Valid url to download
audio:
type: bool
description: This optional argument is used if the link wants to be saved
as an mp3 or audio only
directory:
type: string
description: Directory to save the video
required:
- url
- name: write_to_file
description: Use this function to write content to a file
parameters:
type: object
properties:
filename:
type: string
description: The filename to write to
content:
type: string
description: The content to write
required:
- filename
- content
- name: read_from_file
description: Use this function to read the content of a file
parameters:
type: object
properties:
filename:
type: string
description: The filename to read from
required:
- filename
- name: read_pdf
description: Use this function to read the content of a pdf file
parameters:
type: object
properties:
filename:
type: string
description: The filename to read from
required:
- filename
- name: create_directory
description: Use this function to create a directory
parameters:
type: object
properties:
directory_path:
type: string
description: The directory path to create
required:
- directory_path
function_map:
python: exec_python
bash: exec_bash
media_download: exec_media_downloader
write_to_file: exec_write_to_file
read_from_file: exec_read_from_file
create_directory: exec_create_directory
instructions: Engineer. You follow an approved plan. You write python/shell code
to solve tasks. Wrap the code in a code block that specifies the script type.
The user can't modify your code. So do not suggest incomplete code which requires
others to modify. Don't use a code block if it's not intended to be executed by
the executor. Don't include multiple code blocks in one response. Do not ask others
to copy and paste the result. Check the execution result returned by the executor.
If the result indicates there is an error, fix the error and output the code again.
Suggest the full code instead of partial code or code changes. If the error can't
be fixed or if the task is not solved even after the code is executed successfully,
analyze the problem, revisit your assumption, collect additional info you need,
and think of a different approach to try. Reply `TERMINATE` in the end when everything
is done.
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
agent_type: assistant
- name: financial_advisor
llm_config:
seed: 42
temperature: 0
config_list:
- model: mistral-7b-instruct-v0.1.Q4_K_S
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
filter_dict:
model:
- mistral-7b-instruct-v0.1.Q4_K_S
request_timeout: 3600
repeat_penalty: 1.1
functions:
- name: get_stock_price
description: Get the latest closing price of a stock using its ticker symbol
parameters:
type: object
properties:
cell:
type: string
description: The ticker symbol of the stock
required:
- symbol
function_map:
get_stock_price: exec_get_stock_price
instructions: Scientist. You follow an approved plan. You are able to categorize
papers after seeing their abstracts printed. You don't write code.
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
agent_type: assistant
- name: planner
llm_config:
seed: 42
temperature: 0
config_list:
- model: mistral-7b-instruct-v0.1.Q4_K_S
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
filter_dict:
model:
- mistral-7b-instruct-v0.1.Q4_K_S
request_timeout: 3600
repeat_penalty: 1.1
functions:
function_map:
instructions: Planner. Suggest a plan. Revise the plan based on feedback from
admin, critic, and aid, until admin approval. The plan may involve an engineer
who can write code and a scientist who doesn't write code. Explain the plan first.
Be clear which step is performed by an engineer, and which step is performed by
a scientist. Reply `TERMINATE` in the end when everything is done.
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
agent_type: assistant
- name: retrieve_engineer
llm_config:
seed: 42
temperature: 0
config_list:
- model: yarn-mistral-7b-128k.Q3_K_L
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
- model: llama-2-7b-chat.ggmlv3.q4_K_S
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
- model: mistral-7b--instruct-v0.1.Q5_K_S
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
- model: TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
- model: codellama-7b-instruct
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
- model: gpt-4-32k
api_key: NA
- model: gpt-4-32k
api_key: NA
api_base: NA
api_type: azure
api_version: 2023-06-01-preview
- model: gpt-4-32k-0314
api_key: NA
api_base: NA
api_type: azure
api_version: 2023-06-01-preview
filter_dict:
model:
- yarn-mistral-7b-128k.Q3_K_L
- llama-2-7b-chat.ggmlv3.q4_K_S
- mistral-7b--instruct-v0.1.Q5_K_S
- TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin
- mistral-7b-instruct-v0.1.Q8_0
- codellama-7b-instruct
request_timeout: 3600
repeat_penalty: 1.1
functions:
- name: python
description: run arbitrary python and return the result
parameters:
type: object
properties:
cell:
type: string
description: Valid Python code to execute.
required:
- cell
- name: bash
description: run a shell script and return the execution result.
parameters:
type: object
properties:
script:
type: string
description: Valid shell script to execute
required:
- script
- name: media_downloader
description: run media-downloader to download a video or audio from the internet
parameters:
type: object
properties:
url:
type: string
description: Valid url to download
audio:
type: bool
description: This optional argument is used if the link wants to be saved
as an mp3 or audio only
directory:
type: string
description: Directory to save the video
required:
- url
- name: write_to_file
description: Use this function to write content to a file
parameters:
type: object
properties:
filename:
type: string
description: The filename to write to
content:
type: string
description: The content to write
required:
- filename
- content
- name: read_from_file
description: Use this function to read the content of a file
parameters:
type: object
properties:
filename:
type: string
description: The filename to read from
required:
- filename
- name: read_pdf
description: Use this function to read the content of a pdf file
parameters:
type: object
properties:
filename:
type: string
description: The filename to read from
required:
- filename
- name: create_directory
description: Use this function to create a directory
parameters:
type: object
properties:
directory_path:
type: string
description: The directory path to create
required:
- directory_path
function_map:
python: exec_python
bash: exec_bash
media_download: exec_media_downloader
write_to_file: exec_write_to_file
read_from_file: exec_read_from_file
create_directory: exec_create_directory
instructions: Geniusbot Engineer. You are the engineer that developed the Python
modules in the documents retrieved. Reply `TERMINATE` in the end when everything
is done.
human_input_mode: NEVER
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
max_consecutive_auto_reply: 10
retrieve_config:
task: code
docs_path:
- "https://raw.githubusercontent.com/Knuckles-Team/media-downloader/main/README.md"
- "https://raw.githubusercontent.com/Knuckles-Team/repository-manager/main/README.md"
get_or_create: true
embedding_model: "all-mpnet-base-v2"
chunk_token_size: 3000
model: "gpt-4" # Only for determining token size: Options are: 32k 32000 , 16k for 16000 gpt-4 8000 or something else for 4000
agent_type: retrieve_user_proxy
- name: retrieve_assistant
llm_config:
seed: 42
temperature: 0
config_list:
- model: yarn-mistral-7b-128k.Q3_K_L
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
filter_dict:
model:
- yarn-mistral-7b-128k.Q3_K_L
request_timeout: 3600
repeat_penalty: 1.1
functions:
function_map:
instructions: Retrieve assistant. You are in charge of providing information to the other agents relevant to the task at hand.
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
agent_type: retrieve_assistant
- name: teachable_assistant
llm_config:
seed: 42
temperature: 0
config_list:
- model: codellama-7b-instruct
api_key: NA
api_base: http://localhost:8080/v1
api_type: openai
api_version: v1
filter_dict:
model:
- codellama-7b-instruct
request_timeout: 3600
repeat_penalty: 1.1
functions:
function_map:
instructions: Critic. Double check plan, claims, code from other agents and provide
feedback. "Check whether the plan includes adding verifiable info such as source
URL. Reply `TERMINATE` in the end when everything is done.
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
teach_config:
verbosity: 0
reset_db: true
path_to_db_dir: "."
recall_threshold: 1.5
agent_type: teachable
- name: gpt_assistant
llm_config:
seed: 42
temperature: 0
assistant_id: ""
config_list:
- model: gpt-4-32k-0314
api_key: NA
api_base: NA
api_type: azure
api_version: 2023-06-01-preview
filter_dict:
model:
- gpt-4-32k-0314
request_timeout: 3600
tools:
- type: "function"
function: ossinsight_api_schema
function_map:
get_oss_insights: exec_get_ossinsight
instructions: Hello, Open Source Project Analyst. You'll conduct comprehensive evaluations of open source projects
or organizations on the GitHub platform,
analyzing project trajectories, contributor engagements, open source trends, and other vital parameters.
Please carefully read the context of the conversation to identify the current analysis question or problem that needs add
is_termination_msg: 'lambda x: isinstance(x, dict) and x.get("content") is not None and "TERMINATE" == str(x.get("content", ""))[-9:].upper()'
agent_type: gpt_assistant
```
</details>
<details>
<summary><b>Agent Config in JSON:</b></summary>
```json
{
"agents": [
{
"name": "user_proxy",
"code_execution_config": {
"work_dir": "coding",
"user_docker": false
},
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "mistral-7b-instruct-v0.1.Q4_K_S",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
}
],
"filter_dict": {
"model": [
"mistral-7b-instruct-v0.1.Q4_K_S"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": [
{
"name": "python",
"description": "run arbitrary python and return the result",
"parameters": {
"type": "object",
"properties": {
"cell": {
"type": "string",
"description": "Valid Python code to execute."
}
},
"required": [
"cell"
]
}
},
{
"name": "bash",
"description": "run a shell script and return the execution result.",
"parameters": {
"type": "object",
"properties": {
"script": {
"type": "string",
"description": "Valid shell script to execute"
}
},
"required": [
"script"
]
}
},
{
"name": "media_downloader",
"description": "run media-downloader to download a video or audio from the internet",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Valid url to download"
},
"audio": {
"type": "bool",
"description": "This optional argument is used if the link wants to be saved as an mp3 or audio only"
},
"directory": {
"type": "string",
"description": "Directory to save the video"
}
},
"required": [
"url"
]
}
},
{
"name": "write_to_file",
"description": "Use this function to write content to a file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to write to"
},
"content": {
"type": "string",
"description": "The content to write"
}
},
"required": [
"filename",
"content"
]
}
},
{
"name": "read_from_file",
"description": "Use this function to read the content of a file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to read from"
}
},
"required": [
"filename"
]
}
},
{
"name": "read_pdf",
"description": "Use this function to read the content of a pdf file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to read from"
}
},
"required": [
"filename"
]
}
},
{
"name": "create_directory",
"description": "Use this function to create a directory",
"parameters": {
"type": "object",
"properties": {
"directory_path": {
"type": "string",
"description": "The directory path to create"
}
},
"required": [
"directory_path"
]
}
}
],
"function_map": {
"python": "exec_python",
"bash": "exec_bash",
"media_download": "exec_media_downloader",
"write_to_file": "exec_write_to_file",
"read_from_file": "exec_read_from_file",
"create_directory": "exec_create_directory"
}
},
"human_input_mode": "NEVER",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"max_consecutive_auto_reply": 10,
"agent_type": "user_proxy"
},
{
"name": "validator",
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "mistral-7b-instruct-v0.1.Q4_K_S",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
}
],
"filter_dict": {
"model": [
"mistral-7b-instruct-v0.1.Q4_K_S"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": null,
"function_map": null
},
"instructions": "Validator. Execute the code written by the engineer and report the result. Reply `TERMINATE` in the end when everything is done.",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"agent_type": "user_proxy"
},
{
"name": "engineer",
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "mistral-7b-instruct-v0.1.Q4_K_S",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
}
],
"filter_dict": {
"model": [
"mistral-7b-instruct-v0.1.Q4_K_S"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": [
{
"name": "python",
"description": "run arbitrary python and return the result",
"parameters": {
"type": "object",
"properties": {
"cell": {
"type": "string",
"description": "Valid Python code to execute."
}
},
"required": [
"cell"
]
}
},
{
"name": "bash",
"description": "run a shell script and return the execution result.",
"parameters": {
"type": "object",
"properties": {
"script": {
"type": "string",
"description": "Valid shell script to execute"
}
},
"required": [
"script"
]
}
},
{
"name": "media_downloader",
"description": "run media-downloader to download a video or audio from the internet",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Valid url to download"
},
"audio": {
"type": "bool",
"description": "This optional argument is used if the link wants to be saved as an mp3 or audio only"
},
"directory": {
"type": "string",
"description": "Directory to save the video"
}
},
"required": [
"url"
]
}
},
{
"name": "write_to_file",
"description": "Use this function to write content to a file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to write to"
},
"content": {
"type": "string",
"description": "The content to write"
}
},
"required": [
"filename",
"content"
]
}
},
{
"name": "read_from_file",
"description": "Use this function to read the content of a file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to read from"
}
},
"required": [
"filename"
]
}
},
{
"name": "read_pdf",
"description": "Use this function to read the content of a pdf file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to read from"
}
},
"required": [
"filename"
]
}
},
{
"name": "create_directory",
"description": "Use this function to create a directory",
"parameters": {
"type": "object",
"properties": {
"directory_path": {
"type": "string",
"description": "The directory path to create"
}
},
"required": [
"directory_path"
]
}
}
],
"function_map": {
"python": "exec_python",
"bash": "exec_bash",
"media_download": "exec_media_downloader",
"write_to_file": "exec_write_to_file",
"read_from_file": "exec_read_from_file",
"create_directory": "exec_create_directory"
}
},
"instructions": "Engineer. You follow an approved plan. You write python/shell code to solve tasks. Wrap the code in a code block that specifies the script type. The user can't modify your code. So do not suggest incomplete code which requires others to modify. Don't use a code block if it's not intended to be executed by the executor. Don't include multiple code blocks in one response. Do not ask others to copy and paste the result. Check the execution result returned by the executor. If the result indicates there is an error, fix the error and output the code again. Suggest the full code instead of partial code or code changes. If the error can't be fixed or if the task is not solved even after the code is executed successfully, analyze the problem, revisit your assumption, collect additional info you need, and think of a different approach to try. Reply `TERMINATE` in the end when everything is done.",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"agent_type": "assistant"
},
{
"name": "financial_advisor",
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "mistral-7b-instruct-v0.1.Q4_K_S",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
}
],
"filter_dict": {
"model": [
"mistral-7b-instruct-v0.1.Q4_K_S"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": [
{
"name": "get_stock_price",
"description": "Get the latest closing price of a stock using its ticker symbol",
"parameters": {
"type": "object",
"properties": {
"cell": {
"type": "string",
"description": "The ticker symbol of the stock"
}
},
"required": [
"symbol"
]
}
}
],
"function_map": {
"get_stock_price": "exec_get_stock_price"
}
},
"instructions": "Scientist. You follow an approved plan. You are able to categorize papers after seeing their abstracts printed. You don't write code.",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"agent_type": "assistant"
},
{
"name": "planner",
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "mistral-7b-instruct-v0.1.Q4_K_S",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
}
],
"filter_dict": {
"model": [
"mistral-7b-instruct-v0.1.Q4_K_S"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": null,
"function_map": null
},
"instructions": "Planner. Suggest a plan. Revise the plan based on feedback from admin, critic, and aid, until admin approval. The plan may involve an engineer who can write code and a scientist who doesn't write code. Explain the plan first. Be clear which step is performed by an engineer, and which step is performed by a scientist. Reply `TERMINATE` in the end when everything is done.",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"agent_type": "assistant"
},
{
"name": "retrieve_engineer",
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "yarn-mistral-7b-128k.Q3_K_L",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
},
{
"model": "llama-2-7b-chat.ggmlv3.q4_K_S",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
},
{
"model": "mistral-7b--instruct-v0.1.Q5_K_S",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
},
{
"model": "TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
},
{
"model": "codellama-7b-instruct",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
},
{
"model": "gpt-4-32k",
"api_key": "NA"
},
{
"model": "gpt-4-32k",
"api_key": "NA",
"api_base": "NA",
"api_type": "azure",
"api_version": "2023-06-01-preview"
},
{
"model": "gpt-4-32k-0314",
"api_key": "NA",
"api_base": "NA",
"api_type": "azure",
"api_version": "2023-06-01-preview"
}
],
"filter_dict": {
"model": [
"yarn-mistral-7b-128k.Q3_K_L",
"llama-2-7b-chat.ggmlv3.q4_K_S",
"mistral-7b--instruct-v0.1.Q5_K_S",
"TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin",
"mistral-7b-instruct-v0.1.Q8_0",
"codellama-7b-instruct"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": [
{
"name": "python",
"description": "run arbitrary python and return the result",
"parameters": {
"type": "object",
"properties": {
"cell": {
"type": "string",
"description": "Valid Python code to execute."
}
},
"required": [
"cell"
]
}
},
{
"name": "bash",
"description": "run a shell script and return the execution result.",
"parameters": {
"type": "object",
"properties": {
"script": {
"type": "string",
"description": "Valid shell script to execute"
}
},
"required": [
"script"
]
}
},
{
"name": "media_downloader",
"description": "run media-downloader to download a video or audio from the internet",
"parameters": {
"type": "object",
"properties": {
"url": {
"type": "string",
"description": "Valid url to download"
},
"audio": {
"type": "bool",
"description": "This optional argument is used if the link wants to be saved as an mp3 or audio only"
},
"directory": {
"type": "string",
"description": "Directory to save the video"
}
},
"required": [
"url"
]
}
},
{
"name": "write_to_file",
"description": "Use this function to write content to a file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to write to"
},
"content": {
"type": "string",
"description": "The content to write"
}
},
"required": [
"filename",
"content"
]
}
},
{
"name": "read_from_file",
"description": "Use this function to read the content of a file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to read from"
}
},
"required": [
"filename"
]
}
},
{
"name": "read_pdf",
"description": "Use this function to read the content of a pdf file",
"parameters": {
"type": "object",
"properties": {
"filename": {
"type": "string",
"description": "The filename to read from"
}
},
"required": [
"filename"
]
}
},
{
"name": "create_directory",
"description": "Use this function to create a directory",
"parameters": {
"type": "object",
"properties": {
"directory_path": {
"type": "string",
"description": "The directory path to create"
}
},
"required": [
"directory_path"
]
}
}
],
"function_map": {
"python": "exec_python",
"bash": "exec_bash",
"media_download": "exec_media_downloader",
"write_to_file": "exec_write_to_file",
"read_from_file": "exec_read_from_file",
"create_directory": "exec_create_directory"
}
},
"instructions": "Geniusbot Engineer. You are the engineer that developed the Python modules in the documents retrieved. Reply `TERMINATE` in the end when everything is done.",
"human_input_mode": "NEVER",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"max_consecutive_auto_reply": 10,
"retrieve_config": {
"task": "code",
"docs_path": [
"https://raw.githubusercontent.com/Knuckles-Team/media-downloader/main/README.md",
"https://raw.githubusercontent.com/Knuckles-Team/repository-manager/main/README.md"
],
"get_or_create": true,
"embedding_model": "all-mpnet-base-v2",
"chunk_token_size": 3000,
"model": "gpt-4"
},
"agent_type": "retrieve_user_proxy"
},
{
"name": "retrieve_assistant",
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "yarn-mistral-7b-128k.Q3_K_L",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
}
],
"filter_dict": {
"model": [
"yarn-mistral-7b-128k.Q3_K_L"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": null,
"function_map": null
},
"instructions": "Retrieve assistant. You are in charge of providing information to the other agents relevant to the task at hand.",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"agent_type": "retrieve_assistant"
},
{
"name": "teachable_assistant",
"llm_config": {
"seed": 42,
"temperature": 0,
"config_list": [
{
"model": "codellama-7b-instruct",
"api_key": "NA",
"api_base": "http://localhost:8080/v1",
"api_type": "openai",
"api_version": "v1"
}
],
"filter_dict": {
"model": [
"codellama-7b-instruct"
]
},
"request_timeout": 3600,
"repeat_penalty": 1.1,
"functions": null,
"function_map": null
},
"instructions": "Critic. Double check plan, claims, code from other agents and provide feedback. \"Check whether the plan includes adding verifiable info such as source URL. Reply `TERMINATE` in the end when everything is done.",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"teach_config": {
"verbosity": 0,
"reset_db": true,
"path_to_db_dir": ".",
"recall_threshold": 1.5
},
"agent_type": "teachable"
},
{
"name": "gpt_assistant",
"llm_config": {
"seed": 42,
"temperature": 0,
"assistant_id": "",
"config_list": [
{
"model": "gpt-4-32k-0314",
"api_key": "NA",
"api_base": "NA",
"api_type": "azure",
"api_version": "2023-06-01-preview"
}
],
"filter_dict": {
"model": [
"gpt-4-32k-0314"
]
},
"request_timeout": 3600,
"tools": [
{
"type": "function",
"function": "ossinsight_api_schema"
}
],
"function_map": {
"get_oss_insights": "exec_get_ossinsight"
}
},
"instructions": "Hello, Open Source Project Analyst. You'll conduct comprehensive evaluations of open source projects or organizations on the GitHub platform, analyzing project trajectories, contributor engagements, open source trends, and other vital parameters. Please carefully read the context of the conversation to identify the current analysis question or problem that needs add",
"is_termination_msg": "lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()",
"agent_type": "gpt_assistant"
}
]
}
```
</details>
### Standalone API Server
```bash
uvicorn genius_agent_api:app --reload --host "0.0.0.0" --port 7999
```
Test server
```bash
curl --header "Content-Type: application/json" --request POST --data '{"prompt":"Write a game in python"}' http://localhost:3001/api/chat
```
### Docker API Server
Dockerfile
```dockerfile
FROM python:3.11.6-slim-bookworm AS base
RUN apt update && apt upgrade -y && pip install --upgrade pip
RUN pip install --upgrade genius-agent[rag,openai,chromadb,pgvector,api,memgpt]
CMD ["uvicorn", "genius_agent_api:app", "--reload", "--host", "0.0.0.0", "--port", "7999"]
```
docker-compose.yml
```yaml
---
version: '3.9'
services:
genius-agent:
build: .
container_name: genius-agent
hostname: genius-agent
restart: unless-stopped
logging:
options:
max-size: "10m"
max-file: "5"
environment:
- VIRTUAL_HOST=genius-agent.com # NGINX Reverse Proxy
- VIRTUAL_PORT=7999
ports:
- "7999:7999"
```
Run:
```bash
docker compose up --build -d
```
### Execute API Call
```bash
curl -vX POST http://localhost:7999/agents_config/load -d @agent_configs.json --header "Content-Type: application/json"
```
</details>
<details>
<summary><b>Installation Instructions:</b></summary>
Core dependencies
```bash
python -m pip install genius-agent
```
All dependencies
```bash
python -m pip install genius-agent[rag,openai,chromadb,pgvector,api,memgpt]
```
</details>
<details>
<summary><b>Repository Owners:</b></summary>
<img width="100%" height="180em" src="https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true" />
![GitHub followers](https://img.shields.io/github/followers/Knucklessg1)
![GitHub User's stars](https://img.shields.io/github/stars/Knucklessg1)
</details>
Credits to OpenAI and Microsoft for usage in project!
Raw data
{
"_id": null,
"home_page": "https://github.com/Knuckles-Team/genius-agent",
"name": "genius-agent",
"maintainer": "Audel Rouhi",
"docs_url": null,
"requires_python": "",
"maintainer_email": "knucklessg1@gmail.com",
"keywords": "",
"author": "Audel Rouhi",
"author_email": "knucklessg1@gmail.com",
"download_url": "",
"platform": null,
"description": "# Genius Agent\n\n![PyPI - Version](https://img.shields.io/pypi/v/genius-agent)\n![PyPI - Downloads](https://img.shields.io/pypi/dd/genius-agent)\n![GitHub Repo stars](https://img.shields.io/github/stars/Knuckles-Team/genius-agent)\n![GitHub forks](https://img.shields.io/github/forks/Knuckles-Team/genius-agent)\n![GitHub contributors](https://img.shields.io/github/contributors/Knuckles-Team/genius-agent)\n![PyPI - License](https://img.shields.io/pypi/l/genius-agent)\n![GitHub](https://img.shields.io/github/license/Knuckles-Team/genius-agent)\n\n![GitHub last commit (by committer)](https://img.shields.io/github/last-commit/Knuckles-Team/genius-agent)\n![GitHub pull requests](https://img.shields.io/github/issues-pr/Knuckles-Team/genius-agent)\n![GitHub closed pull requests](https://img.shields.io/github/issues-pr-closed/Knuckles-Team/genius-agent)\n![GitHub issues](https://img.shields.io/github/issues/Knuckles-Team/genius-agent)\n\n![GitHub top language](https://img.shields.io/github/languages/top/Knuckles-Team/genius-agent)\n![GitHub language count](https://img.shields.io/github/languages/count/Knuckles-Team/genius-agent)\n![GitHub repo size](https://img.shields.io/github/repo-size/Knuckles-Team/genius-agent)\n![GitHub repo file count (file type)](https://img.shields.io/github/directory-file-count/Knuckles-Team/genius-agent)\n![PyPI - Wheel](https://img.shields.io/pypi/wheel/genius-agent)\n![PyPI - Implementation](https://img.shields.io/pypi/implementation/genius-agent)\n\n*Version: 2.11.0*\n\nDeploy agents to solve problems using Autogen\n\nThis python library will accept an agent configuration file in YAML/JSON, or as a JSON String payload in CLI \nor as a standalone uvicorn FastAPI Server\n\nThis repository comes with a Dockerfile and a docker-compose.yml file to host this yourself.\n\nAgent Types:\n- Assistant\n- User Proxy\n- Retrieve Assistant\n- Retrieve User Proxy\n- Teachable\n- MemGPT\n- GPT Assistant\n- Multimodal Assistant\n\n<details>\n <summary><b>Usage:</b></summary>\n\n### CLI\n| Short Flag | Long Flag | Description |\n|------------|-----------|-------------------------------------------------|\n| -h | --help | See Usage |\n| -f | --file | YAML/JSON file for agent configurations to load |\n| -d | --data | JSON data for agent configurations to load |\n| -p | --prompt | Prompt for chat conversation |\n\n### API Endpoints\n| Method | Endpoint | Parameters | Payload | Description |\n|--------|--------------------|------------|-----------------------------------------------|---------------------------------------| \n| GET | /api/health | | | Health of API Server |\n| GET | /api/agents/{name} | name | | Get Agent configuration by name |\n| GET | /api/agents | | | Get all Agent configurations | \n| POST | /api/agents | | {\"name\": \"agent_name\", \"llm_config\": {...}} | Load agent configurations | \n| POST | /api/chat/ | prompt | {\"prompt\": \"This is a prompt for the agents\"} | Prompt the agents provided | \n\n</details>\n\n<details>\n <summary><b>Example:</b></summary>\n\n### CLI Example\n```bash\ngenius-agent --prompt \"Create Snake using Pygame\" --file \"./agent_configs.yml\"\n```\n\n<details>\n <summary><b>Agent Config in YAML:</b></summary>\n\n```yaml\n---\nagents:\n - name: user_proxy\n code_execution_config:\n work_dir: coding\n user_docker: false\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: mistral-7b-instruct-v0.1.Q4_K_S\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n filter_dict:\n model:\n - mistral-7b-instruct-v0.1.Q4_K_S\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n - name: python\n description: run arbitrary python and return the result\n parameters:\n type: object\n properties:\n cell:\n type: string\n description: Valid Python code to execute.\n required:\n - cell\n - name: bash\n description: run a shell script and return the execution result.\n parameters:\n type: object\n properties:\n script:\n type: string\n description: Valid shell script to execute\n required:\n - script\n - name: media_downloader\n description: run media-downloader to download a video or audio from the internet\n parameters:\n type: object\n properties:\n url:\n type: string\n description: Valid url to download\n audio:\n type: bool\n description: This optional argument is used if the link wants to be saved\n as an mp3 or audio only\n directory:\n type: string\n description: Directory to save the video\n required:\n - url\n - name: write_to_file\n description: Use this function to write content to a file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to write to\n content:\n type: string\n description: The content to write\n required:\n - filename\n - content\n - name: read_from_file\n description: Use this function to read the content of a file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to read from\n required:\n - filename\n - name: read_pdf\n description: Use this function to read the content of a pdf file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to read from\n required:\n - filename\n - name: create_directory\n description: Use this function to create a directory\n parameters:\n type: object\n properties:\n directory_path:\n type: string\n description: The directory path to create\n required:\n - directory_path\n function_map:\n python: exec_python\n bash: exec_bash\n media_download: exec_media_downloader\n write_to_file: exec_write_to_file\n read_from_file: exec_read_from_file\n create_directory: exec_create_directory\n human_input_mode: NEVER # Never - Never wait for human input, Alawys - Always waits for input from user before AI begins, Terminate - Wait for input for user when conversation terminates\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n max_consecutive_auto_reply: 10\n agent_type: user_proxy\n\n - name: validator\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: mistral-7b-instruct-v0.1.Q4_K_S\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n filter_dict:\n model:\n - mistral-7b-instruct-v0.1.Q4_K_S\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n function_map:\n instructions: Validator. Execute the code written by the engineer and report the\n result. Reply `TERMINATE` in the end when everything is done.\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n agent_type: user_proxy\n\n - name: engineer\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: mistral-7b-instruct-v0.1.Q4_K_S\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n filter_dict:\n model:\n - mistral-7b-instruct-v0.1.Q4_K_S\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n - name: python\n description: run arbitrary python and return the result\n parameters:\n type: object\n properties:\n cell:\n type: string\n description: Valid Python code to execute.\n required:\n - cell\n - name: bash\n description: run a shell script and return the execution result.\n parameters:\n type: object\n properties:\n script:\n type: string\n description: Valid shell script to execute\n required:\n - script\n - name: media_downloader\n description: run media-downloader to download a video or audio from the internet\n parameters:\n type: object\n properties:\n url:\n type: string\n description: Valid url to download\n audio:\n type: bool\n description: This optional argument is used if the link wants to be saved\n as an mp3 or audio only\n directory:\n type: string\n description: Directory to save the video\n required:\n - url\n - name: write_to_file\n description: Use this function to write content to a file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to write to\n content:\n type: string\n description: The content to write\n required:\n - filename\n - content\n - name: read_from_file\n description: Use this function to read the content of a file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to read from\n required:\n - filename\n - name: read_pdf\n description: Use this function to read the content of a pdf file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to read from\n required:\n - filename\n - name: create_directory\n description: Use this function to create a directory\n parameters:\n type: object\n properties:\n directory_path:\n type: string\n description: The directory path to create\n required:\n - directory_path\n function_map:\n python: exec_python\n bash: exec_bash\n media_download: exec_media_downloader\n write_to_file: exec_write_to_file\n read_from_file: exec_read_from_file\n create_directory: exec_create_directory\n instructions: Engineer. You follow an approved plan. You write python/shell code\n to solve tasks. Wrap the code in a code block that specifies the script type.\n The user can't modify your code. So do not suggest incomplete code which requires\n others to modify. Don't use a code block if it's not intended to be executed by\n the executor. Don't include multiple code blocks in one response. Do not ask others\n to copy and paste the result. Check the execution result returned by the executor.\n If the result indicates there is an error, fix the error and output the code again.\n Suggest the full code instead of partial code or code changes. If the error can't\n be fixed or if the task is not solved even after the code is executed successfully,\n analyze the problem, revisit your assumption, collect additional info you need,\n and think of a different approach to try. Reply `TERMINATE` in the end when everything\n is done.\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n agent_type: assistant\n\n - name: financial_advisor\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: mistral-7b-instruct-v0.1.Q4_K_S\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n filter_dict:\n model:\n - mistral-7b-instruct-v0.1.Q4_K_S\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n - name: get_stock_price\n description: Get the latest closing price of a stock using its ticker symbol\n parameters:\n type: object\n properties:\n cell:\n type: string\n description: The ticker symbol of the stock\n required:\n - symbol\n function_map:\n get_stock_price: exec_get_stock_price\n instructions: Scientist. You follow an approved plan. You are able to categorize\n papers after seeing their abstracts printed. You don't write code.\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n agent_type: assistant\n\n - name: planner\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: mistral-7b-instruct-v0.1.Q4_K_S\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n filter_dict:\n model:\n - mistral-7b-instruct-v0.1.Q4_K_S\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n function_map:\n instructions: Planner. Suggest a plan. Revise the plan based on feedback from\n admin, critic, and aid, until admin approval. The plan may involve an engineer\n who can write code and a scientist who doesn't write code. Explain the plan first.\n Be clear which step is performed by an engineer, and which step is performed by\n a scientist. Reply `TERMINATE` in the end when everything is done.\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n agent_type: assistant\n\n - name: retrieve_engineer\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: yarn-mistral-7b-128k.Q3_K_L\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n - model: llama-2-7b-chat.ggmlv3.q4_K_S\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n - model: mistral-7b--instruct-v0.1.Q5_K_S\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n - model: TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n - model: codellama-7b-instruct\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n - model: gpt-4-32k\n api_key: NA\n - model: gpt-4-32k\n api_key: NA\n api_base: NA\n api_type: azure\n api_version: 2023-06-01-preview\n - model: gpt-4-32k-0314\n api_key: NA\n api_base: NA\n api_type: azure\n api_version: 2023-06-01-preview\n filter_dict:\n model:\n - yarn-mistral-7b-128k.Q3_K_L\n - llama-2-7b-chat.ggmlv3.q4_K_S\n - mistral-7b--instruct-v0.1.Q5_K_S\n - TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin\n - mistral-7b-instruct-v0.1.Q8_0\n - codellama-7b-instruct\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n - name: python\n description: run arbitrary python and return the result\n parameters:\n type: object\n properties:\n cell:\n type: string\n description: Valid Python code to execute.\n required:\n - cell\n - name: bash\n description: run a shell script and return the execution result.\n parameters:\n type: object\n properties:\n script:\n type: string\n description: Valid shell script to execute\n required:\n - script\n - name: media_downloader\n description: run media-downloader to download a video or audio from the internet\n parameters:\n type: object\n properties:\n url:\n type: string\n description: Valid url to download\n audio:\n type: bool\n description: This optional argument is used if the link wants to be saved\n as an mp3 or audio only\n directory:\n type: string\n description: Directory to save the video\n required:\n - url\n - name: write_to_file\n description: Use this function to write content to a file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to write to\n content:\n type: string\n description: The content to write\n required:\n - filename\n - content\n - name: read_from_file\n description: Use this function to read the content of a file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to read from\n required:\n - filename\n - name: read_pdf\n description: Use this function to read the content of a pdf file\n parameters:\n type: object\n properties:\n filename:\n type: string\n description: The filename to read from\n required:\n - filename\n - name: create_directory\n description: Use this function to create a directory\n parameters:\n type: object\n properties:\n directory_path:\n type: string\n description: The directory path to create\n required:\n - directory_path\n function_map:\n python: exec_python\n bash: exec_bash\n media_download: exec_media_downloader\n write_to_file: exec_write_to_file\n read_from_file: exec_read_from_file\n create_directory: exec_create_directory\n instructions: Geniusbot Engineer. You are the engineer that developed the Python\n modules in the documents retrieved. Reply `TERMINATE` in the end when everything\n is done.\n human_input_mode: NEVER\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n max_consecutive_auto_reply: 10\n retrieve_config:\n task: code\n docs_path:\n - \"https://raw.githubusercontent.com/Knuckles-Team/media-downloader/main/README.md\"\n - \"https://raw.githubusercontent.com/Knuckles-Team/repository-manager/main/README.md\"\n get_or_create: true\n embedding_model: \"all-mpnet-base-v2\"\n chunk_token_size: 3000\n model: \"gpt-4\" # Only for determining token size: Options are: 32k 32000 , 16k for 16000 gpt-4 8000 or something else for 4000\n agent_type: retrieve_user_proxy\n\n - name: retrieve_assistant\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: yarn-mistral-7b-128k.Q3_K_L\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n filter_dict:\n model:\n - yarn-mistral-7b-128k.Q3_K_L\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n function_map:\n instructions: Retrieve assistant. You are in charge of providing information to the other agents relevant to the task at hand.\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n agent_type: retrieve_assistant\n\n - name: teachable_assistant\n llm_config:\n seed: 42\n temperature: 0\n config_list:\n - model: codellama-7b-instruct\n api_key: NA\n api_base: http://localhost:8080/v1\n api_type: openai\n api_version: v1\n filter_dict:\n model:\n - codellama-7b-instruct\n request_timeout: 3600\n repeat_penalty: 1.1\n functions:\n function_map:\n instructions: Critic. Double check plan, claims, code from other agents and provide\n feedback. \"Check whether the plan includes adding verifiable info such as source\n URL. Reply `TERMINATE` in the end when everything is done.\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n teach_config:\n verbosity: 0\n reset_db: true\n path_to_db_dir: \".\"\n recall_threshold: 1.5\n agent_type: teachable\n\n - name: gpt_assistant\n llm_config:\n seed: 42\n temperature: 0\n assistant_id: \"\"\n config_list:\n - model: gpt-4-32k-0314\n api_key: NA\n api_base: NA\n api_type: azure\n api_version: 2023-06-01-preview\n filter_dict:\n model:\n - gpt-4-32k-0314\n request_timeout: 3600\n tools:\n - type: \"function\"\n function: ossinsight_api_schema\n function_map:\n get_oss_insights: exec_get_ossinsight\n instructions: Hello, Open Source Project Analyst. You'll conduct comprehensive evaluations of open source projects \n or organizations on the GitHub platform, \n analyzing project trajectories, contributor engagements, open source trends, and other vital parameters. \n Please carefully read the context of the conversation to identify the current analysis question or problem that needs add\n is_termination_msg: 'lambda x: isinstance(x, dict) and x.get(\"content\") is not None and \"TERMINATE\" == str(x.get(\"content\", \"\"))[-9:].upper()'\n agent_type: gpt_assistant\n\n\n```\n\n\n</details>\n\n\n<details>\n <summary><b>Agent Config in JSON:</b></summary>\n\n```json\n{\n \"agents\": [\n {\n \"name\": \"user_proxy\",\n \"code_execution_config\": {\n \"work_dir\": \"coding\",\n \"user_docker\": false\n },\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"mistral-7b-instruct-v0.1.Q4_K_S\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"mistral-7b-instruct-v0.1.Q4_K_S\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": [\n {\n \"name\": \"python\",\n \"description\": \"run arbitrary python and return the result\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"cell\": {\n \"type\": \"string\",\n \"description\": \"Valid Python code to execute.\"\n }\n },\n \"required\": [\n \"cell\"\n ]\n }\n },\n {\n \"name\": \"bash\",\n \"description\": \"run a shell script and return the execution result.\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"script\": {\n \"type\": \"string\",\n \"description\": \"Valid shell script to execute\"\n }\n },\n \"required\": [\n \"script\"\n ]\n }\n },\n {\n \"name\": \"media_downloader\",\n \"description\": \"run media-downloader to download a video or audio from the internet\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"url\": {\n \"type\": \"string\",\n \"description\": \"Valid url to download\"\n },\n \"audio\": {\n \"type\": \"bool\",\n \"description\": \"This optional argument is used if the link wants to be saved as an mp3 or audio only\"\n },\n \"directory\": {\n \"type\": \"string\",\n \"description\": \"Directory to save the video\"\n }\n },\n \"required\": [\n \"url\"\n ]\n }\n },\n {\n \"name\": \"write_to_file\",\n \"description\": \"Use this function to write content to a file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to write to\"\n },\n \"content\": {\n \"type\": \"string\",\n \"description\": \"The content to write\"\n }\n },\n \"required\": [\n \"filename\",\n \"content\"\n ]\n }\n },\n {\n \"name\": \"read_from_file\",\n \"description\": \"Use this function to read the content of a file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to read from\"\n }\n },\n \"required\": [\n \"filename\"\n ]\n }\n },\n {\n \"name\": \"read_pdf\",\n \"description\": \"Use this function to read the content of a pdf file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to read from\"\n }\n },\n \"required\": [\n \"filename\"\n ]\n }\n },\n {\n \"name\": \"create_directory\",\n \"description\": \"Use this function to create a directory\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"directory_path\": {\n \"type\": \"string\",\n \"description\": \"The directory path to create\"\n }\n },\n \"required\": [\n \"directory_path\"\n ]\n }\n }\n ],\n \"function_map\": {\n \"python\": \"exec_python\",\n \"bash\": \"exec_bash\",\n \"media_download\": \"exec_media_downloader\",\n \"write_to_file\": \"exec_write_to_file\",\n \"read_from_file\": \"exec_read_from_file\",\n \"create_directory\": \"exec_create_directory\"\n }\n },\n \"human_input_mode\": \"NEVER\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"max_consecutive_auto_reply\": 10,\n \"agent_type\": \"user_proxy\"\n },\n {\n \"name\": \"validator\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"mistral-7b-instruct-v0.1.Q4_K_S\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"mistral-7b-instruct-v0.1.Q4_K_S\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": null,\n \"function_map\": null\n },\n \"instructions\": \"Validator. Execute the code written by the engineer and report the result. Reply `TERMINATE` in the end when everything is done.\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"agent_type\": \"user_proxy\"\n },\n {\n \"name\": \"engineer\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"mistral-7b-instruct-v0.1.Q4_K_S\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"mistral-7b-instruct-v0.1.Q4_K_S\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": [\n {\n \"name\": \"python\",\n \"description\": \"run arbitrary python and return the result\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"cell\": {\n \"type\": \"string\",\n \"description\": \"Valid Python code to execute.\"\n }\n },\n \"required\": [\n \"cell\"\n ]\n }\n },\n {\n \"name\": \"bash\",\n \"description\": \"run a shell script and return the execution result.\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"script\": {\n \"type\": \"string\",\n \"description\": \"Valid shell script to execute\"\n }\n },\n \"required\": [\n \"script\"\n ]\n }\n },\n {\n \"name\": \"media_downloader\",\n \"description\": \"run media-downloader to download a video or audio from the internet\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"url\": {\n \"type\": \"string\",\n \"description\": \"Valid url to download\"\n },\n \"audio\": {\n \"type\": \"bool\",\n \"description\": \"This optional argument is used if the link wants to be saved as an mp3 or audio only\"\n },\n \"directory\": {\n \"type\": \"string\",\n \"description\": \"Directory to save the video\"\n }\n },\n \"required\": [\n \"url\"\n ]\n }\n },\n {\n \"name\": \"write_to_file\",\n \"description\": \"Use this function to write content to a file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to write to\"\n },\n \"content\": {\n \"type\": \"string\",\n \"description\": \"The content to write\"\n }\n },\n \"required\": [\n \"filename\",\n \"content\"\n ]\n }\n },\n {\n \"name\": \"read_from_file\",\n \"description\": \"Use this function to read the content of a file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to read from\"\n }\n },\n \"required\": [\n \"filename\"\n ]\n }\n },\n {\n \"name\": \"read_pdf\",\n \"description\": \"Use this function to read the content of a pdf file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to read from\"\n }\n },\n \"required\": [\n \"filename\"\n ]\n }\n },\n {\n \"name\": \"create_directory\",\n \"description\": \"Use this function to create a directory\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"directory_path\": {\n \"type\": \"string\",\n \"description\": \"The directory path to create\"\n }\n },\n \"required\": [\n \"directory_path\"\n ]\n }\n }\n ],\n \"function_map\": {\n \"python\": \"exec_python\",\n \"bash\": \"exec_bash\",\n \"media_download\": \"exec_media_downloader\",\n \"write_to_file\": \"exec_write_to_file\",\n \"read_from_file\": \"exec_read_from_file\",\n \"create_directory\": \"exec_create_directory\"\n }\n },\n \"instructions\": \"Engineer. You follow an approved plan. You write python/shell code to solve tasks. Wrap the code in a code block that specifies the script type. The user can't modify your code. So do not suggest incomplete code which requires others to modify. Don't use a code block if it's not intended to be executed by the executor. Don't include multiple code blocks in one response. Do not ask others to copy and paste the result. Check the execution result returned by the executor. If the result indicates there is an error, fix the error and output the code again. Suggest the full code instead of partial code or code changes. If the error can't be fixed or if the task is not solved even after the code is executed successfully, analyze the problem, revisit your assumption, collect additional info you need, and think of a different approach to try. Reply `TERMINATE` in the end when everything is done.\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"agent_type\": \"assistant\"\n },\n {\n \"name\": \"financial_advisor\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"mistral-7b-instruct-v0.1.Q4_K_S\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"mistral-7b-instruct-v0.1.Q4_K_S\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": [\n {\n \"name\": \"get_stock_price\",\n \"description\": \"Get the latest closing price of a stock using its ticker symbol\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"cell\": {\n \"type\": \"string\",\n \"description\": \"The ticker symbol of the stock\"\n }\n },\n \"required\": [\n \"symbol\"\n ]\n }\n }\n ],\n \"function_map\": {\n \"get_stock_price\": \"exec_get_stock_price\"\n }\n },\n \"instructions\": \"Scientist. You follow an approved plan. You are able to categorize papers after seeing their abstracts printed. You don't write code.\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"agent_type\": \"assistant\"\n },\n {\n \"name\": \"planner\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"mistral-7b-instruct-v0.1.Q4_K_S\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"mistral-7b-instruct-v0.1.Q4_K_S\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": null,\n \"function_map\": null\n },\n \"instructions\": \"Planner. Suggest a plan. Revise the plan based on feedback from admin, critic, and aid, until admin approval. The plan may involve an engineer who can write code and a scientist who doesn't write code. Explain the plan first. Be clear which step is performed by an engineer, and which step is performed by a scientist. Reply `TERMINATE` in the end when everything is done.\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"agent_type\": \"assistant\"\n },\n {\n \"name\": \"retrieve_engineer\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"yarn-mistral-7b-128k.Q3_K_L\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n },\n {\n \"model\": \"llama-2-7b-chat.ggmlv3.q4_K_S\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n },\n {\n \"model\": \"mistral-7b--instruct-v0.1.Q5_K_S\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n },\n {\n \"model\": \"TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n },\n {\n \"model\": \"codellama-7b-instruct\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n },\n {\n \"model\": \"gpt-4-32k\",\n \"api_key\": \"NA\"\n },\n {\n \"model\": \"gpt-4-32k\",\n \"api_key\": \"NA\",\n \"api_base\": \"NA\",\n \"api_type\": \"azure\",\n \"api_version\": \"2023-06-01-preview\"\n },\n {\n \"model\": \"gpt-4-32k-0314\",\n \"api_key\": \"NA\",\n \"api_base\": \"NA\",\n \"api_type\": \"azure\",\n \"api_version\": \"2023-06-01-preview\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"yarn-mistral-7b-128k.Q3_K_L\",\n \"llama-2-7b-chat.ggmlv3.q4_K_S\",\n \"mistral-7b--instruct-v0.1.Q5_K_S\",\n \"TheBloke/WizardLM-13B-V1.2-GGML/wizardlm-13b-v1.2.ggmlv3.q2_K.bin\",\n \"mistral-7b-instruct-v0.1.Q8_0\",\n \"codellama-7b-instruct\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": [\n {\n \"name\": \"python\",\n \"description\": \"run arbitrary python and return the result\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"cell\": {\n \"type\": \"string\",\n \"description\": \"Valid Python code to execute.\"\n }\n },\n \"required\": [\n \"cell\"\n ]\n }\n },\n {\n \"name\": \"bash\",\n \"description\": \"run a shell script and return the execution result.\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"script\": {\n \"type\": \"string\",\n \"description\": \"Valid shell script to execute\"\n }\n },\n \"required\": [\n \"script\"\n ]\n }\n },\n {\n \"name\": \"media_downloader\",\n \"description\": \"run media-downloader to download a video or audio from the internet\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"url\": {\n \"type\": \"string\",\n \"description\": \"Valid url to download\"\n },\n \"audio\": {\n \"type\": \"bool\",\n \"description\": \"This optional argument is used if the link wants to be saved as an mp3 or audio only\"\n },\n \"directory\": {\n \"type\": \"string\",\n \"description\": \"Directory to save the video\"\n }\n },\n \"required\": [\n \"url\"\n ]\n }\n },\n {\n \"name\": \"write_to_file\",\n \"description\": \"Use this function to write content to a file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to write to\"\n },\n \"content\": {\n \"type\": \"string\",\n \"description\": \"The content to write\"\n }\n },\n \"required\": [\n \"filename\",\n \"content\"\n ]\n }\n },\n {\n \"name\": \"read_from_file\",\n \"description\": \"Use this function to read the content of a file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to read from\"\n }\n },\n \"required\": [\n \"filename\"\n ]\n }\n },\n {\n \"name\": \"read_pdf\",\n \"description\": \"Use this function to read the content of a pdf file\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"filename\": {\n \"type\": \"string\",\n \"description\": \"The filename to read from\"\n }\n },\n \"required\": [\n \"filename\"\n ]\n }\n },\n {\n \"name\": \"create_directory\",\n \"description\": \"Use this function to create a directory\",\n \"parameters\": {\n \"type\": \"object\",\n \"properties\": {\n \"directory_path\": {\n \"type\": \"string\",\n \"description\": \"The directory path to create\"\n }\n },\n \"required\": [\n \"directory_path\"\n ]\n }\n }\n ],\n \"function_map\": {\n \"python\": \"exec_python\",\n \"bash\": \"exec_bash\",\n \"media_download\": \"exec_media_downloader\",\n \"write_to_file\": \"exec_write_to_file\",\n \"read_from_file\": \"exec_read_from_file\",\n \"create_directory\": \"exec_create_directory\"\n }\n },\n \"instructions\": \"Geniusbot Engineer. You are the engineer that developed the Python modules in the documents retrieved. Reply `TERMINATE` in the end when everything is done.\",\n \"human_input_mode\": \"NEVER\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"max_consecutive_auto_reply\": 10,\n \"retrieve_config\": {\n \"task\": \"code\",\n \"docs_path\": [\n \"https://raw.githubusercontent.com/Knuckles-Team/media-downloader/main/README.md\",\n \"https://raw.githubusercontent.com/Knuckles-Team/repository-manager/main/README.md\"\n ],\n \"get_or_create\": true,\n \"embedding_model\": \"all-mpnet-base-v2\",\n \"chunk_token_size\": 3000,\n \"model\": \"gpt-4\"\n },\n \"agent_type\": \"retrieve_user_proxy\"\n },\n {\n \"name\": \"retrieve_assistant\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"yarn-mistral-7b-128k.Q3_K_L\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"yarn-mistral-7b-128k.Q3_K_L\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": null,\n \"function_map\": null\n },\n \"instructions\": \"Retrieve assistant. You are in charge of providing information to the other agents relevant to the task at hand.\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"agent_type\": \"retrieve_assistant\"\n },\n {\n \"name\": \"teachable_assistant\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"config_list\": [\n {\n \"model\": \"codellama-7b-instruct\",\n \"api_key\": \"NA\",\n \"api_base\": \"http://localhost:8080/v1\",\n \"api_type\": \"openai\",\n \"api_version\": \"v1\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"codellama-7b-instruct\"\n ]\n },\n \"request_timeout\": 3600,\n \"repeat_penalty\": 1.1,\n \"functions\": null,\n \"function_map\": null\n },\n \"instructions\": \"Critic. Double check plan, claims, code from other agents and provide feedback. \\\"Check whether the plan includes adding verifiable info such as source URL. Reply `TERMINATE` in the end when everything is done.\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"teach_config\": {\n \"verbosity\": 0,\n \"reset_db\": true,\n \"path_to_db_dir\": \".\",\n \"recall_threshold\": 1.5\n },\n \"agent_type\": \"teachable\"\n },\n {\n \"name\": \"gpt_assistant\",\n \"llm_config\": {\n \"seed\": 42,\n \"temperature\": 0,\n \"assistant_id\": \"\",\n \"config_list\": [\n {\n \"model\": \"gpt-4-32k-0314\",\n \"api_key\": \"NA\",\n \"api_base\": \"NA\",\n \"api_type\": \"azure\",\n \"api_version\": \"2023-06-01-preview\"\n }\n ],\n \"filter_dict\": {\n \"model\": [\n \"gpt-4-32k-0314\"\n ]\n },\n \"request_timeout\": 3600,\n \"tools\": [\n {\n \"type\": \"function\",\n \"function\": \"ossinsight_api_schema\"\n }\n ],\n \"function_map\": {\n \"get_oss_insights\": \"exec_get_ossinsight\"\n }\n },\n \"instructions\": \"Hello, Open Source Project Analyst. You'll conduct comprehensive evaluations of open source projects or organizations on the GitHub platform, analyzing project trajectories, contributor engagements, open source trends, and other vital parameters. Please carefully read the context of the conversation to identify the current analysis question or problem that needs add\",\n \"is_termination_msg\": \"lambda x: isinstance(x, dict) and x.get(\\\"content\\\") is not None and \\\"TERMINATE\\\" == str(x.get(\\\"content\\\", \\\"\\\"))[-9:].upper()\",\n \"agent_type\": \"gpt_assistant\"\n }\n ]\n}\n\n``` \n\n\n</details>\n\n### Standalone API Server\n\n```bash\nuvicorn genius_agent_api:app --reload --host \"0.0.0.0\" --port 7999\n```\n\nTest server\n\n```bash\ncurl --header \"Content-Type: application/json\" --request POST --data '{\"prompt\":\"Write a game in python\"}' http://localhost:3001/api/chat\n```\n\n### Docker API Server\n\nDockerfile\n\n```dockerfile\nFROM python:3.11.6-slim-bookworm AS base\nRUN apt update && apt upgrade -y && pip install --upgrade pip\nRUN pip install --upgrade genius-agent[rag,openai,chromadb,pgvector,api,memgpt]\nCMD [\"uvicorn\", \"genius_agent_api:app\", \"--reload\", \"--host\", \"0.0.0.0\", \"--port\", \"7999\"]\n```\n\ndocker-compose.yml\n\n```yaml\n---\nversion: '3.9'\n\nservices:\n genius-agent:\n build: .\n container_name: genius-agent\n hostname: genius-agent\n restart: unless-stopped\n logging:\n options:\n max-size: \"10m\"\n max-file: \"5\"\n environment:\n - VIRTUAL_HOST=genius-agent.com # NGINX Reverse Proxy\n - VIRTUAL_PORT=7999\n ports:\n - \"7999:7999\"\n```\n\nRun: \n\n```bash\ndocker compose up --build -d\n```\n\n### Execute API Call\n```bash\ncurl -vX POST http://localhost:7999/agents_config/load -d @agent_configs.json --header \"Content-Type: application/json\"\n```\n\n</details>\n\n<details>\n <summary><b>Installation Instructions:</b></summary>\n\nCore dependencies\n```bash\npython -m pip install genius-agent\n```\n\nAll dependencies\n```bash\npython -m pip install genius-agent[rag,openai,chromadb,pgvector,api,memgpt]\n```\n\n</details>\n\n<details>\n <summary><b>Repository Owners:</b></summary>\n\n\n<img width=\"100%\" height=\"180em\" src=\"https://github-readme-stats.vercel.app/api?username=Knucklessg1&show_icons=true&hide_border=true&&count_private=true&include_all_commits=true\" />\n\n![GitHub followers](https://img.shields.io/github/followers/Knucklessg1)\n![GitHub User's stars](https://img.shields.io/github/stars/Knucklessg1)\n</details>\n\n\nCredits to OpenAI and Microsoft for usage in project!\n\n",
"bugtrack_url": null,
"license": "MIT",
"summary": "Create various chat agents based off YAML or JSON files of predefined configs",
"version": "2.11.0",
"project_urls": {
"Homepage": "https://github.com/Knuckles-Team/genius-agent"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "fe642f53842d09db8f5fc048a83ab4adf0447dea9af618ada4ac7cdedef18a5c",
"md5": "3c3ac9abd2baf441ca45db1c1337c8ca",
"sha256": "88fdc623f13935b54a5bf444a3748ee4a7063fc4d74013c03006fe441c4e926a"
},
"downloads": -1,
"filename": "genius_agent-2.11.0-py2.py3-none-any.whl",
"has_sig": false,
"md5_digest": "3c3ac9abd2baf441ca45db1c1337c8ca",
"packagetype": "bdist_wheel",
"python_version": "py2.py3",
"requires_python": null,
"size": 16955,
"upload_time": "2023-11-25T15:58:33",
"upload_time_iso_8601": "2023-11-25T15:58:33.141256Z",
"url": "https://files.pythonhosted.org/packages/fe/64/2f53842d09db8f5fc048a83ab4adf0447dea9af618ada4ac7cdedef18a5c/genius_agent-2.11.0-py2.py3-none-any.whl",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2023-11-25 15:58:33",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Knuckles-Team",
"github_project": "genius-agent",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"requirements": [
{
"name": "pyautogen",
"specs": [
[
"==",
"0.2.0b5"
]
]
},
{
"name": "pydantic",
"specs": [
[
"==",
"2.5.2"
]
]
},
{
"name": "openai",
"specs": [
[
"==",
"1.3.5"
]
]
}
],
"lcname": "genius-agent"
}