Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .release-please-manifest.json
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
{
".": "0.48.0"
".": "0.49.0"
}
8 changes: 4 additions & 4 deletions .stats.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
configured_endpoints: 59
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-78b11dd189b9201fa71681a122231d11c49fba4e273dfaab10301f0f9c7fbc23.yml
openapi_spec_hash: 4bfe07ba5ff595ac71ede0c0305c975a
config_hash: 722ed77ad7cd10d19ab8c20abaa9b0ff
configured_endpoints: 73
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/profound/profound-2e4776730f9ad1261f13d4f7f8f7604be69bde3b937433c4fefa2c3c9198199f.yml
openapi_spec_hash: 1c91f2db23dc5afefe433f93109c5369
config_hash: 718a763c108eede78d67ce71ecdac365
10 changes: 10 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,15 @@
# Changelog

## 0.49.0 (2026-06-17)

Full Changelog: [v0.48.0...v0.49.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.48.0...v0.49.0)

### Features

* **api:** api update ([7f09cc2](https://github.com/cooper-square-technologies/profound-python-sdk/commit/7f09cc21fffcfc50e910011658f118d1abeca21f))
* **api:** api update ([0e0b780](https://github.com/cooper-square-technologies/profound-python-sdk/commit/0e0b78046f76107016055dd8111f830722b68f09))
* **api:** manual updates ([0701a3f](https://github.com/cooper-square-technologies/profound-python-sdk/commit/0701a3fc3e786ed33210469d7c13a837a7cf136d))

## 0.48.0 (2026-06-12)

Full Changelog: [v0.47.0...v0.48.0](https://github.com/cooper-square-technologies/profound-python-sdk/compare/v0.47.0...v0.48.0)
Expand Down
40 changes: 40 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -182,6 +182,44 @@ Methods:
- <code title="post /v1/reports/shopping/trigger-rate">client.reports.shopping.<a href="./src/profound/resources/reports/shopping.py">trigger_rate</a>(\*\*<a href="src/profound/types/reports/shopping_trigger_rate_params.py">params</a>) -> <a href="./src/profound/types/reports/shopping_trigger_rate_response.py">ShoppingTriggerRateResponse</a></code>
- <code title="post /v1/reports/shopping/visibility">client.reports.shopping.<a href="./src/profound/resources/reports/shopping.py">visibility</a>(\*\*<a href="src/profound/types/reports/shopping_visibility_params.py">params</a>) -> <a href="./src/profound/types/reports/shopping_visibility_response.py">ShoppingVisibilityResponse</a></code>

## Accuracy

Types:

```python
from profound.types.reports import (
AccuracyCreateBreakdownResponse,
AccuracyCreateCitationAnalysisResponse,
AccuracyCreateClaimBreakdownResponse,
AccuracyCreateClaimCitationsResponse,
AccuracyCreateClusterExampleRunsResponse,
AccuracyCreateClusterVerificationPairsResponse,
AccuracyCreateFactcheckSetupStatusResponse,
AccuracyCreateInaccuracyDriversResponse,
AccuracyCreateInaccurateClustersResponse,
AccuracyCreateInaccurateThemesResponse,
AccuracyCreateOverviewResponse,
AccuracyCreateTopInaccurateClaimsResponse,
AccuracyCreateTopicIDsResponse,
)
```

Methods:

- <code title="post /v1/reports/accuracy/breakdown">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_breakdown</a>(\*\*<a href="src/profound/types/reports/accuracy_create_breakdown_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_breakdown_response.py">AccuracyCreateBreakdownResponse</a></code>
- <code title="post /v1/reports/accuracy/citation-analysis">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_citation_analysis</a>(\*\*<a href="src/profound/types/reports/accuracy_create_citation_analysis_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_citation_analysis_response.py">AccuracyCreateCitationAnalysisResponse</a></code>
- <code title="post /v1/reports/accuracy/claim-breakdown">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_claim_breakdown</a>(\*\*<a href="src/profound/types/reports/accuracy_create_claim_breakdown_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_claim_breakdown_response.py">AccuracyCreateClaimBreakdownResponse</a></code>
- <code title="post /v1/reports/accuracy/claim-citations">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_claim_citations</a>(\*\*<a href="src/profound/types/reports/accuracy_create_claim_citations_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_claim_citations_response.py">AccuracyCreateClaimCitationsResponse</a></code>
- <code title="post /v1/reports/accuracy/cluster-example-runs">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_cluster_example_runs</a>(\*\*<a href="src/profound/types/reports/accuracy_create_cluster_example_runs_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_cluster_example_runs_response.py">AccuracyCreateClusterExampleRunsResponse</a></code>
- <code title="post /v1/reports/accuracy/cluster-verification-pairs">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_cluster_verification_pairs</a>(\*\*<a href="src/profound/types/reports/accuracy_create_cluster_verification_pairs_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_cluster_verification_pairs_response.py">AccuracyCreateClusterVerificationPairsResponse</a></code>
- <code title="post /v1/reports/accuracy/factcheck-setup-status">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_factcheck_setup_status</a>(\*\*<a href="src/profound/types/reports/accuracy_create_factcheck_setup_status_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_factcheck_setup_status_response.py">AccuracyCreateFactcheckSetupStatusResponse</a></code>
- <code title="post /v1/reports/accuracy/inaccuracy-drivers">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_inaccuracy_drivers</a>(\*\*<a href="src/profound/types/reports/accuracy_create_inaccuracy_drivers_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_inaccuracy_drivers_response.py">AccuracyCreateInaccuracyDriversResponse</a></code>
- <code title="post /v1/reports/accuracy/inaccurate-clusters">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_inaccurate_clusters</a>(\*\*<a href="src/profound/types/reports/accuracy_create_inaccurate_clusters_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_inaccurate_clusters_response.py">AccuracyCreateInaccurateClustersResponse</a></code>
- <code title="post /v1/reports/accuracy/inaccurate-themes">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_inaccurate_themes</a>(\*\*<a href="src/profound/types/reports/accuracy_create_inaccurate_themes_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_inaccurate_themes_response.py">AccuracyCreateInaccurateThemesResponse</a></code>
- <code title="post /v1/reports/accuracy/overview">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_overview</a>(\*\*<a href="src/profound/types/reports/accuracy_create_overview_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_overview_response.py">AccuracyCreateOverviewResponse</a></code>
- <code title="post /v1/reports/accuracy/top-inaccurate-claims">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_top_inaccurate_claims</a>(\*\*<a href="src/profound/types/reports/accuracy_create_top_inaccurate_claims_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_top_inaccurate_claims_response.py">AccuracyCreateTopInaccurateClaimsResponse</a></code>
- <code title="post /v1/reports/accuracy/topic-ids">client.reports.accuracy.<a href="./src/profound/resources/reports/accuracy.py">create_topic_ids</a>(\*\*<a href="src/profound/types/reports/accuracy_create_topic_ids_params.py">params</a>) -> <a href="./src/profound/types/reports/accuracy_create_topic_ids_response.py">AccuracyCreateTopicIDsResponse</a></code>

# Logs

## Raw
Expand Down Expand Up @@ -220,6 +258,7 @@ Types:
from profound.types import (
AgentCreateResponse,
AgentRetrieveResponse,
AgentUpdateResponse,
AgentListResponse,
AgentPublishResponse,
)
Expand All @@ -229,6 +268,7 @@ Methods:

- <code title="post /v1/agents">client.agents.<a href="./src/profound/resources/agents/agents.py">create</a>(\*\*<a href="src/profound/types/agent_create_params.py">params</a>) -> <a href="./src/profound/types/agent_create_response.py">AgentCreateResponse</a></code>
- <code title="get /v1/agents/{agent_id}">client.agents.<a href="./src/profound/resources/agents/agents.py">retrieve</a>(agent_id, \*\*<a href="src/profound/types/agent_retrieve_params.py">params</a>) -> <a href="./src/profound/types/agent_retrieve_response.py">AgentRetrieveResponse</a></code>
- <code title="patch /v1/agents/{agent_id}">client.agents.<a href="./src/profound/resources/agents/agents.py">update</a>(agent_id, \*\*<a href="src/profound/types/agent_update_params.py">params</a>) -> <a href="./src/profound/types/agent_update_response.py">AgentUpdateResponse</a></code>
- <code title="get /v1/agents">client.agents.<a href="./src/profound/resources/agents/agents.py">list</a>(\*\*<a href="src/profound/types/agent_list_params.py">params</a>) -> <a href="./src/profound/types/agent_list_response.py">AgentListResponse</a></code>
- <code title="post /v1/agents/{agent_id}/publish">client.agents.<a href="./src/profound/resources/agents/agents.py">publish</a>(agent_id) -> <a href="./src/profound/types/agent_publish_response.py">AgentPublishResponse</a></code>

Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "profound"
version = "0.48.0"
version = "0.49.0"
description = "The official Python library for the profound API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/profound/_version.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# File generated from our OpenAPI spec by Stainless. See CONTRIBUTING.md for details.

__title__ = "profound"
__version__ = "0.48.0" # x-release-please-version
__version__ = "0.49.0" # x-release-please-version
111 changes: 110 additions & 1 deletion src/profound/resources/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
from ...types import agent_list_params, agent_create_params, agent_retrieve_params
from ...types import agent_list_params, agent_create_params, agent_update_params, agent_retrieve_params
from ..._types import Body, Omit, Query, Headers, NotGiven, omit, not_given
from ..._utils import path_template, maybe_transform, async_maybe_transform
from ..._compat import cached_property
Expand All @@ -37,6 +37,7 @@
from ..._base_client import make_request_options
from ...types.agent_list_response import AgentListResponse
from ...types.agent_create_response import AgentCreateResponse
from ...types.agent_update_response import AgentUpdateResponse
from ...types.agent_publish_response import AgentPublishResponse
from ...types.agent_retrieve_response import AgentRetrieveResponse

Expand Down Expand Up @@ -177,6 +178,54 @@ def retrieve(
cast_to=AgentRetrieveResponse,
)

def update(
self,
agent_id: str,
*,
graph: Dict[str, object],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentUpdateResponse:
"""
Update an agent's draft graph in place.

You must be a member of the agent's organization. The agent's draft is replaced
with the supplied graph and re-validated, so you can iterate one draft — create,
then update per fix — instead of creating a new agent on every change. The
response carries the updated `validation`; publish with
`POST /v1/agents/{agent_id}/publish` once `validation.valid`.

Args:
agent_id: The ID of the agent to update.

graph: New workflow graph for the agent's draft version. Replaces the current draft
graph; the agent is iterated in place rather than re-created, so its ID is
stable. Required — Magi rejects a null graph, so an empty update is a 422 here
rather than a relayed upstream error.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not agent_id:
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
return self._patch(
path_template("/v1/agents/{agent_id}", agent_id=agent_id),
body=maybe_transform({"graph": graph}, agent_update_params.AgentUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AgentUpdateResponse,
)

def list(
self,
*,
Expand Down Expand Up @@ -403,6 +452,54 @@ async def retrieve(
cast_to=AgentRetrieveResponse,
)

async def update(
self,
agent_id: str,
*,
graph: Dict[str, object],
# Use the following arguments if you need to pass additional parameters to the API that aren't available via kwargs.
# The extra values given here take precedence over values defined on the client or passed to this method.
extra_headers: Headers | None = None,
extra_query: Query | None = None,
extra_body: Body | None = None,
timeout: float | httpx.Timeout | None | NotGiven = not_given,
) -> AgentUpdateResponse:
"""
Update an agent's draft graph in place.

You must be a member of the agent's organization. The agent's draft is replaced
with the supplied graph and re-validated, so you can iterate one draft — create,
then update per fix — instead of creating a new agent on every change. The
response carries the updated `validation`; publish with
`POST /v1/agents/{agent_id}/publish` once `validation.valid`.

Args:
agent_id: The ID of the agent to update.

graph: New workflow graph for the agent's draft version. Replaces the current draft
graph; the agent is iterated in place rather than re-created, so its ID is
stable. Required — Magi rejects a null graph, so an empty update is a 422 here
rather than a relayed upstream error.

extra_headers: Send extra headers

extra_query: Add additional query parameters to the request

extra_body: Add additional JSON properties to the request

timeout: Override the client-level default timeout for this request, in seconds
"""
if not agent_id:
raise ValueError(f"Expected a non-empty value for `agent_id` but received {agent_id!r}")
return await self._patch(
path_template("/v1/agents/{agent_id}", agent_id=agent_id),
body=await async_maybe_transform({"graph": graph}, agent_update_params.AgentUpdateParams),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AgentUpdateResponse,
)

async def list(
self,
*,
Expand Down Expand Up @@ -505,6 +602,9 @@ def __init__(self, agents: AgentsResource) -> None:
self.retrieve = to_raw_response_wrapper(
agents.retrieve,
)
self.update = to_raw_response_wrapper(
agents.update,
)
self.list = to_raw_response_wrapper(
agents.list,
)
Expand All @@ -531,6 +631,9 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
self.retrieve = async_to_raw_response_wrapper(
agents.retrieve,
)
self.update = async_to_raw_response_wrapper(
agents.update,
)
self.list = async_to_raw_response_wrapper(
agents.list,
)
Expand All @@ -557,6 +660,9 @@ def __init__(self, agents: AgentsResource) -> None:
self.retrieve = to_streamed_response_wrapper(
agents.retrieve,
)
self.update = to_streamed_response_wrapper(
agents.update,
)
self.list = to_streamed_response_wrapper(
agents.list,
)
Expand All @@ -583,6 +689,9 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
self.retrieve = async_to_streamed_response_wrapper(
agents.retrieve,
)
self.update = async_to_streamed_response_wrapper(
agents.update,
)
self.list = async_to_streamed_response_wrapper(
agents.list,
)
Expand Down
14 changes: 14 additions & 0 deletions src/profound/resources/reports/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,14 @@
ReportsResourceWithStreamingResponse,
AsyncReportsResourceWithStreamingResponse,
)
from .accuracy import (
AccuracyResource,
AsyncAccuracyResource,
AccuracyResourceWithRawResponse,
AsyncAccuracyResourceWithRawResponse,
AccuracyResourceWithStreamingResponse,
AsyncAccuracyResourceWithStreamingResponse,
)
from .shopping import (
ShoppingResource,
AsyncShoppingResource,
Expand Down Expand Up @@ -38,6 +46,12 @@
"AsyncShoppingResourceWithRawResponse",
"ShoppingResourceWithStreamingResponse",
"AsyncShoppingResourceWithStreamingResponse",
"AccuracyResource",
"AsyncAccuracyResource",
"AccuracyResourceWithRawResponse",
"AsyncAccuracyResourceWithRawResponse",
"AccuracyResourceWithStreamingResponse",
"AsyncAccuracyResourceWithStreamingResponse",
"ReportsResource",
"AsyncReportsResource",
"ReportsResourceWithRawResponse",
Expand Down
Loading
Loading