Agent
Generate agents that belongs to your company.
Overview
The Upsonic framework features a sophisticated AgentConfiguration system that optimizes task completion through structured agent setup. This configuration mechanism creates a simulated corporate environment where agents operate with defined roles and responsibilities, ensuring focused task execution. By leveraging job title parameters, the system automatically establishes appropriate decision-making frameworks and performance objectives for each agent, streamlining the workflow process.
AgentConfigurations implement a reusable architecture that enhances system efficiency and flexibility. For instance, in server analysis scenarios, you can deploy a software engineer agent that the framework can dynamically assign to relevant tasks. This modular approach not only promotes code reusability but also optimizes the overall system’s performance through intelligent agent allocation.
Creating an Agent
The AgentConfiguration class serves as a fundamental component in ensuring optimal task execution within the system. Given its critical role, developers should allocate sufficient time to properly configure and fine-tune this class. Additionally, it is essential to conduct comprehensive testing across various configuration scenarios to validate performance and behavior under different operational conditions.
Specify LLM
To specify which LLM the agent will use, it’s sufficient to directly use the model parameter. You can check the LLM support section to see all supported LLMs.
Agent Attributest
Agents are equipped with supplementary features designed to enhance their performance and increase success rates during task execution. These configurable capabilities can be dynamically adjusted throughout the task lifecycle, allowing for real-time optimization of the agent’s processing capacity. By fine-tuning these features, users can significantly improve the probability of successful task completion while meeting specific operational requirements.
Attribute | Parameters | Type | Description |
---|---|---|---|
job_title | job_title | str | The job title of Agent. |
company_url (Optional) | company_url | str | The url of your company |
company_objective (Optional) | company_objective | str | The objective of your company |
Name (Optional) | name | str | The name of the human that represent from Agent |
Contact (Optional) | contact | str | The contact info of the human that represent from Agent |
Memory (Optional) | memory | boolean | The persistent memory by the agent id (Default: False) |
Reflection (Optional) | reflection | boolean | Reflection mode for agent. (Default: False) |
Compress Context (Optional) | compress_context | boolean | Compress the context for LLM context lenght (Default: True) |
model (Optional) | model | str | The llm model for Agent (Default: openai/gpt-4o) |
Act like an Human
During task execution, LLM-based agents may intentionally leave specific fields incomplete, requiring human input due to inherent LLM operational constraints. However, when provided with personal identifiers such as names and contact details, the system can generate fully personalized content. For example, in email composition tasks, the agent can authentically replicate a given user’s and include appropriate signature information, creating more natural and contextually appropriate communications.
Without Human Acting
In this demonstration, we will configure an agent to function as Upsonic’s marketing manager, showcasing the framework’s role-specific capabilities. Subsequently, we will demonstrate practical implementation by assigning an email composition task to this specialized agent.
In the output section, you will observe that the agent strategically leaves certain fields incomplete. This design needs human intervention and customization of critical content elements before finalization.
With Human Acting
By inputting personal identifiers, including name and contact details, we can enhance the agent’s functionality to generate complete, uninterrupted content. This configuration eliminates the need for manual field completion, enabling the agent to produce fully automated outputs without placeholder spaces.
Memory
Memory management plays a crucial role in maintaining contextual continuity across distributed tasks and timeframes for agent operations. The framework implements a disk-based persistence mechanism that associates memory storage with unique agent identifiers (IDs). To enable persistent memory functionality, developers must explicitly define and consistently maintain agent IDs across all agent definitions within their implementation.
Reflection
During task execution, agents may occasionally generate inaccurate results or misinterpret task objectives, which can significantly impact system stability and output quality, particularly when critical sub-tasks are involved. To address this challenge, the framework implements a sophisticated reflection feature that enables continuous self-monitoring and quality assurance.
Compress Context
One of the main limitations of LLMs is the Context Length Limit, which affects how much data the model can process at once when generating outputs. This directly impacts how well-referenced and accurate the results will be. The Upsonic framework handles this limitation by automatically summarizing resources when they exceed the context limit. When your input data is too large, the system compresses it while keeping the important information, allowing the LLM to continue functioning normally. This removes the need to manually calculate and manage context limits, letting you focus on your actual work.