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 @@
{
".": "1.0.0"
".": "1.1.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: 58
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nimbleway/nimbleway-46d484b69bce8b655b4cb2741903af321088ee25d778dd1f9974925b75ae0c76.yml
openapi_spec_hash: e4c1f68f0083d3b13501f3c85d29b4f4
config_hash: 2a7bb5e7a725315963e311126f1f7e4c
configured_endpoints: 59
openapi_spec_url: https://storage.googleapis.com/stainless-sdk-openapi-specs/nimbleway/nimbleway-608baaa8a7325ace62afab2b1f8d1047934d3ad52d0f2ecd858415f057960677.yml
openapi_spec_hash: 95dd64bbbff2d2c2bf6014e72aea70f3
config_hash: a9878e098a6929e32711d66374797185
9 changes: 9 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,14 @@
# Changelog

## 1.1.0 (2026-07-21)

Full Changelog: [v1.0.0...v1.1.0](https://github.com/Nimbleway/nimble-python/compare/v1.0.0...v1.1.0)

### Features

* **api:** api update ([eb7a6d1](https://github.com/Nimbleway/nimble-python/commit/eb7a6d1eb27a62f0dcb852b287f2dfb64dcce1b1))
* **api:** manual updates ([40714b6](https://github.com/Nimbleway/nimble-python/commit/40714b60e42e35f79f6263b0705c03c97a244d2d))

## 1.0.0 (2026-07-20)

Full Changelog: [v0.24.0...v1.0.0](https://github.com/Nimbleway/nimble-python/compare/v0.24.0...v1.0.0)
Expand Down
2 changes: 2 additions & 0 deletions api.md
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,7 @@ from nimble_python.types import (
AgentUpdateResponse,
AgentListResponse,
AgentGetResponse,
AgentRunResponse,
)
```

Expand All @@ -116,6 +117,7 @@ Methods:
- <code title="get /v2/agents">client.agents.<a href="./src/nimble_python/resources/agents/agents.py">list</a>(\*\*<a href="src/nimble_python/types/agent_list_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_list_response.py">AgentListResponse</a></code>
- <code title="delete /v2/agents/{agent_id}">client.agents.<a href="./src/nimble_python/resources/agents/agents.py">delete</a>(agent_id) -> None</code>
- <code title="get /v2/agents/{agent_id}">client.agents.<a href="./src/nimble_python/resources/agents/agents.py">get</a>(agent_id) -> <a href="./src/nimble_python/types/agent_get_response.py">AgentGetResponse</a></code>
- <code title="post /v2/agents/runs">client.agents.<a href="./src/nimble_python/resources/agents/agents.py">run</a>(\*\*<a href="src/nimble_python/types/agent_run_params.py">params</a>) -> <a href="./src/nimble_python/types/agent_run_response.py">AgentRunResponse</a></code>

## Templates

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 = "nimble_python"
version = "1.0.0"
version = "1.1.0"
description = "The official Python library for the nimble API"
dynamic = ["readme"]
license = "Apache-2.0"
Expand Down
2 changes: 1 addition & 1 deletion src/nimble_python/_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__ = "nimble_python"
__version__ = "1.0.0" # x-release-please-version
__version__ = "1.1.0" # x-release-please-version
165 changes: 155 additions & 10 deletions src/nimble_python/resources/agents/agents.py
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

from __future__ import annotations

from typing import Dict, Iterable, Optional
from typing import Dict, Union, Iterable, Optional
from typing_extensions import Literal

import httpx
Expand All @@ -15,7 +15,7 @@
RunsResourceWithStreamingResponse,
AsyncRunsResourceWithStreamingResponse,
)
from ...types import agent_list_params, agent_create_params, agent_update_params
from ...types import agent_run_params, agent_list_params, agent_create_params, agent_update_params
from ..._types import Body, Omit, Query, Headers, NoneType, NotGiven, SequenceNotStr, omit, not_given
from ..._utils import path_template, maybe_transform, async_maybe_transform
from ..._compat import cached_property
Expand All @@ -36,6 +36,7 @@
)
from ..._base_client import make_request_options
from ...types.agent_get_response import AgentGetResponse
from ...types.agent_run_response import AgentRunResponse
from ...types.agent_list_response import AgentListResponse
from ...types.agent_create_response import AgentCreateResponse
from ...types.agent_update_response import AgentUpdateResponse
Expand Down Expand Up @@ -77,12 +78,12 @@ def create(
agent_name: Optional[str] | Omit = omit,
description: Optional[str] | Omit = omit,
display_name: Optional[str] | Omit = omit,
domain_expertise: Optional[str] | Omit = omit,
effort: Literal["low", "medium", "high", "x-high", "max"] | Omit = omit,
goals: SequenceNotStr[str] | Omit = omit,
icon: Optional[str] | Omit = omit,
is_active: bool | Omit = omit,
output_schema: Optional[Dict[str, object]] | Omit = omit,
skill: Optional[str] | Omit = omit,
sources: agent_create_params.Sources | Omit = omit,
suggested_questions: SequenceNotStr[str] | Omit = omit,
template: Optional[str] | Omit = omit,
Expand All @@ -108,8 +109,6 @@ def create(

display_name: Human-friendly agent name shown to users.

domain_expertise: Domain expertise or operating context for the agent.

effort: Default effort level for this agent's runs.

goals: Ordered goals for the agent to follow.
Expand All @@ -120,6 +119,8 @@ def create(

output_schema: JSON schema describing the structured output the agent should produce.

skill: Skill or operating context for the agent.

sources: Source guidance for the agent.

suggested_questions: Suggested prompts users can run with this agent.
Expand All @@ -144,12 +145,12 @@ def create(
"agent_name": agent_name,
"description": description,
"display_name": display_name,
"domain_expertise": domain_expertise,
"effort": effort,
"goals": goals,
"icon": icon,
"is_active": is_active,
"output_schema": output_schema,
"skill": skill,
"sources": sources,
"suggested_questions": suggested_questions,
"template": template,
Expand Down Expand Up @@ -320,6 +321,72 @@ def get(
cast_to=AgentGetResponse,
)

def run(
self,
*,
input: str,
effort: Optional[Literal["low", "medium", "high", "x-high", "max"]] | Omit = omit,
enable_events: bool | Omit = omit,
input_data: Union[Iterable[Dict[str, object]], Dict[str, object], None] | Omit = omit,
output_schema: Optional[Dict[str, object]] | Omit = omit,
previous_interaction_id: Optional[str] | Omit = omit,
sources: Optional[agent_run_params.Sources] | Omit = omit,
# 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,
) -> AgentRunResponse:
"""Creates a minimal persistent Web Search Agent and starts a run for it.

The
response includes `web_search_agent_id` for later agent and run queries.

Args:
input: User prompt or task instructions for the run.

effort: Canonical effort tier names for the research graph.

enable_events: Whether to stream run events when supported.

input_data: Existing records to ENRICH: a list of partial rows, or a single object,
mirroring output_schema's shape.

output_schema: JSON schema overriding the agent's default structured output for this run.

previous_interaction_id: Previous interaction identifier used to continue a conversation.

sources: Source guidance overriding the agent default.

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
"""
return self._post(
"/v2/agents/runs",
body=maybe_transform(
{
"input": input,
"effort": effort,
"enable_events": enable_events,
"input_data": input_data,
"output_schema": output_schema,
"previous_interaction_id": previous_interaction_id,
"sources": sources,
},
agent_run_params.AgentRunParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AgentRunResponse,
)


class AsyncAgentsResource(AsyncAPIResource):
@cached_property
Expand Down Expand Up @@ -355,12 +422,12 @@ async def create(
agent_name: Optional[str] | Omit = omit,
description: Optional[str] | Omit = omit,
display_name: Optional[str] | Omit = omit,
domain_expertise: Optional[str] | Omit = omit,
effort: Literal["low", "medium", "high", "x-high", "max"] | Omit = omit,
goals: SequenceNotStr[str] | Omit = omit,
icon: Optional[str] | Omit = omit,
is_active: bool | Omit = omit,
output_schema: Optional[Dict[str, object]] | Omit = omit,
skill: Optional[str] | Omit = omit,
sources: agent_create_params.Sources | Omit = omit,
suggested_questions: SequenceNotStr[str] | Omit = omit,
template: Optional[str] | Omit = omit,
Expand All @@ -386,8 +453,6 @@ async def create(

display_name: Human-friendly agent name shown to users.

domain_expertise: Domain expertise or operating context for the agent.

effort: Default effort level for this agent's runs.

goals: Ordered goals for the agent to follow.
Expand All @@ -398,6 +463,8 @@ async def create(

output_schema: JSON schema describing the structured output the agent should produce.

skill: Skill or operating context for the agent.

sources: Source guidance for the agent.

suggested_questions: Suggested prompts users can run with this agent.
Expand All @@ -422,12 +489,12 @@ async def create(
"agent_name": agent_name,
"description": description,
"display_name": display_name,
"domain_expertise": domain_expertise,
"effort": effort,
"goals": goals,
"icon": icon,
"is_active": is_active,
"output_schema": output_schema,
"skill": skill,
"sources": sources,
"suggested_questions": suggested_questions,
"template": template,
Expand Down Expand Up @@ -598,6 +665,72 @@ async def get(
cast_to=AgentGetResponse,
)

async def run(
self,
*,
input: str,
effort: Optional[Literal["low", "medium", "high", "x-high", "max"]] | Omit = omit,
enable_events: bool | Omit = omit,
input_data: Union[Iterable[Dict[str, object]], Dict[str, object], None] | Omit = omit,
output_schema: Optional[Dict[str, object]] | Omit = omit,
previous_interaction_id: Optional[str] | Omit = omit,
sources: Optional[agent_run_params.Sources] | Omit = omit,
# 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,
) -> AgentRunResponse:
"""Creates a minimal persistent Web Search Agent and starts a run for it.

The
response includes `web_search_agent_id` for later agent and run queries.

Args:
input: User prompt or task instructions for the run.

effort: Canonical effort tier names for the research graph.

enable_events: Whether to stream run events when supported.

input_data: Existing records to ENRICH: a list of partial rows, or a single object,
mirroring output_schema's shape.

output_schema: JSON schema overriding the agent's default structured output for this run.

previous_interaction_id: Previous interaction identifier used to continue a conversation.

sources: Source guidance overriding the agent default.

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
"""
return await self._post(
"/v2/agents/runs",
body=await async_maybe_transform(
{
"input": input,
"effort": effort,
"enable_events": enable_events,
"input_data": input_data,
"output_schema": output_schema,
"previous_interaction_id": previous_interaction_id,
"sources": sources,
},
agent_run_params.AgentRunParams,
),
options=make_request_options(
extra_headers=extra_headers, extra_query=extra_query, extra_body=extra_body, timeout=timeout
),
cast_to=AgentRunResponse,
)


class AgentsResourceWithRawResponse:
def __init__(self, agents: AgentsResource) -> None:
Expand All @@ -618,6 +751,9 @@ def __init__(self, agents: AgentsResource) -> None:
self.get = to_raw_response_wrapper(
agents.get,
)
self.run = to_raw_response_wrapper(
agents.run,
)

@cached_property
def templates(self) -> TemplatesResourceWithRawResponse:
Expand Down Expand Up @@ -647,6 +783,9 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
self.get = async_to_raw_response_wrapper(
agents.get,
)
self.run = async_to_raw_response_wrapper(
agents.run,
)

@cached_property
def templates(self) -> AsyncTemplatesResourceWithRawResponse:
Expand Down Expand Up @@ -676,6 +815,9 @@ def __init__(self, agents: AgentsResource) -> None:
self.get = to_streamed_response_wrapper(
agents.get,
)
self.run = to_streamed_response_wrapper(
agents.run,
)

@cached_property
def templates(self) -> TemplatesResourceWithStreamingResponse:
Expand Down Expand Up @@ -705,6 +847,9 @@ def __init__(self, agents: AsyncAgentsResource) -> None:
self.get = async_to_streamed_response_wrapper(
agents.get,
)
self.run = async_to_streamed_response_wrapper(
agents.run,
)

@cached_property
def templates(self) -> AsyncTemplatesResourceWithStreamingResponse:
Expand Down
2 changes: 2 additions & 0 deletions src/nimble_python/types/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@
from .job_list_params import JobListParams as JobListParams
from .search_response import SearchResponse as SearchResponse
from .serp_run_params import SerpRunParams as SerpRunParams
from .agent_run_params import AgentRunParams as AgentRunParams
from .crawl_run_params import CrawlRunParams as CrawlRunParams
from .job_get_response import JobGetResponse as JobGetResponse
from .media_run_params import MediaRunParams as MediaRunParams
Expand All @@ -34,6 +35,7 @@
from .serp_run_response import SerpRunResponse as SerpRunResponse
from .task_get_response import TaskGetResponse as TaskGetResponse
from .agent_get_response import AgentGetResponse as AgentGetResponse
from .agent_run_response import AgentRunResponse as AgentRunResponse
from .batch_get_response import BatchGetResponse as BatchGetResponse
from .crawl_run_response import CrawlRunResponse as CrawlRunResponse
from .extract_run_params import ExtractRunParams as ExtractRunParams
Expand Down
6 changes: 3 additions & 3 deletions src/nimble_python/types/agent_create_params.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ class AgentCreateParams(TypedDict, total=False):
display_name: Optional[str]
"""Human-friendly agent name shown to users."""

domain_expertise: Optional[str]
"""Domain expertise or operating context for the agent."""

effort: Literal["low", "medium", "high", "x-high", "max"]
"""Default effort level for this agent's runs."""

Expand All @@ -38,6 +35,9 @@ class AgentCreateParams(TypedDict, total=False):
output_schema: Optional[Dict[str, object]]
"""JSON schema describing the structured output the agent should produce."""

skill: Optional[str]
"""Skill or operating context for the agent."""

sources: Sources
"""Source guidance for the agent."""

Expand Down
Loading
Loading