πŸ‘¨β€πŸ’Ό Admin

What is an Admin?

Imagine Admin as the master task executor who is responsible for all the major configurations for the execution. From planning of tasks to execution, and defining the brain which is what LLM to use and whether or not to use memory.

Admin is the decision-maker that understand the specifications of tasks and execute them in a more human-like manner.

Attributes

The Admin class in the openagi library is a central component designed to manage and orchestrate various functionalities within the framework. Below is a detailed explanation of its components, attributes, and usage.

The Admin class in the OpenAGI framework can be considered an Agent.

Code Snippet

from openagi.agent import Admin

admin = Admin(
    llm=llm,
    actions=actions,
    planner=planner,
)

Below we have shown how one can initiate and run a simple admin query.

# imports
from openagi.agent import Admin
from openagi.llms.openai import OpenAIModel
from openagi.planner.task_decomposer import TaskPlanner
from openagi.actions.tools.ddg_search import DuckDuckGoSearch
from openagi.memory import Memory

# Define LLM
config = OpenAIModel.load_from_env_config()
llm = OpenAIModel(config=config)

# declare the Admin
admin = Admin(
    llm=llm,
    actions=[DuckDuckGoSearch],
    planner=TaskPlanner(human_intervene=False),
    memory=Memory(),
    output_type=OutputFormat.markdown, # Defaults to markdown
)

# execute the task
res = admin.run(
            query="sample query",
            description="sample description",
            )

Last updated