Skip to content

Fix/stream#4

Merged
Iamsdt merged 9 commits intomainfrom
fix/stream
Sep 11, 2025
Merged

Fix/stream#4
Iamsdt merged 9 commits intomainfrom
fix/stream

Conversation

@Iamsdt
Copy link
Copy Markdown
Collaborator

@Iamsdt Iamsdt commented Sep 11, 2025

This pull request introduces several improvements and refactors to both the streaming React agent example and the PostgreSQL checkpointer implementation. The key changes focus on adding flexible synchronous and asynchronous streaming test modes, improving logging and debugging, and making the PostgreSQL connection pool initialization lazy for better resource management.

Streaming agent and test improvements:

  • Added multiple entry points to stream_react_agent.py for running streaming, non-streaming, synchronous, and synchronous streaming tests, allowing easier testing of agent modes from the command line.
  • Refactored agent logic to support both async and sync execution, including new main_agent_sync, main_agent_sync_stream, and main_agent_non_stream implementations, and corresponding graph setups for each test type. [1] [2]
  • Improved logging and debugging by initializing the logger and printing registered tools for easier troubleshooting. [1] [2] [3]

PostgreSQL checkpointer enhancements:

  • Changed PostgreSQL pool initialization to be lazy, storing configuration and only creating the pool when first needed; updated all relevant methods to use the lazy pool getter. [1] [2] [3] [4] [5] [6] [7] [8]
  • Improved state serialization to handle Enum types correctly, ensuring compatibility with JSON storage.

Documentation update:

  • Removed the TESTING.md file, which previously described test setup and organization for the PyAgenity library.

…tion tests

- Introduced a new test suite for multiagent scenarios in `test_multiagent.py`, covering various workflows including single agent, sequential, and parallel executions.
- Implemented tests for dependency injection and error handling in multiagent workflows.
- Enhanced logging configuration tests in `test_utils.py` to cover default settings, custom levels, formats, and handlers.
- Added tests to ensure logging output is captured correctly and that file handlers work as expected.
- Fixed a bug in `test_pg_checkpointer.py` by updating the pool attribute to `_pg_pool`.
@Iamsdt Iamsdt merged commit 4211c51 into main Sep 11, 2025
@Iamsdt Iamsdt deleted the fix/stream branch September 11, 2025 18:50
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