Skip to content

Regen from latest TSP to emit listConversations#48411

Open
kaylieee wants to merge 7 commits intomainfrom
kaylieee/feature/add-list-conversation
Open

Regen from latest TSP to emit listConversations#48411
kaylieee wants to merge 7 commits intomainfrom
kaylieee/feature/add-list-conversation

Conversation

@kaylieee
Copy link
Member

This pull request introduces a new feature to the Azure AI Agents SDK, adding support for listing conversations through the ConversationsClient and ConversationsAsyncClient. These clients now provide methods to retrieve all conversations, with optional filtering and pagination, leveraging the OpenAI Java library's Conversation model. The changes also include necessary updates to the client builder and internal plumbing to support the new operations.

New Conversations Listing Feature:

  • Added listConversations operations to both ConversationsClient (sync) and ConversationsAsyncClient (async), returning paginated lists of Conversation objects from the OpenAI Java library. These methods support filtering by limit, order, after, before, agentName, and agentId. [1] [2] [3]

Client and Builder Integration:

  • Registered ConversationsClient and ConversationsAsyncClient with the AgentsClientBuilder, allowing users to easily construct these clients as part of the SDK's standard builder flow.

Internal Implementation:

  • Updated AgentsClientImpl to instantiate and expose a ConversationsImpl object, which is used internally by the new clients to perform the actual operations. [1] [2]

Documentation and Metadata:

  • Updated the CHANGELOG.md to document the addition of the new listConversations operation and its capabilities.

Copilot AI review requested due to automatic review settings March 13, 2026 02:16
Copy link
Contributor

Copilot AI left a 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 regenerates the azure-ai-agents SDK from the latest TypeSpec (TSP) to add a new listConversations capability surfaced through ConversationsClient and ConversationsAsyncClient, and wires up internal implementation support.

Changes:

  • Added generated REST implementation ConversationsImpl and exposed it via AgentsClientImpl.
  • Added listConversations APIs on sync/async Conversations clients (including convenience overloads with filter parameters).
  • Registered Conversations clients in AgentsClientBuilder service client list and updated changelog/metadata.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 8 comments.

Show a summary per file
File Description
sdk/ai/azure-ai-agents/tsp-location.yaml Updates the pinned swagger/spec commit used for generation.
sdk/ai/azure-ai-agents/src/main/resources/META-INF/azure-ai-agents_metadata.json Updates generated metadata to include Conversations APIs and new generated files.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/ConversationsImpl.java New generated REST proxy implementation for GET /openai/v1/conversations.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/implementation/AgentsClientImpl.java Adds and initializes ConversationsImpl and exposes it via getConversations().
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsClient.java Adds listConversations APIs and introduces a ConversationsImpl delegate field.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/ConversationsAsyncClient.java Adds async listConversations APIs and introduces a ConversationsImpl delegate field.
sdk/ai/azure-ai-agents/src/main/java/com/azure/ai/agents/AgentsClientBuilder.java Registers Conversations clients in @ServiceClientBuilder(serviceClients=...).
sdk/ai/azure-ai-agents/CHANGELOG.md Documents the new conversations listing feature.

You can also share your feedback on Copilot code review. Take the survey.

kaylieee and others added 3 commits March 12, 2026 20:39
…`listAgentConversations` and adjusted samples (#48428)

* Project compiles

* Moved listConversations agent filters into the Agents(Async)Client

* Using correct commit for changes
@github-actions
Copy link
Contributor

github-actions bot commented Mar 17, 2026

API Change Check

APIView identified API level changes in this PR and created the following API reviews

com.azure:azure-ai-agents

Copy link
Member

@jpalvarezl jpalvarezl left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside, from one small changelog update, everything else looks good. I would follow up with another PR to do the following:

  • Remove the Conversations(Async)Tests
  • Add a calls to listAgentsConverstaions to our Agent(Async)Client tests and assert that things are attached correctly to an agent.

- Added type-safe accessors on `McpTool` for the `allowedTools` property: `setAllowedTools(List<String>)`, `setAllowedTools(McpToolFilter)`, `getAllowedToolsAsStringList()`, and `getAllowedToolsAsMcpToolFilter()`.
- Added type-safe accessors on `McpTool` for the `requireApproval` property: `setRequireApproval(String)`, `setRequireApproval(McpToolRequireApproval)`, `getRequireApprovalAsString()`, and `getRequireApprovalAsMcpToolRequireApproval()`.
- Added `setComparisonFilter(ComparisonFilter)` and `setCompoundFilter(CompoundFilter)` convenience methods on `FileSearchTool`, accepting the openai-java filter types directly.
- Added `listConversations` operation to `ConversationsClient` and `ConversationsAsyncClient` for listing all conversations. Returns `PagedIterable<Conversation>` / `PagedFlux<Conversation>` using `com.openai.models.conversations.Conversation` from the openai-java library. Supports optional filtering by `limit`, `order`, `after`, `before`, `agentName`, and `agentId`.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We need to adjust this entry to the changelog to read:

Suggested change
- Added `listConversations` operation to `ConversationsClient` and `ConversationsAsyncClient` for listing all conversations. Returns `PagedIterable<Conversation>` / `PagedFlux<Conversation>` using `com.openai.models.conversations.Conversation` from the openai-java library. Supports optional filtering by `limit`, `order`, `after`, `before`, `agentName`, and `agentId`.
- Added `listAgentConversations` operation to `AgentsClient` and `AgentsAsyncClient` to list conversations attached to a specific agent filtering by `agentName` and `agentId`.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants