Overview of a Task

In the micro-agi framework, tasks represent the individual assignments that AI agents are designed to execute. They are the core units of work within the system, encapsulating the actions and objectives that the AI agents will carry out. Defining and managing tasks effectively is crucial for harnessing the capabilities of the micro-agi framework.

A task in micro-agi contains all the necessary details for an agent to perform its duties, including a description of the task, the agent responsible for it, and any specific tools that might be needed to complete the task. This design allows for a wide range of activities, from straightforward to complex, depending on the requirements of the application.

Properties of a Task

In micro-agi, each task has several key properties:

  • Description: The description is a clear and concise directive within the Task component that outlines the work to be done by the agent.

  • Agent: The task is implicitly assigned to an agent by being nested within an Agent component. The agent's role, goals, and backstory are specified in the Agent component, providing context for the task.

  • Tools: Tools can be specified as props within the Task component, equipping the agent with the necessary resources to accomplish the task. These tools can be predefined or dynamically assigned based on the task's requirements.

Creating a Task

Creating a task in micro-agi is intuitive and aligns with the declarative nature of React components. Here's how you might define a task:

<Agent role="data-analyst">
  <Task>Analyze customer feedback data</Task>
</Agent>

This snippet creates a task with a description to analyze customer feedback data and assigns it to an agent with the role of a data analyst.

Task Assignment

Tasks are assigned to agents by structuring the Task components within the corresponding Agent components. The micro-agi framework takes care of the task execution as part of the agent's workflow. The assignment can be explicit, with tasks directly nested under specific agents, or implicit, allowing any suitable agent to pick up the task based on the defined process flow.