Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

v0.3.0 #2

Merged
merged 19 commits into from
Jan 4, 2025
Merged

v0.3.0 #2

merged 19 commits into from
Jan 4, 2025

Conversation

Thytu
Copy link
Owner

@Thytu Thytu commented Jan 3, 2025

Action System Refactor and Serialization Improvements

Version Update: 0.2.8 → 0.3.0

Major Changes

  • Introduced a new Action class to formalize and standardize agent actions
  • Migrated from pickle to dill for better serialization support
  • Moved default actions (talk and think) to a dedicated module
  • Improved action management API with add_action, remove_action, and execute_action methods

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 dill for better function serialization support
  • Cleaner Architecture: Default actions moved to actions/default_actions.py
  • Enhanced Type Safety: Added type hints and validation throughout

Testing & CI/CD

  • Added unit tests:
    • Action system tests
    • Agent functionality tests
    • Checkpoint manager tests
    • Interaction manager tests

Breaking Changes

  • add_new_action() replaced with add_action()
  • Action format changed from dictionary to Action class instances
  • Pickle files (.pickle) replaced with dill files (.dill)

Minor Updates

  • Added .DS_Store to 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")

Thytu and others added 19 commits January 3, 2025 17:37
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
Signed-off-by: Valentin De Matos <[email protected]>
@Thytu Thytu changed the title refactor: re-write and improve custom actions' structure v0.3.0 Jan 3, 2025
@Thytu Thytu merged commit 66c8f4a into main Jan 4, 2025
1 check passed
@Thytu Thytu deleted the refactor/structure-custom-actions branch January 4, 2025 11:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant