Agent
Eclipse Agent
In the Eclipse framework, an Agent is a system or program initialized with specific goals and roles, enabling interaction with a Large Language Model (LLM) through predefined prompt templates. Agents are designed to execute tasks by following a set of instructions and can be customized with various parameters to adapt their behavior to different workflows. Essentially, an agent acts as a flexible tool that can be fine-tuned to carry out specific functions based on user needs.
Agent Parameters
Goal
goal
The primary objective or goal that the agent is designed to achieve.
Role
role
The role or function that the agent will assume in its operations.
LLM Client
llm
Interface for communicating with the Large Language Model (LLM).
Prompt Template
prompt_template
Defines the structure and format of prompts sent to the LLM using PromptTemplate
.
Agent ID (optional)
agent_id
A unique identifier for the agent. If not provided, a new UUID will be generated by default. Useful for tracking or referencing the agent in multi-agent environments.
Name (optional)
name
An optional name for the agent, providing a more user-friendly reference for display or logging purposes.
Description (optional)
description
An optional description that provides additional context or details about the agent’s purpose and capabilities.
Engines (optional)
engines
A list of engines (or lists of engines) that the agent can utilize. This allows for flexibility in processing and task execution based on different capabilities or configurations.
Output Format (optional)
output_format
Specifies the desired format for the agent’s output, dictating how results are structured and presented.
Max Retry (optional)
max_retry
The maximum number of retry attempts for operations that may fail. Default is set to 5. This is particularly useful in scenarios where transient errors may occur, ensuring robust execution.
Example Usage
Agent Configuration
Sequence Execution
In sequence execution, engines are performed one after another, with each engine waiting for the previous one to finish before starting. This approach is simple but can be slow if engines are independent.
Alternate Configuration:
Parallel Execution
In parallel execution, engines run simultaneously, speeding up the process by utilizing multiple threads or processes.
Alternate Configuration:
Mixed Execution (Sequence and Parallel)
Agents can also be configured to use a combination of sequence and parallel execution modes.
Alternate Configuration:
By configuring agents with sequence, parallel, or mixed execution modes, you can optimize task processing to suit the specific requirements of your application.
Last updated