π API ReferenceComponents
<Uniform>
Generate metadata for each action.
The concept is borrowed from Uniforms in a shader.
Import
Usage
Here's a simple example of using the Uniform
component:
Props
Prop | Type | Default |
---|---|---|
name | string | N/A |
description | string | N/A |
handler | Function(message) => any | N/A |
Best Practices
- Keep handlers lightweight and efficient
- Use meaningful names for uniforms
- Implement proper error handling
- Cache expensive computations when possible
- Document the uniform's purpose clearly
Common Use Cases
- Tracking conversation topics
- Monitoring agent mood or state
- Generating consistency metrics
- Adding timestamps or identifiers
- Maintaining context across actions