0.3.0
Action System Refactor and Serialization Improvements
Version Update: 0.2.8 → 0.3.0
Major Changes
- Introduced a new
Actionclass to formalize and standardize agent actions - Migrated from
pickletodillfor better serialization support - Moved default actions (
talkandthink) to a dedicated module - Improved action management API with
add_action,remove_action, andexecute_actionmethods
Key Features
- New Action Class: Actions are now first-class objects with clear interfaces and validation
- Better Action Management: More intuitive API for managing agent actions
- Improved Serialization: Using
dillfor better function serialization support - Cleaner Architecture: Default actions moved to
actions/default_actions.py - Enhanced Type Safety: Added type hints and validation throughout
Breaking Changes
add_new_action()replaced withadd_action()- Action format changed from dictionary to
Actionclass instances - Pickle files (.pickle) replaced with dill files (.dill)
Minor Updates
- Added
.DS_Storeto gitignore - Bumped version to 0.3.0
- Updated examples to use new action system
- Removed unused Environment import
- Added Action to
__all__exports
Migration Guide
Creating custom actions
# Old way
agent.add_new_action(
{
"format": "[ACTION][param]",
"prompt": "Description",
"example": "[ACTION][value]"
},
action_function
)
# New way
agent.add_action(
Action(
name="action",
description="Description",
parameters=["param"],
function=action_function
)
)Calling custom actions
# Old way
action_function(agent, "param_value")
# New way
agent.execute_action("action", "param_value")