Migrate SDK to new agent-stack API response format#2
Closed
amalshaji-plivo wants to merge 12 commits intoplivo:mainfrom
Closed
Migrate SDK to new agent-stack API response format#2amalshaji-plivo wants to merge 12 commits intoplivo:mainfrom
amalshaji-plivo wants to merge 12 commits intoplivo:mainfrom
Conversation
Full async-first Python SDK with httpx transport, automatic retries, typed WebSocket events, VoiceApp server, messaging (SMS/WhatsApp), numbers management, 70 tests, 15 examples, and CLAUDE.md.
Point tests/codecov badges to bevenky/plivo-agent-python, normalize double dashes to single dashes, update Audio stream pipeline description.
Runs pytest across Python 3.10-3.13 with ruff lint, uploads coverage to Codecov on main branch.
…ssaging examples - Replace session.transfer() with transfer_to_number() (phone numbers) and transfer_to_sip() (SIP URI via Dial XML with custom headers) - Expand send_sms.py with MMS single and multi-media examples - Rewrite whatsapp.py with all 7 message types: text, media, template, interactive buttons, list, CTA URL, and location - Add 4 new transfer tests (73 total)
Agent endpoints now use /v1/Account/{auth_id}/Agent and
/v1/Account/{auth_id}/AgentCall paths instead of /v1/Agent
and /v1/AgentCall. Add agents_base_url property to HttpTransport.
Update mock responses and assertions to match the standardized response format from agent-stack PR #19: api_id at root, objects/meta for lists, 201 status for POST/action endpoints.
Move src/plivo_agent/ to src/plivo_agentstack/, update all imports across tests, examples, CI, pyproject.toml, README, and CLAUDE.md.
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
fix/api-response-cleanup)api_id+messagefields"objects"(not"data") and"meta"with{limit, offset, total_count, previous, next}api_idat rootAgentResource.list()docstring to document new response shapeVerified against:
agent-stack/plivo-voice-core/crates/api/src/response.rs—ApiResponse<T>structagent-stack/plivo-voice-core/crates/api/src/models.rs—PaginatedResponse,PaginationMeta,ConnectCallResponse,AssignNumberResponseagent-stack/plivo-voice-core/crates/api/src/routes/— all route handlersreferences/plivo-python/plivo/base.py—Metaclass,ListResponseObject(confirmsobjects/meta/api_idconvention)Test plan
pytest tests/ -v— all 73 tests passruff check src/ tests/— clean