-
Notifications
You must be signed in to change notification settings - Fork 13
Rename acp_type=AGENTIC to ASYNC with backwards compatibility #20
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR renames ACPType.AGENTIC to ACPType.ASYNC throughout the codebase while maintaining full backwards compatibility with existing "agentic" agents. The change improves naming clarity by aligning the type name with the asynchronous nature of the protocol.
Key changes:
- Introduces
ACPType.ASYNCas the new standard while keepingACPType.AGENTICas deprecated - Updates default agent type from
AGENTICtoASYNCin entities, use cases, and database schema - Adds comprehensive backwards compatibility tests ensuring both types function identically
- Updates all documentation to reference "Async ACP" instead of "Agentic ACP"
Reviewed Changes
Copilot reviewed 43 out of 43 changed files in this pull request and generated 11 comments.
Show a summary per file
| File | Description |
|---|---|
src/domain/entities/agents.py |
Adds ACPType.ASYNC enum value and marks AGENTIC as deprecated; updates default to ASYNC |
src/domain/entities/agents_rpc.py |
Adds ACPType.ASYNC to allowed RPC methods dictionary with same permissions as AGENTIC |
src/domain/use_cases/agents_use_case.py |
Changes default parameter value from ACPType.AGENTIC to ACPType.ASYNC |
src/domain/use_cases/agents_acp_use_case.py |
Updates conditional to check for both AGENTIC and ASYNC types when forwarding tasks |
src/adapters/orm.py |
Changes database server default from "agentic" to "async" for new agent records |
src/api/schemas/agents.py |
Mirrors entity changes - adds ASYNC enum and updates descriptions |
tests/unit/use_cases/test_acp_type_backwards_compatibility.py |
New comprehensive test suite verifying AGENTIC and ASYNC behave identically |
tests/integration/api/agents/test_acp_type_backwards_compatibility.py |
New integration tests verifying backwards compatibility through the API layer |
| Multiple test files | Updates test fixtures from ACPType.AGENTIC to ACPType.ASYNC |
database/migrations/alembic/versions/2025_10_29_0000_update_acp_type_default_to_async_a1b2c3d4e5f6.py |
Database migration changing server default from "agentic" to "async" |
| Documentation files | Comprehensive documentation updates replacing "Agentic ACP" with "Async ACP" throughout |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| ### Agentic ACP: Three Streaming Options | ||
| ### Async ACP: Three Streaming Options | ||
|
|
||
| Becuase Agentic Agents are completely async, they do not yield nor return anything in their ACP handlers. Instead, they should call the appropriate ADK functions to stream updates to the client. |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Corrected spelling of 'Becuase' to 'Because'.
| Becuase Agentic Agents are completely async, they do not yield nor return anything in their ACP handlers. Instead, they should call the appropriate ADK functions to stream updates to the client. | |
| Because Agentic Agents are completely async, they do not yield nor return anything in their ACP handlers. Instead, they should call the appropriate ADK functions to stream updates to the client. |
| async def migrate_state(task_id: str, from_type: str, to_type: str): | ||
| if from_type == "sync" and to_type == "agentic": | ||
| if from_type == "sync" and to_type == "async": | ||
| # Sync uses automatic state, Agentic needs explicit creation |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The comment on line 385 still references 'Agentic' but should be updated to 'Async' for consistency with the renaming throughout this PR.
| # Sync uses automatic state, Agentic needs explicit creation | |
| # Sync uses automatic state, Async needs explicit creation |
| # Race Conditions in Async ACP | ||
|
|
||
| !!! danger "Critical for Production Systems" | ||
| **All agentic ACP types can experience race conditions that corrupt agent state and cause unpredictable behavior.** Temporal ACP handles these better through singleton workflows and message queuing, but understanding race conditions is crucial for all production systems. |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term 'agentic ACP' in the warning box should be updated to 'async ACP' for consistency with the renaming.
...migrations/alembic/versions/2025_10_29_0000_update_acp_type_default_to_async_a1b2c3d4e5f6.py
Outdated
Show resolved
Hide resolved
...migrations/alembic/versions/2025_10_29_0000_update_acp_type_default_to_async_a1b2c3d4e5f6.py
Outdated
Show resolved
Hide resolved
...migrations/alembic/versions/2025_10_29_0000_update_acp_type_default_to_async_a1b2c3d4e5f6.py
Outdated
Show resolved
Hide resolved
| # Setup mocks | ||
| agent_repo = AsyncMock(spec=AgentRepository) | ||
|
|
||
| agents_use_case = AgentsUseCase(agent_repo=agent_repo) |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keyword argument 'agent_repo' is not a supported parameter name of AgentsUseCase.init.
| # Setup mocks | ||
| agent_repo = AsyncMock(spec=AgentRepository) | ||
|
|
||
| agents_use_case = AgentsUseCase(agent_repo=agent_repo) |
Copilot
AI
Oct 29, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Keyword argument 'agent_repo' is not a supported parameter name of AgentsUseCase.init.
58d6b64 to
fd249a9
Compare
de627e9 to
c4f0cd3
Compare
This PR makes a major refactor to the Agentex server code by adding the "async" ACP type, which is meant to replace "agentic". New agents should use "async", but backwards compatibility with "agentic" agents is still maintained, though marked as deprecated.
In the future, we should try to migrate all existing "agentic" agents to async, then completely remove it from the codebase.
A couple surface areas that I want to comment on: