Commit 96830c5
ADK Middleware Integration (#274)
* feat: initial implementation of ADK middleware for AG-UI Protocol
- Add core ADKAgent class for bridging Google ADK with AG-UI Protocol
- Implement event translation between ADK and AG-UI protocols
- Add agent registry for managing multiple ADK agents
- Include session lifecycle management with configurable timeouts
- Create FastAPI integration with SSE streaming support
- Add comprehensive test suite with all tests passing
- Include example FastAPI server implementation
- Support both in-memory and custom service implementations
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: major refactoring and enhancements to ADK middleware
- Add app_name as required first parameter to ADKAgent constructor
- Implement comprehensive logging system with component-specific loggers
- Add 14 comprehensive automated tests with 100% pass rate
- Refactor to SessionLifecycleManager singleton for centralized session management
- Implement thread-safe event translation with per-session EventTranslator instances
- Add proper error handling in HTTP endpoints with specific error types
- Implement proper streaming based on ADK finish_reason detection
- Add session encapsulation and automatic cleanup with configurable timeouts
- Replace deprecated TextMessageChunkEvent with TextMessageContentEvent
- Fix critical concurrency issues and session management bugs
- Add complete development environment setup with virtual environment support
- Update dependency management to use proper package installation
- Rename agent_id to app_name throughout session management for consistency
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* chore: update all python3 references to python for consistency
- Update shebangs from #\!/usr/bin/env python3 to #\!/usr/bin/env python in all scripts and tests
- Change python3 -m venv commands to python -m venv in documentation and setup scripts
- Standardize on 'python' command throughout the project for better compatibility
Files updated:
- All test files (24 files): Updated shebangs
- Shell scripts: quickstart.sh, setup_dev.sh
- Documentation: README.md
- Examples and utilities: All Python files updated
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: add default app_name behavior using agent name from registry
- Remove requirement for app_name or app_name_extractor to be specified
- Add default behavior that uses agent name from registry as app_name
- Update _default_app_extractor to fetch agent name dynamically
- Update _get_or_create_runner to accept app_name parameter for dynamic resolution
- Add comprehensive test coverage for default app_name behavior
- Update examples to demonstrate simplified agent creation without explicit app_name
- All 15 tests continue to pass
- Update CHANGELOG.md with new functionality
BREAKING CHANGES:
- ADKAgent no longer requires app_name or app_name_extractor (now optional)
- Default behavior automatically uses agent name as app_name
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* refactor: move all tests to tests/ directory for better organization
- Move all test_*.py files to tests/ subdirectory
- Move run_tests.py to tests/ directory
- Update run_tests.py to work from tests directory with proper PYTHONPATH
- Fix all import statements in tests to work without hardcoded src. prefix
- Update test runner to set PYTHONPATH to include src directory
- Fix patch() calls to reference modules without src. prefix
- All 15 tests continue to pass after reorganization
- Update CHANGELOG.md to reflect test organization improvements
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: update changelog for test reorganization
* Updating requirements.txt.
* Added version for asyncio.
* docs: update README to reflect current implementation status
- Mark tool/function calling support as coming soon
- Remove manual python-sdk installation step (now via PyPI)
- Add required app_name parameter to all ADKAgent examples
- Remove unimplemented features from event translation table
- Remove State Management and Tool Integration from Advanced Features
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* feat: implement full pytest compatibility for test suite
- Add pytest.ini configuration with proper Python path and async support
- Move pytest dependencies to main install_requires for easier setup
- Convert test_basic.py to proper pytest format with test functions
- Add pytest markers and fixtures to test_text_events.py (maintain backwards compatibility)
- Fix test_adk_agent.py for current ADKAgent API and add test isolation
- Improve session manager reset to handle closed event loops in pytest
- Rename test_server.py to server_setup.py to avoid pytest discovery
- Remove deprecated run_tests.py custom test runner
Results: All 54 tests now pass with standard pytest commands
- pytest: ✅ 54 passed, 0 failed
- pytest --cov=src: ✅ 67% code coverage
- Async tests work with @pytest.mark.asyncio
- Maintains backwards compatibility with existing test functions
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* fix: remove accidentally committed ADK_Middleware directory and CLAUDE.md
- Remove ADK_Middleware/ directory that was not intended for publication
- Remove CLAUDE.md file from repository root
- These files are already in .gitignore but were committed by mistake
🤖 Generated with [Claude Code](https://claude.ai/code)
Co-Authored-By: Claude <noreply@anthropic.com>
* docs: update README feature status to reflect current implementation
- Mark event translation as partial (1 parent 9643caf commit 96830c5
File tree
84 files changed
+18595
-0
lines changed- typescript-sdk
- apps/dojo
- e2e
- pages/adkMiddlewarePages
- tests/adkMiddlewareTests
- scripts
- src
- integrations/adk-middleware
- examples
- other
- server
- api
- src/adk_middleware
- utils
- tests
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
84 files changed
+18595
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
1 | 2 | | |
2 | 3 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
44 | 44 | | |
45 | 45 | | |
46 | 46 | | |
| 47 | + | |
47 | 48 | | |
Lines changed: 91 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
Lines changed: 104 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
Lines changed: 115 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| 17 | + | |
| 18 | + | |
| 19 | + | |
| 20 | + | |
| 21 | + | |
| 22 | + | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
| 61 | + | |
| 62 | + | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
| 79 | + | |
| 80 | + | |
| 81 | + | |
| 82 | + | |
| 83 | + | |
| 84 | + | |
| 85 | + | |
| 86 | + | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
| 91 | + | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
0 commit comments