Conversation
|
Hi @KirtiPriya07 . I will ask you to a change in order to make sure that this does not interfer with our future Monitoring connectors. Instead of having Performance Manager directly under subsystems (src/subsystems/PerformanceManager) so the subsystem (family) is "Monitoring", the service is "Performance" with the generic PerformanceConnector class and the specific connector is LocalPerformanceConnector The reason for this is that we will be adding other Monitoring services like a real time system resources (CPU, RAM ...etc) monitors. Also do you have any output example / screenshot of the current CLI implementation ? Thank you very much ! |
|
@alaa-eddine-k Hi!, I understand, will definitely relocate and send you screenshots in a while. |
|
I took some time to review the code in more details, I was not able to test it the example code fails. 1 - The PR contains modifications to Component base class ==> this is not allowed by design, as it breaks the concerns separation rule. a connector should not require dedicated functions/structures outside of itself. so instead of storing data inside of static fields, or declaring static fields inside of Component class, these structures should be part of the Performance connector or stored in separate data structures. 2 - Your LocalPerformanceConnector.class.ts does not have to redefine request() method unless there is something specific to your connector, in your case you can simply inherit the request() method from the parent (PerformanceConnector class) 3 - The performance monitoring should not be enabled by default, even if the overhead is tiny, it's not an operation that we want to have enabled by default, so by default we consider it disabled, and we can enable it using a function call. |
📝 Description
Adds a simple, low-cost performance monitoring system for SmythOS agents and LLMs.
Automatically instruments agent components (no code changes needed) and records timings, memory, data flow, and LLM-specific info (tokens, estimated cost, context use).
Provides programmatic APIs (AIPerformanceCollector, AIPerformanceAnalyzer) and example scripts so developers can fetch reports and metrics.
Includes a basic CLI (smyth agent:performance) for a real-time dashboard, reports, component analysis, and exports (JSON/CSV/Prometheus).
Built to be lightweight (sub-millisecond per component) and safe (no raw sensitive data stored).
Core instrumentation and analysis tests passed locally; CLI features still need broader end-to-end testing.
🔧 Type of Change
✅ Checklist