aip-agents-binary 0.6.1__py3-none-macosx_13_0_arm64.whl → 0.6.2__py3-none-macosx_13_0_arm64.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.

Potentially problematic release.


This version of aip-agents-binary might be problematic. Click here for more details.

@@ -7,8 +7,6 @@ Required environment variables:
7
7
 
8
8
  import asyncio
9
9
 
10
- from langchain_openai import ChatOpenAI
11
-
12
10
  from aip_agents.agent import LangGraphReactAgent
13
11
  from aip_agents.ptc import PromptConfig, PTCSandboxConfig
14
12
 
@@ -24,7 +22,7 @@ async def main() -> None:
24
22
  agent = LangGraphReactAgent(
25
23
  name="ptc_hello_world",
26
24
  instruction=instruction,
27
- model=ChatOpenAI(model="gpt-5.2"),
25
+ model="openai/gpt-5.2",
28
26
  ptc_config=PTCSandboxConfig(enabled=True, sandbox_timeout=180.0, prompt=PromptConfig(mode="index")),
29
27
  )
30
28
  agent.add_mcp_server(
@@ -18,6 +18,7 @@ from langchain_core.callbacks import (
18
18
  CallbackManagerForToolRun,
19
19
  )
20
20
  from langchain_core.tools import BaseTool
21
+ from pydantic import BaseModel, Field
21
22
 
22
23
  from aip_agents.ptc.naming import sanitize_function_name
23
24
  from aip_agents.tools.tool_config_injector import TOOL_CONFIGS_KEY
@@ -31,6 +32,21 @@ if TYPE_CHECKING:
31
32
  logger = get_logger(__name__)
32
33
 
33
34
 
35
+ class PTCCodeInput(BaseModel):
36
+ """Input schema for PTCCodeTool."""
37
+
38
+ code: str = Field(
39
+ ...,
40
+ description=(
41
+ "Python code to execute. Import MCP tools from the generated `tools` package, "
42
+ "for example: `from tools.yfinance import get_stock_history`. "
43
+ "The code runs in a sandboxed environment with access to all configured MCP tools. "
44
+ "Use print() to output results. The tool returns JSON with keys: "
45
+ "ok, stdout, stderr, exit_code."
46
+ ),
47
+ )
48
+
49
+
34
50
  def _merge_config_layer(
35
51
  merged: dict[str, dict[str, Any]],
36
52
  source: dict[str, Any],
@@ -123,6 +139,9 @@ class PTCCodeTool(BaseTool):
123
139
  "This tool is useful for chaining multiple MCP tool calls with local data processing."
124
140
  )
125
141
 
142
+ # Input schema for LangChain tool invocation
143
+ args_schema: type[BaseModel] = PTCCodeInput
144
+
126
145
  # Internal attributes (not exposed to LLM)
127
146
  _ptc_executor: "PTCSandboxExecutor" = None # type: ignore[assignment]
128
147
  _ptc_runtime: "E2BSandboxRuntime" = None # type: ignore[assignment]
@@ -149,22 +168,6 @@ class PTCCodeTool(BaseTool):
149
168
  object.__setattr__(self, "_ptc_runtime", runtime)
150
169
  object.__setattr__(self, "_agent_tool_configs", agent_tool_configs)
151
170
 
152
- @property
153
- def args(self) -> dict[str, Any]:
154
- """Return the argument schema for the tool."""
155
- return {
156
- "code": {
157
- "type": "string",
158
- "description": (
159
- "Python code to execute. Import MCP tools from the generated `tools` package, "
160
- "for example: `from tools.yfinance import get_stock_history`. "
161
- "The code runs in a sandboxed environment with access to all configured MCP tools. "
162
- "Use print() to output results. The tool returns JSON with keys: "
163
- "ok, stdout, stderr, exit_code."
164
- ),
165
- }
166
- }
167
-
168
171
  def _run(
169
172
  self,
170
173
  code: str,
@@ -6,10 +6,15 @@ from aip_agents.sandbox.e2b_runtime import E2BSandboxRuntime as E2BSandboxRuntim
6
6
  from aip_agents.tools.tool_config_injector import TOOL_CONFIGS_KEY as TOOL_CONFIGS_KEY
7
7
  from aip_agents.utils.logger import get_logger as get_logger
8
8
  from langchain_core.tools import BaseTool
9
+ from pydantic import BaseModel
9
10
  from typing import Any
10
11
 
11
12
  logger: Incomplete
12
13
 
14
+ class PTCCodeInput(BaseModel):
15
+ """Input schema for PTCCodeTool."""
16
+ code: str
17
+
13
18
  def merge_tool_configs(agent_configs: dict[str, Any] | None, runtime_configs: dict[str, Any] | None) -> dict[str, dict[str, Any]]:
14
19
  '''Merge agent-level and runtime tool configs with sanitized keys.
15
20
 
@@ -42,6 +47,7 @@ class PTCCodeTool(BaseTool):
42
47
  """
43
48
  name: str
44
49
  description: str
50
+ args_schema: type[BaseModel]
45
51
  def __init__(self, executor: PTCSandboxExecutor, runtime: E2BSandboxRuntime, agent_tool_configs: dict[str, Any] | None = None, **kwargs: Any) -> None:
46
52
  """Initialize the PTC code tool.
47
53
 
@@ -51,9 +57,6 @@ class PTCCodeTool(BaseTool):
51
57
  agent_tool_configs: Optional agent-level tool configs.
52
58
  **kwargs: Additional keyword arguments passed to BaseTool.
53
59
  """
54
- @property
55
- def args(self) -> dict[str, Any]:
56
- """Return the argument schema for the tool."""
57
60
  async def cleanup(self) -> None:
58
61
  """Clean up the sandbox runtime."""
59
62
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: aip-agents-binary
3
- Version: 0.6.1
3
+ Version: 0.6.2
4
4
  Summary: A library for managing agents in Gen AI applications.
5
5
  Author-email: Raymond Christopher <raymond.christopher@gdplabs.id>
6
6
  Requires-Python: <3.13,>=3.11
@@ -209,7 +209,7 @@ aip_agents/examples/hello_world_multi_agent_langgraph_lm_invoker.py,sha256=sppLD
209
209
  aip_agents/examples/hello_world_multi_agent_langgraph_lm_invoker.pyi,sha256=zFNns9i-sPY8aBy4HaVS6tXDWTsU7f-ApLD8gDtb1uk,252
210
210
  aip_agents/examples/hello_world_pii_logger.py,sha256=pm9LK-doZwQL-VdJYFHziuvwH562c8wwAwmKZeAWQS0,584
211
211
  aip_agents/examples/hello_world_pii_logger.pyi,sha256=5gOVrvhQV2DxIwr7ocL1-oTUXsO8XSyl5WN70c7rl_w,134
212
- aip_agents/examples/hello_world_ptc.py,sha256=EkSHUfRiGWLhUBcwpjWTRzAILqYzEPpys0pXmndWjk0,1462
212
+ aip_agents/examples/hello_world_ptc.py,sha256=A3aadYO3H41UgKZoHqrThXz2_hOFGX8-E4XwFnRi7P4,1410
213
213
  aip_agents/examples/hello_world_ptc.pyi,sha256=Dbo4myHbndrL6PyA_mgf3HTIYqLudTaF4h_nsdqOyKs,231
214
214
  aip_agents/examples/hello_world_sentry.py,sha256=Gccr6WCevSnMFZYT5M6uJ_22EvLmAMUE8Et_H510_kM,3976
215
215
  aip_agents/examples/hello_world_sentry.pyi,sha256=k0wFj46QqXEjBU0CEERmiEf2bovVFkupzuzQzeD6h00,671
@@ -438,8 +438,8 @@ aip_agents/tools/__init__.py,sha256=Kvd185p8zZ2xpNqimxURJUA6joPXP-3MIrr8K3Lf9Rw,
438
438
  aip_agents/tools/__init__.pyi,sha256=K2j6MjKo5aaMAbWkknLwyRbSu14LxJyRMoi88DbHROk,1027
439
439
  aip_agents/tools/constants.py,sha256=AabnuPQG_mc2sVdr9jV23_6bFempAsxQv3kdCR_ztLA,5723
440
440
  aip_agents/tools/constants.pyi,sha256=kFY8dKgRqHKGvPqG3QUyuEc8C5yRaDj7DYQDH88K2T0,3552
441
- aip_agents/tools/execute_ptc_code.py,sha256=h1-bnW4u5HoDFZGQbROitREE4MGblvlwKqHXSNL3XUM,11408
442
- aip_agents/tools/execute_ptc_code.pyi,sha256=4wXrAPjUYoXWODxg90expdvIetTlULvFZwGvKbdbJrE,4046
441
+ aip_agents/tools/execute_ptc_code.py,sha256=mN8-G50voxVqWH9r3uJGQOtgPtxsHaTOnJrJuojQLIM,11396
442
+ aip_agents/tools/execute_ptc_code.pyi,sha256=nDlpxV-kcKuNmtghahjXAtjWvtNv6D38x8-VTNCKYjU,4089
443
443
  aip_agents/tools/gl_connector_tools.py,sha256=bxl_3VQYZDv3lFn6Y3kDVVRFwH4cntOLz3f74YzDcic,3936
444
444
  aip_agents/tools/gl_connector_tools.pyi,sha256=2ATn_MW_FRg5Uv7dLI_ToBOtlgTSfj0zgDQpN1N-cJs,1366
445
445
  aip_agents/tools/memory_search_tool.py,sha256=gqTTb_Fao_Hl-SavfaFsqPDhnFQUjzIQUkzizSD2L0A,653
@@ -606,7 +606,7 @@ aip_agents/utils/pii/pii_helper.py,sha256=g0yRzakfA2AA6vjUNLWHqFlcxyLql6MXQ90NN3
606
606
  aip_agents/utils/pii/pii_helper.pyi,sha256=dulZs150ikbAL3Bw2YLcz3_g4DsGmL3lciwf8mKxEjI,2939
607
607
  aip_agents/utils/pii/uuid_deanonymizer_mapping.py,sha256=Gks8l8t0cuS9pzoQnrpiK1CaLmWYksjOnTeiHh3_7EE,7348
608
608
  aip_agents/utils/pii/uuid_deanonymizer_mapping.pyi,sha256=gnWfD1rWZh_tloJjgKiZ6f6iNUuBaHpKqCSiP0d-9bs,3084
609
- aip_agents_binary-0.6.1.dist-info/METADATA,sha256=SHkg6ELXvsKcMmpLPVaJSxPYoSHbpMqUmhouUUFqAVg,22371
610
- aip_agents_binary-0.6.1.dist-info/WHEEL,sha256=KxCTaSkoYs_EnWvWxmau4HAvN-_rCRYV_bfRc_41A9k,106
611
- aip_agents_binary-0.6.1.dist-info/top_level.txt,sha256=PEz8vcwC1bH4UrkhF0LkIYCNfXGWZUHdSklbvkBe25E,11
612
- aip_agents_binary-0.6.1.dist-info/RECORD,,
609
+ aip_agents_binary-0.6.2.dist-info/METADATA,sha256=pwc5Qenz-QKrlBcmtfP-CwkSLbEp0Wi-LjqBMmtqFRY,22371
610
+ aip_agents_binary-0.6.2.dist-info/WHEEL,sha256=KxCTaSkoYs_EnWvWxmau4HAvN-_rCRYV_bfRc_41A9k,106
611
+ aip_agents_binary-0.6.2.dist-info/top_level.txt,sha256=PEz8vcwC1bH4UrkhF0LkIYCNfXGWZUHdSklbvkBe25E,11
612
+ aip_agents_binary-0.6.2.dist-info/RECORD,,