Introduce Plugin Architecture to ax/llm for Enhanced Agent Flow Tracing #62
TYRONEMICHAEL
started this conversation in
Ideas
Replies: 1 comment
-
sorry was a bit busy. yes i'm open to a plugin system, i'm thinking of it as hooks that can be used for whatever. not sure as yet if telemetry should be a hook (maybe it should) technically we use an open standard so it's kinda a plugin. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Introduce Plugin Architecture to ax/llm with Strongly Typed Contexts
Overview
This proposes adding a simple, strongly-typed plugin architecture to ax/llm, allowing developers to extend functionality at specific points in the code without modifying the core library.
Motivation
Currently, features like debugging and telemetry are tightly coupled with the core library. A plugin system with strongly typed contexts would:
'm currently working on a system to compose agents using react-flow, and I need a way to hook into specific events in the ax/llm execution flow in order to "react" when composing agents.
Proposal
Introduce a lightweight plugin system that allows hooking into key points of the ax/llm execution flow, with strongly typed contexts for each execution point.
Plugin Interface with Typed Contexts
Plugin Manager
Example: Refactoring the chat method
Here's a simplified example of how the current chat method could be refactored to use the strongly typed plugin system:
This approach would replace the current tracer implementation, allowing for more flexible and type-safe logging and telemetry solutions.
Benefits
Next Steps
If there's interest in this concept, we could:
I welcome your thoughts on this proposal. This architecture could significantly enhance ax/llm's flexibility, extensibility, with type safety.
Beta Was this translation helpful? Give feedback.
All reactions