Welcome to MiniAgent! This framework simplifies the creation of agent-based systems using language models. Inspired by projects like AutoGen and AutoGPT, and frameworks such as Langchain, MiniAgent offers a more user-friendly approach. By leveraging plain Python, it makes the learning and debugging process more accessible for both users and developers.
MiniAgent focuses on planning and tool usage functionalities. It equips language models (LLMs) with various external tools and employs a React prompting strategy for task planning. Since LLMs primarily rely on text, MiniAgent performs a "text to action" transformation to convert tool names and arguments into actionable steps.
ArxivBot
This agent can search the related papers from Arxiv and send them to the specified email.
CVBot
This agent can parse a CV in PDF format and summarize it's content.
This guide will help you set up your development environment to run the MiniAgent project.
To get started, you'll need to create a new virtual environment and install the required dependencies. Follow the steps below:
# 1. Create a virtual environment
conda create -n miniagent python=3.10
# 2. Activate the virtual environment
conda activate miniagent
# 3. Install project dependencies
pip install -r requirements.txt
For MacOS users, we suggest following the installation instructions provided here to install miniconda.
An agent to analyze a CV.
from miniagent.tools import *
from miniagent.agent import Agent
from miniagent.llm.gpt import ChatGPT, LLMInput
from miniagent.prompt import ReactPromptTemplate
# define a llm
api_key = "xxx"
llm = ChatGPT(api_key=api_key, model_name="gpt-3.5-turbo")
# define tools
tools = ToolList([PDFReaderTool(max_length=8000)])
# define_agent
agent = Agent(
llm=llm,
tools=tools,
prompt_template=ReactPromptTemplate())
user_input = "Please help me analyze the CV in the path './examples/cv.pdf', summarize the ability and experience of this candidate, propose 10 questions according to its content."
# start!
output = agent.execute(input=user_input)
Clik to check the output of this example.
The CV of Claud D. Park highlights extensive experience in software engineering, cloud infrastructure, and security research. Here’s a summary of their abilities and experience:-
Education:
- Bachelor’s in Computer Science and Engineering from POSTECH (2010-2017).
-
Technical Skills:
- DevOps: Proficient in AWS, Docker, Kubernetes, Terraform, and CI/CD tools like Jenkins and CircleCI.
- Back-end Development: Experience with frameworks such as Koa, Express, Django, and REST API design.
- Front-end Development: Knowledge of React, Redux, HTML5, and CSS preprocessors like SASS.
- Programming Languages: Skilled in Node.js, Python, Java, and OCaml.
-
Professional Experience:
- Current Role: Founding member and Site Reliability Engineer at DanggeunPay Inc. since March 2021, responsible for designing cloud infrastructure and improving operational efficiency.
- Previous Roles: Held positions at various companies including DanggeunMarket Inc., Omnious Co., Ltd., and PLATCorp. Responsibilities ranged from infrastructure management, CI/CD pipeline setup, to software architecture.
- Research Experience: Conducted research in machine learning and computer vision during undergraduate studies.
-
Certifications:
- Multiple AWS certifications including Solutions Architect, Developer, and Security Specialty, as well as Kubernetes and HashiCorp certifications.
-
Awards and Honors:
- Recognized in international hacking competitions such as DEFCON and AWS competitions, demonstrating strong skills in security and cloud technologies.
-
Extracurricular Activities:
- Active in the hacking community, with experience in organizing competitions and mentoring aspiring hackers.
- Can you explain your experience in designing cloud infrastructure and the specific challenges you faced?
- What strategies did you implement to achieve over 30% cost savings on AWS resources?
- Describe a time when you introduced a new technology or process that significantly improved operational efficiency.
- How do you approach security in cloud environments, particularly in financial services?
- Can you provide details on how you managed the Kubernetes clusters and the specific tools you used for orchestration?
- Discuss your experience with Terraform and how it has helped in managing infrastructure as code.
- What role did you play in the on-boarding process for new engineers in your previous positions?
- How do you ensure continuous improvement in your infrastructure management practices?
- Describe a project where you implemented a CI/CD pipeline and the impact it had on the development process.
- What motivates you to stay updated with new technologies and participate in community events like hacking competitions?
This analysis and the questions can help in understanding the candidate's fit for roles involving cloud engineering, software development, and security.
You can find more details from here.
We support three types of agents:
- React Agent: Utilizes a combination of tools to fulfill user instructions.
- Response Agent: Operates based on the output of a specific tool, ideal for tasks like answering questions from URLs or PDFs.
- Human Agent: Facilitates human intervention in a multi-agent system when necessary.
Further details can be found in docs/agent.md.
Now, we only support api-based LLM. You can also use ollama to wrap a local LLM as openai style. Please check docs/llm.md to use the defined LLM.
When you want to define a prompt as a template for an agent. It should follow the format:
from miniagent.prompt import PromptTemplate
prompt = PromptTemplate(prompt="your_prompt {your_variable_1}, {your_variable_2}", input_variables=['your_variable_1', 'your_variable_2'])
The react prompt is defined in miniagent/prompt/react.py.
The following tools are supported:
- Gmail: Send emails directly.
- Arxiv: Search for academic papers on Arxiv.
- Search Engine: Retrieve related information from the internet.
- PDF Reader: Convert PDF files into text format for easy access.
- Scrap: Extract information from specified URLs.
For more detailed information about these tools, please see docs/tools.md.
This project was supported by Likelihood Lab. If you have any questions, please feel free to post an issue or email rayyang0116@gmail.com.