Repository navigation
v0.4.0 release
LightAgent v0.4.0 Release Notes
We are excited to announce the official release of LightAgent v0.4.0! This version upgrade brings architectural improvements with significant enhancements in performance, stability, and maintainability.
📦 Upgrade Guide
Dependency Changes:
pip install --upgrade lightagent>=0.4.0🚀 Updates
Architectural Restructuring
- New Modular Design: Core architecture restructured using SOLID principles
- Global State Elimination: 90% reduction in global variable dependencies
- Type System Enhancement: 100% type annotation coverage on critical paths
Performance Breakthrough
- Asynchronous Resource Management: Resource lifecycle automation achieved through
AsyncExitStack - Connection Pool Optimization: 300% increase in MCP session reuse rate
- Tool Loading Acceleration: New tool caching mechanism reduces repeated loading time to 1/5
✨ New Features
Core Components
| Component | Description |
|---|---|
ToolRegistry |
Unified tool registration center with dynamic filtering support |
ToolLoader |
Cached tool loader with hot update support |
LoggerManager |
Enhanced logging system integrated with TraceID |
Enterprise-Level Features
- Multi-Server MCP Management: Supports simultaneous connections to multiple MCP servers
- Intelligent Memory System: Supports context-related retrieval
- Structured Error Handling: New error classification system (Fatal/Recoverable)
⚡ Performance Optimization
| Optimization Area | Metric Improvement | Technical Solution |
|---|---|---|
| Asynchronous Calls | 40% reduction in latency | AsyncExitStack resource management |
| Tool Calls | 2.5x increase in throughput | Standardization of tool call interfaces |
| Memory Usage | 35% decrease in peak memory | Streamlined response processing |
🛠️ Developer Experience Improvements
Debugging Support
# New quick entry for debug mode
agent = LightAgent(debug=True) # Automatically enables detailed logging⚠️ Breaking Changes
-
Tool Registration Interface Change:
# Old version register_tool_manually(func) # New version tool_registry.register(func)
-
Log Format Standardization:
# Old version [ERROR] Tool call failed # New version 2025-06-10T12:00:00 [ERROR] [TraceID:abc123] tool_execution:call_failed (tool=weather_api)
🐛 Known Issues
- Slight delay in memory garbage collection for asynchronous generators in Python 3.8
- MCP multi-server mode requires explicit call to
cleanup()