From ca476954f91c0fbb0a8be7a7c92495f25df9dc8d Mon Sep 17 00:00:00 2001 From: Shashikant86 Date: Tue, 17 Feb 2026 13:31:13 +0000 Subject: [PATCH 1/2] Doc Update --- README.md | 30 +++++++++++++++++------------- examples/calendly_agent.py | 13 +++++++++---- 2 files changed, 26 insertions(+), 17 deletions(-) diff --git a/README.md b/README.md index 593a014..d9d7f0c 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,8 @@ from stackone_adk import StackOnePlugin async def main(): # StackOne replaces manual tool functions - plugin = StackOnePlugin() # reads STACKONE_API_KEY from env + # Reads STACKONE_API_KEY from env and auto-discovers connected accounts + plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") agent = Agent( model="gemini-2.5-flash", @@ -95,7 +96,7 @@ asyncio.run(main()) from google.adk.apps import App from google.adk.runners import InMemoryRunner -plugin = StackOnePlugin(providers=["calendly"]) +plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") agent = Agent( model="gemini-2.5-flash", @@ -114,7 +115,7 @@ async with InMemoryRunner(app=app) as runner: ```python from google.adk.runners import InMemoryRunner -plugin = StackOnePlugin(providers=["calendly"]) +plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") agent = Agent( model="gemini-2.5-flash", @@ -140,6 +141,18 @@ async with InMemoryRunner(app_name="calendly_app", agent=agent) as runner: ## Tool Filtering +### By Account ID (Recommended) + +Scope tools to specific connected accounts. This is the recommended approach to ensure your agent only accesses the intended accounts: + +```python +# Single account +plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") + +# Multiple accounts +plugin = StackOnePlugin(account_ids=["acct-hibob-1", "acct-bamboohr-1"]) +``` + ### By Provider Filter tools to specific SaaS providers: @@ -164,15 +177,6 @@ plugin = StackOnePlugin(actions=["*_list_*", "*_get_*"]) plugin = StackOnePlugin(actions=["calendly_list_events", "calendly_get_event_*"]) ``` -### By Account ID - -Scope tools to specific connected accounts: - -```python -# Multiple accounts -plugin = StackOnePlugin(account_ids=["acct-hibob-1", "acct-bamboohr-1"]) -``` - ### Combining Filters ```python @@ -189,7 +193,7 @@ Unlike plugins with a fixed set of tools, StackOne tools are **dynamically disco Print discovered tools: ```python -plugin = StackOnePlugin(providers=["calendly"]) +plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID", providers=["calendly"]) for tool in plugin.get_tools(): print(f"{tool.name}: {tool.description}") ``` diff --git a/examples/calendly_agent.py b/examples/calendly_agent.py index cddbcaa..cc3cf6c 100644 --- a/examples/calendly_agent.py +++ b/examples/calendly_agent.py @@ -4,13 +4,16 @@ so you don't need to define tool functions manually. Just connect your Calendly account and the tools are ready to use: - plugin = StackOnePlugin() + plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") agent = Agent( model="gemini-2.5-flash", name="calendly_agent", tools=plugin.get_tools(), ) +You can pass an account_id to scope tools to a specific connected account, +or omit it to let the plugin auto-discover all connected accounts. + Setup: 1. Get your StackOne API key from https://app.stackone.com 2. Connect your Calendly account in the StackOne dashboard @@ -35,11 +38,13 @@ async def main() -> None: - # Discovers tools from your connected providers + # Discovers tools from your connected providers. + # Pass account_id to scope tools to a specific connected account, + # or omit it to auto-discover all connected accounts. plugin = StackOnePlugin() - # Optionally filter by provider or scope to a specific account: - # plugin = StackOnePlugin(providers=["calendly"], account_id="your-account-id") + # You can also filter by accountID: + # plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") tools = plugin.get_tools() print(f"Discovered {len(tools)} Calendly tools\n") From 8326a2519dc09dc79ec89ed8c1c70283194482d6 Mon Sep 17 00:00:00 2001 From: Shashikant86 Date: Tue, 17 Feb 2026 16:29:18 +0000 Subject: [PATCH 2/2] Doc Update --- README.md | 2 +- examples/calendly_agent.py | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/README.md b/README.md index d9d7f0c..72e2e60 100644 --- a/README.md +++ b/README.md @@ -69,7 +69,7 @@ from stackone_adk import StackOnePlugin async def main(): # StackOne replaces manual tool functions - # Reads STACKONE_API_KEY from env and auto-discovers connected accounts + # Reads STACKONE_API_KEY from env and uses the specified account_id plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") agent = Agent( diff --git a/examples/calendly_agent.py b/examples/calendly_agent.py index cc3cf6c..acccaa5 100644 --- a/examples/calendly_agent.py +++ b/examples/calendly_agent.py @@ -39,11 +39,9 @@ async def main() -> None: # Discovers tools from your connected providers. - # Pass account_id to scope tools to a specific connected account, - # or omit it to auto-discover all connected accounts. plugin = StackOnePlugin() - # You can also filter by accountID: + # You can also pass account_id to scope tools to a specific connected account: # plugin = StackOnePlugin(account_id="YOUR_ACCOUNT_ID") tools = plugin.get_tools()