Automata is inspired by the theory that code is essentially a form of memory, and when furnished with the right tools, AI can evolve real-time capabilities which can potentially lead to the creation of AGI. The word automata comes from the Greek word αὐτόματος, denoting "self-acting, self-willed, self-moving,", and Automata theory is the study of abstract machines and automata, as well as the computational problems that can be solved using them.
More information follows below.
https://github.com/emrgnt-cmplxty/Automata/assets/68796651/2e1ceb8c-ac93-432b-af42-c383ea7607d7
Follow these steps to setup the Automata environment
# Clone the repository
git clone git@github.com:emrgnt-cmplxty/Automata.git && cd Automata/
# Initialize git submodules
git submodule update --init
# Install poetry and the project
pip3 install poetry && poetry install
# Configure the environment and setup files
poetry run automata configure
SCIP indices are required to run the Automata Search. These indices are used to create the code graph which relates symbols by dependencies across the codebase. New indices are generated and uploaded periodically for the Automata codebase, but programmers must be generate them manually if necessary for their local development. If you encounter issues, we recommend referring to the instructions here.
# Install dependencies and run indexing on the local codebase
poetry run automata install-indexing
# Refresh the code embeddings (after making local changes)
poetry run automata run-code-embedding
# Refresh the documentation + embeddings
poetry run automata run-doc-embedding --embedding-level=2
The following commands illustrate how to run the system with a trivial instruction. It is recommended that your initial run is something of this sort to ensure the system is working as expected.
# Run a single agent w/ trivial instruction
poetry run automata run-agent --instructions="Return true" --model=gpt-3.5-turbo-0613
# Run a single agent w/ a non-trivial instruction
poetry run automata run-agent --instructions="Explain what AutomataAgent is and how it works, include an example to initialize an instance of AutomataAgent."
Automata works by combining Large Language Models, such as GPT-4, with a vector database to form an integrated system capable of documenting, searching, and writing code. The procedure initiates with the generation of comprehensive documentation and code instances. This, coupled with search capabilities, forms the foundation for Automata's self-coding potential.
Automata employs downstream tooling to execute advanced coding tasks, continually building its expertise and autonomy. This self-coding approach mirrors an autonomous craftsman's work, where tools and techniques are consistently refined based on feedback and accumulated experience.
Sometimes the best way to understand a complicated system is to start by understanding a basic example. The following example illustrates how to run your own Automata agent. The agent will be initialized with a trivial instruction, and will then attempt to write code to fulfill the instruction. The agent will then return the result of its attempt.
from automata.config.base import AgentConfigName, OpenAIAutomataAgentConfigBuilder
from automata.agent import OpenAIAutomataAgent
from automata.singletons.dependency_factory import dependency_factory
from automata.singletons.py_module_loader import py_module_loader
from automata.tools.factory import AgentToolFactory
# Initialize the module loader to the local directory
py_module_loader.initialize()
# Construct the set of all dependencies that will be used to build the tools
toolkit_list = ["context-oracle"]
tool_dependencies = dependency_factory.build_dependencies_for_tools(toolkit_list)
# Build the tools
tools = AgentToolFactory.build_tools(toolkit_list, **tool_dependencies)
# Build the agent config
agent_config = (
OpenAIAutomataAgentConfigBuilder.from_name("automata-main")
.with_tools(tools)
.with_model("gpt-4")
.build()
)
# Initialize and run the agent
instructions = "Explain how embeddings are used by the codebase"
agent = OpenAIAutomataAgent(instructions, config=agent_config)
result = agent.run()
If you want to contribute to Automata, be sure to review the contribution guidelines. This project adheres to Automata's code of conduct. By participating, you are expected to uphold this code.
We use GitHub issues for tracking requests and bugs, please see Automata Discussions for general questions and discussion, and please direct specific questions.
The Automata project strives to abide by generally accepted best practices in open-source software development.
The ultimate goal of the Automata project is to achieve a level of proficiency where it can independently design, write, test, and refine complex software systems. This includes the ability to understand and navigate large codebases, reason about software architecture, optimize performance, and even invent new algorithms or data structures when necessary.
While the complete realization of this goal is likely to be a complex and long-term endeavor, each incremental step towards it not only has the potential to dramatically increase the productivity of human programmers, but also to shed light on fundamental questions in AI and computer science.
Automata is licensed under the Apache License 2.0.
This project is an extension of an initial effort between emrgnt-cmplxty and maks-ivanov that began with this repository.