First Release - v0.0.1
Pre-releaseAutomata's objective is to evolve into a fully autonomous, self-programming Artificial Intelligence system.
This project 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
# Run a single agent w/ trivial instruction
automata run-agent --instructions="Return true" --model=gpt-3.5-turbo-0613
# Run a single agent w/ a non-trivial instruction
automata run-agent --instructions="Explain what AutomataAgent is and how it works, include an example to initialize an instance of AutomataAgent." --model=gpt-3.5-turbo-16k
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.
import logging
from typing import Any, Set
from automata.config.base import AgentConfigName
from automata.config.openai_agent import AutomataOpenAIAgentConfigBuilder
from automata.core.agent.agents import AutomataOpenAIAgent
from automata.core.agent.tool.tool_utils import AgentToolFactory, DependencyFactory
from automata.core.base.agent import AgentToolProviders
from automata.core.base.github_manager import GitHubManager
from automata.core.coding.py.module_loader import py_module_loader
logger = logging.getLogger(__name__)
# Initialize the module loader
py_module_loader.initialize()
# Construct the set of all dependencies that will be used to build the tools
tool_list = ["context_oracle"]
dependencies: Set[Any] = set()
tool_dependencies = {}
for tool in tool_list:
for dependency_name, _ in AgentToolFactory.TOOLKIT_TYPE_TO_ARGS[AgentToolProviders(tool)]:
if dependency_name not in dependencies:
dependencies.add(dependency_name)
logger.info(f" - Building Dependency {dependency_name}...")
tool_dependencies[dependency_name] = DependencyFactory().get(dependency_name)
# Build the tools
tools = AgentToolFactory.build_tools(tool_list, **tool_dependencies)
# Build the agent config
config_name = AgentConfigName("automata_main")
agent_config = (
AutomataOpenAIAgentConfigBuilder.from_name(config_name)
.with_tools(tools)
.with_model("gpt-4")
.build()
)
# Initialize the agent
instructions = "Explain how embeddings are used by the codebase"
agent = AutomataOpenAIAgent(instructions, config=agent_config)
# Run the agent
result = agent.run()