tollgate 1.0.0__tar.gz → 1.0.2__tar.gz

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.
Files changed (60) hide show
  1. {tollgate-1.0.0 → tollgate-1.0.2}/LICENSE +16 -0
  2. tollgate-1.0.2/PKG-INFO +117 -0
  3. tollgate-1.0.2/README.md +92 -0
  4. {tollgate-1.0.0 → tollgate-1.0.2}/pyproject.toml +1 -1
  5. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/__init__.py +1 -1
  6. tollgate-1.0.0/PKG-INFO +0 -98
  7. tollgate-1.0.0/README.md +0 -73
  8. {tollgate-1.0.0 → tollgate-1.0.2}/.claude/settings.local.json +0 -0
  9. {tollgate-1.0.0 → tollgate-1.0.2}/.gitignore +0 -0
  10. {tollgate-1.0.0 → tollgate-1.0.2}/CHANGELOG.md +0 -0
  11. {tollgate-1.0.0 → tollgate-1.0.2}/COMPARISON.md +0 -0
  12. {tollgate-1.0.0 → tollgate-1.0.2}/CONTRIBUTING.md +0 -0
  13. {tollgate-1.0.0 → tollgate-1.0.2}/Makefile +0 -0
  14. {tollgate-1.0.0 → tollgate-1.0.2}/QUICKSTART.md +0 -0
  15. {tollgate-1.0.0 → tollgate-1.0.2}/SECURITY.md +0 -0
  16. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mcp_minimal/audit.jsonl +0 -0
  17. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mcp_minimal/demo.py +0 -0
  18. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mcp_minimal/manifest.yaml +0 -0
  19. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mcp_minimal/policy.yaml +0 -0
  20. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mock_tickets/README.md +0 -0
  21. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mock_tickets/agent.py +0 -0
  22. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mock_tickets/demo.py +0 -0
  23. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mock_tickets/manifest.yaml +0 -0
  24. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mock_tickets/tickets.json +0 -0
  25. {tollgate-1.0.0 → tollgate-1.0.2}/examples/mock_tickets/tools.py +0 -0
  26. {tollgate-1.0.0 → tollgate-1.0.2}/examples/strands_minimal/audit.jsonl +0 -0
  27. {tollgate-1.0.0 → tollgate-1.0.2}/examples/strands_minimal/demo.py +0 -0
  28. {tollgate-1.0.0 → tollgate-1.0.2}/examples/strands_minimal/manifest.yaml +0 -0
  29. {tollgate-1.0.0 → tollgate-1.0.2}/examples/strands_minimal/policy.yaml +0 -0
  30. {tollgate-1.0.0 → tollgate-1.0.2}/policies/default.yaml +0 -0
  31. {tollgate-1.0.0 → tollgate-1.0.2}/specs/audit_event.schema.json +0 -0
  32. {tollgate-1.0.0 → tollgate-1.0.2}/specs/decision.schema.json +0 -0
  33. {tollgate-1.0.0 → tollgate-1.0.2}/specs/identity.schema.json +0 -0
  34. {tollgate-1.0.0 → tollgate-1.0.2}/specs/intent.schema.json +0 -0
  35. {tollgate-1.0.0 → tollgate-1.0.2}/specs/tool_request.schema.json +0 -0
  36. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/approvals.py +0 -0
  37. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/audit.py +0 -0
  38. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/exceptions.py +0 -0
  39. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/helpers.py +0 -0
  40. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/integrations/__init__.py +0 -0
  41. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/integrations/mcp.py +0 -0
  42. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/integrations/strands.py +0 -0
  43. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/interceptors/__init__.py +0 -0
  44. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/interceptors/base.py +0 -0
  45. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/interceptors/langchain.py +0 -0
  46. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/interceptors/openai.py +0 -0
  47. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/policy.py +0 -0
  48. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/registry.py +0 -0
  49. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/tower.py +0 -0
  50. {tollgate-1.0.0 → tollgate-1.0.2}/src/tollgate/types.py +0 -0
  51. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_adapters_v1.py +0 -0
  52. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_audit_integrity_v1.py +0 -0
  53. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_deferred_v1.py +0 -0
  54. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_helpers_v1.py +0 -0
  55. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_integrations_v1.py +0 -0
  56. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_policy_v1.py +0 -0
  57. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_registry_v1.py +0 -0
  58. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_security_v1.py +0 -0
  59. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_tower_v1.py +0 -0
  60. {tollgate-1.0.0 → tollgate-1.0.2}/tests/test_v1_integrations.py +0 -0
@@ -1,3 +1,19 @@
1
+ Copyright 2026 Ravi Labs
2
+
3
+ Licensed under the Apache License, Version 2.0 (the "License");
4
+ you may not use this file except in compliance with the License.
5
+ You may obtain a copy of the License at
6
+
7
+ http://www.apache.org/licenses/LICENSE-2.0
8
+
9
+ Unless required by applicable law or agreed to in writing, software
10
+ distributed under the License is distributed on an "AS IS" BASIS,
11
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12
+ See the License for the specific language governing permissions and
13
+ limitations under the License.
14
+
15
+ --------------------------------------------------------------------------------
16
+
1
17
  Apache License
2
18
  Version 2.0, January 2004
3
19
  http://www.apache.org/licenses/
@@ -0,0 +1,117 @@
1
+ Metadata-Version: 2.4
2
+ Name: tollgate
3
+ Version: 1.0.2
4
+ Summary: Runtime enforcement layer for AI agent tool calls using Identity + Intent + Policy
5
+ Author: Tollgate Maintainers
6
+ License-Expression: Apache-2.0
7
+ License-File: LICENSE
8
+ Keywords: agents,ai,enforcement,llm,policy,security
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: Apache Software License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Programming Language :: Python :: 3.10
14
+ Classifier: Programming Language :: Python :: 3.11
15
+ Classifier: Programming Language :: Python :: 3.12
16
+ Requires-Python: >=3.10
17
+ Requires-Dist: pyyaml>=6.0.0
18
+ Provides-Extra: dev
19
+ Requires-Dist: build>=1.0.0; extra == 'dev'
20
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
21
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
22
+ Requires-Dist: ruff>=0.1.0; extra == 'dev'
23
+ Requires-Dist: twine>=4.0.0; extra == 'dev'
24
+ Description-Content-Type: text/markdown
25
+
26
+ # tollgate 🚪
27
+
28
+ Runtime enforcement layer for AI agent tool calls using **Identity + Intent + Policy**.
29
+
30
+ `tollgate` provides a deterministic safety boundary for AI agents. It ensures every tool call is validated against a policy before execution, with support for async human-in-the-loop approvals, framework interception (MCP, Strands, LangChain, OpenAI), and structured audit logging.
31
+
32
+ **[🚀 Quickstart Guide](https://github.com/ravi-labs/tollgate/blob/main/QUICKSTART.md) | [📊 Integration Comparison](https://github.com/ravi-labs/tollgate/blob/main/COMPARISON.md)**
33
+
34
+ ```
35
+ ┌────────────┐ ┌─────────────────────┐ ┌──────────────────┐
36
+ │ AI Agent │────▶│ Tollgate Interceptor│────▶│ Policy + Registry│
37
+ └────────────┘ └─────────────────────┘ └────────┬─────────┘
38
+
39
+ ┌────────────────────────────────────┼────────────────────────────────────┐
40
+ │ │ │
41
+ ▼ ▼ ▼
42
+ ┌───────────┐ ┌───────────┐ ┌───────────┐
43
+ │ ALLOW │ │ ASK │ │ DENY │
44
+ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
45
+ │ │ │
46
+ ▼ ▼ ▼
47
+ ┌───────────┐ ┌───────────────┐ ┌───────────┐
48
+ │ Execute │ │Human Approval │ │ Block & │
49
+ │ Tool │ │ (Approved?) │ │ Audit │
50
+ └─────┬─────┘ └───────┬───────┘ └─────┬─────┘
51
+ │ ▼ ▼ │
52
+ │ Yes │ │ No │
53
+ │ ▼ ▼ │
54
+ │ ┌─────────┐ ┌─────────┐ │
55
+ │ │ Execute │ │ Block │ │
56
+ │ └────┬────┘ └────┬────┘ │
57
+ │ │ │ │
58
+ └─────────────────────────────┴───────────┴──────────────────────────────┘
59
+
60
+
61
+ ┌───────────┐
62
+ │ Audit Log │
63
+ └───────────┘
64
+ ```
65
+
66
+ ## ✨ v1 Core Principles
67
+
68
+ 1. **Interception-First**: Enforcement happens at the tool execution boundary via adapters.
69
+ 2. **Safe Defaults**: Any unknown tool effect or resource defaults to **DENY**.
70
+ 3. **Trust Model**: Tool metadata is trusted only if it comes from a developer-controlled **Tool Registry**.
71
+ 4. **Approval Integrity**: Approvals are bound to a request hash and correlation ID with replay protection.
72
+ 5. **Async-First**: Native support for asynchronous agent loops and non-blocking approvals.
73
+ 6. **Audit Integrity**: Every decision, approval, and outcome is recorded with full cryptographic context.
74
+
75
+ ## 🚀 v1 Integrations
76
+
77
+ ### MCP (Model Context Protocol)
78
+ Wrap an MCP client to gate all tool calls:
79
+ ```python
80
+ from tollgate import ControlTower, ToolRegistry
81
+ from tollgate.integrations.mcp import TollgateMCPClient
82
+
83
+ registry = ToolRegistry("manifest.yaml")
84
+ tower = ControlTower(...)
85
+ client = TollgateMCPClient(base_client, server_name="my_server", tower=tower, registry=registry)
86
+
87
+ # Calls are now gated!
88
+ await client.call_tool("read_data", {"id": 1}, agent_ctx=ctx, intent=intent)
89
+ ```
90
+
91
+ ### Strands Agents
92
+ Gate Strands tools with minimal friction:
93
+ ```python
94
+ from tollgate.integrations.strands import guard_tools
95
+
96
+ guarded = guard_tools(my_strands_tools, tower, registry)
97
+
98
+ # Use guarded tools in your agent
99
+ await guarded[0]("input", agent_ctx=ctx, intent=intent)
100
+ ```
101
+
102
+ ## 📜 Development
103
+
104
+ ```bash
105
+ # Install
106
+ make install
107
+
108
+ # Run Tests
109
+ make test
110
+
111
+ # Run Examples (non-interactive)
112
+ python examples/mcp_minimal/demo.py
113
+ python examples/strands_minimal/demo.py
114
+ ```
115
+
116
+ ## ⚖️ License
117
+ Apache-2.0
@@ -0,0 +1,92 @@
1
+ # tollgate 🚪
2
+
3
+ Runtime enforcement layer for AI agent tool calls using **Identity + Intent + Policy**.
4
+
5
+ `tollgate` provides a deterministic safety boundary for AI agents. It ensures every tool call is validated against a policy before execution, with support for async human-in-the-loop approvals, framework interception (MCP, Strands, LangChain, OpenAI), and structured audit logging.
6
+
7
+ **[🚀 Quickstart Guide](https://github.com/ravi-labs/tollgate/blob/main/QUICKSTART.md) | [📊 Integration Comparison](https://github.com/ravi-labs/tollgate/blob/main/COMPARISON.md)**
8
+
9
+ ```
10
+ ┌────────────┐ ┌─────────────────────┐ ┌──────────────────┐
11
+ │ AI Agent │────▶│ Tollgate Interceptor│────▶│ Policy + Registry│
12
+ └────────────┘ └─────────────────────┘ └────────┬─────────┘
13
+
14
+ ┌────────────────────────────────────┼────────────────────────────────────┐
15
+ │ │ │
16
+ ▼ ▼ ▼
17
+ ┌───────────┐ ┌───────────┐ ┌───────────┐
18
+ │ ALLOW │ │ ASK │ │ DENY │
19
+ └─────┬─────┘ └─────┬─────┘ └─────┬─────┘
20
+ │ │ │
21
+ ▼ ▼ ▼
22
+ ┌───────────┐ ┌───────────────┐ ┌───────────┐
23
+ │ Execute │ │Human Approval │ │ Block & │
24
+ │ Tool │ │ (Approved?) │ │ Audit │
25
+ └─────┬─────┘ └───────┬───────┘ └─────┬─────┘
26
+ │ ▼ ▼ │
27
+ │ Yes │ │ No │
28
+ │ ▼ ▼ │
29
+ │ ┌─────────┐ ┌─────────┐ │
30
+ │ │ Execute │ │ Block │ │
31
+ │ └────┬────┘ └────┬────┘ │
32
+ │ │ │ │
33
+ └─────────────────────────────┴───────────┴──────────────────────────────┘
34
+
35
+
36
+ ┌───────────┐
37
+ │ Audit Log │
38
+ └───────────┘
39
+ ```
40
+
41
+ ## ✨ v1 Core Principles
42
+
43
+ 1. **Interception-First**: Enforcement happens at the tool execution boundary via adapters.
44
+ 2. **Safe Defaults**: Any unknown tool effect or resource defaults to **DENY**.
45
+ 3. **Trust Model**: Tool metadata is trusted only if it comes from a developer-controlled **Tool Registry**.
46
+ 4. **Approval Integrity**: Approvals are bound to a request hash and correlation ID with replay protection.
47
+ 5. **Async-First**: Native support for asynchronous agent loops and non-blocking approvals.
48
+ 6. **Audit Integrity**: Every decision, approval, and outcome is recorded with full cryptographic context.
49
+
50
+ ## 🚀 v1 Integrations
51
+
52
+ ### MCP (Model Context Protocol)
53
+ Wrap an MCP client to gate all tool calls:
54
+ ```python
55
+ from tollgate import ControlTower, ToolRegistry
56
+ from tollgate.integrations.mcp import TollgateMCPClient
57
+
58
+ registry = ToolRegistry("manifest.yaml")
59
+ tower = ControlTower(...)
60
+ client = TollgateMCPClient(base_client, server_name="my_server", tower=tower, registry=registry)
61
+
62
+ # Calls are now gated!
63
+ await client.call_tool("read_data", {"id": 1}, agent_ctx=ctx, intent=intent)
64
+ ```
65
+
66
+ ### Strands Agents
67
+ Gate Strands tools with minimal friction:
68
+ ```python
69
+ from tollgate.integrations.strands import guard_tools
70
+
71
+ guarded = guard_tools(my_strands_tools, tower, registry)
72
+
73
+ # Use guarded tools in your agent
74
+ await guarded[0]("input", agent_ctx=ctx, intent=intent)
75
+ ```
76
+
77
+ ## 📜 Development
78
+
79
+ ```bash
80
+ # Install
81
+ make install
82
+
83
+ # Run Tests
84
+ make test
85
+
86
+ # Run Examples (non-interactive)
87
+ python examples/mcp_minimal/demo.py
88
+ python examples/strands_minimal/demo.py
89
+ ```
90
+
91
+ ## ⚖️ License
92
+ Apache-2.0
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
4
4
 
5
5
  [project]
6
6
  name = "tollgate"
7
- version = "1.0.0"
7
+ version = "1.0.2"
8
8
  description = "Runtime enforcement layer for AI agent tool calls using Identity + Intent + Policy"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -31,7 +31,7 @@ from .types import (
31
31
  ToolRequest,
32
32
  )
33
33
 
34
- __version__ = "1.0.0"
34
+ __version__ = "1.0.2"
35
35
 
36
36
  __all__ = [
37
37
  "ControlTower",
tollgate-1.0.0/PKG-INFO DELETED
@@ -1,98 +0,0 @@
1
- Metadata-Version: 2.4
2
- Name: tollgate
3
- Version: 1.0.0
4
- Summary: Runtime enforcement layer for AI agent tool calls using Identity + Intent + Policy
5
- Author: Tollgate Maintainers
6
- License-Expression: Apache-2.0
7
- License-File: LICENSE
8
- Keywords: agents,ai,enforcement,llm,policy,security
9
- Classifier: Development Status :: 3 - Alpha
10
- Classifier: Intended Audience :: Developers
11
- Classifier: License :: OSI Approved :: Apache Software License
12
- Classifier: Programming Language :: Python :: 3
13
- Classifier: Programming Language :: Python :: 3.10
14
- Classifier: Programming Language :: Python :: 3.11
15
- Classifier: Programming Language :: Python :: 3.12
16
- Requires-Python: >=3.10
17
- Requires-Dist: pyyaml>=6.0.0
18
- Provides-Extra: dev
19
- Requires-Dist: build>=1.0.0; extra == 'dev'
20
- Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
21
- Requires-Dist: pytest>=7.0.0; extra == 'dev'
22
- Requires-Dist: ruff>=0.1.0; extra == 'dev'
23
- Requires-Dist: twine>=4.0.0; extra == 'dev'
24
- Description-Content-Type: text/markdown
25
-
26
- # tollgate 🚪
27
-
28
- Runtime enforcement layer for AI agent tool calls using **Identity + Intent + Policy**.
29
-
30
- `tollgate` provides a deterministic safety boundary for AI agents. It ensures every tool call is validated against a policy before execution, with support for async human-in-the-loop approvals, framework interception (MCP, Strands, LangChain, OpenAI), and structured audit logging.
31
-
32
- **[🚀 Quickstart Guide](./QUICKSTART.md) | [📊 Integration Comparison](./COMPARISON.md)**
33
-
34
- ```mermaid
35
- graph TD
36
- A[AI Agent] -->|Tool Call| B(Tollgate Interceptor)
37
- B --> C{Policy + Registry}
38
- C -->|ALLOW| D[Execute Tool]
39
- C -->|DENY| E[Block & Audit]
40
- C -->|ASK| F{Human Approval}
41
- F -->|Approved| D
42
- F -->|Denied| E
43
- D --> G[Audit Log]
44
- E --> G
45
- ```
46
-
47
- ## ✨ v1 Core Principles
48
-
49
- 1. **Interception-First**: Enforcement happens at the tool execution boundary via adapters.
50
- 2. **Safe Defaults**: Any unknown tool effect or resource defaults to **DENY**.
51
- 3. **Trust Model**: Tool metadata is trusted only if it comes from a developer-controlled **Tool Registry**.
52
- 4. **Approval Integrity**: Approvals are bound to a request hash and correlation ID with replay protection.
53
- 5. **Async-First**: Native support for asynchronous agent loops and non-blocking approvals.
54
- 6. **Audit Integrity**: Every decision, approval, and outcome is recorded with full cryptographic context.
55
-
56
- ## 🚀 v1 Integrations
57
-
58
- ### MCP (Model Context Protocol)
59
- Wrap an MCP client to gate all tool calls:
60
- ```python
61
- from tollgate import ControlTower, ToolRegistry
62
- from tollgate.integrations.mcp import TollgateMCPClient
63
-
64
- registry = ToolRegistry("manifest.yaml")
65
- tower = ControlTower(...)
66
- client = TollgateMCPClient(base_client, server_name="my_server", tower=tower, registry=registry)
67
-
68
- # Calls are now gated!
69
- await client.call_tool("read_data", {"id": 1}, agent_ctx=ctx, intent=intent)
70
- ```
71
-
72
- ### Strands Agents
73
- Gate Strands tools with minimal friction:
74
- ```python
75
- from tollgate.integrations.strands import guard_tools
76
-
77
- guarded = guard_tools(my_strands_tools, tower, registry)
78
-
79
- # Use guarded tools in your agent
80
- await guarded[0]("input", agent_ctx=ctx, intent=intent)
81
- ```
82
-
83
- ## 📜 Development
84
-
85
- ```bash
86
- # Install
87
- make install
88
-
89
- # Run Tests
90
- make test
91
-
92
- # Run Examples (non-interactive)
93
- python examples/mcp_minimal/demo.py
94
- python examples/strands_minimal/demo.py
95
- ```
96
-
97
- ## ⚖️ License
98
- Apache-2.0
tollgate-1.0.0/README.md DELETED
@@ -1,73 +0,0 @@
1
- # tollgate 🚪
2
-
3
- Runtime enforcement layer for AI agent tool calls using **Identity + Intent + Policy**.
4
-
5
- `tollgate` provides a deterministic safety boundary for AI agents. It ensures every tool call is validated against a policy before execution, with support for async human-in-the-loop approvals, framework interception (MCP, Strands, LangChain, OpenAI), and structured audit logging.
6
-
7
- **[🚀 Quickstart Guide](./QUICKSTART.md) | [📊 Integration Comparison](./COMPARISON.md)**
8
-
9
- ```mermaid
10
- graph TD
11
- A[AI Agent] -->|Tool Call| B(Tollgate Interceptor)
12
- B --> C{Policy + Registry}
13
- C -->|ALLOW| D[Execute Tool]
14
- C -->|DENY| E[Block & Audit]
15
- C -->|ASK| F{Human Approval}
16
- F -->|Approved| D
17
- F -->|Denied| E
18
- D --> G[Audit Log]
19
- E --> G
20
- ```
21
-
22
- ## ✨ v1 Core Principles
23
-
24
- 1. **Interception-First**: Enforcement happens at the tool execution boundary via adapters.
25
- 2. **Safe Defaults**: Any unknown tool effect or resource defaults to **DENY**.
26
- 3. **Trust Model**: Tool metadata is trusted only if it comes from a developer-controlled **Tool Registry**.
27
- 4. **Approval Integrity**: Approvals are bound to a request hash and correlation ID with replay protection.
28
- 5. **Async-First**: Native support for asynchronous agent loops and non-blocking approvals.
29
- 6. **Audit Integrity**: Every decision, approval, and outcome is recorded with full cryptographic context.
30
-
31
- ## 🚀 v1 Integrations
32
-
33
- ### MCP (Model Context Protocol)
34
- Wrap an MCP client to gate all tool calls:
35
- ```python
36
- from tollgate import ControlTower, ToolRegistry
37
- from tollgate.integrations.mcp import TollgateMCPClient
38
-
39
- registry = ToolRegistry("manifest.yaml")
40
- tower = ControlTower(...)
41
- client = TollgateMCPClient(base_client, server_name="my_server", tower=tower, registry=registry)
42
-
43
- # Calls are now gated!
44
- await client.call_tool("read_data", {"id": 1}, agent_ctx=ctx, intent=intent)
45
- ```
46
-
47
- ### Strands Agents
48
- Gate Strands tools with minimal friction:
49
- ```python
50
- from tollgate.integrations.strands import guard_tools
51
-
52
- guarded = guard_tools(my_strands_tools, tower, registry)
53
-
54
- # Use guarded tools in your agent
55
- await guarded[0]("input", agent_ctx=ctx, intent=intent)
56
- ```
57
-
58
- ## 📜 Development
59
-
60
- ```bash
61
- # Install
62
- make install
63
-
64
- # Run Tests
65
- make test
66
-
67
- # Run Examples (non-interactive)
68
- python examples/mcp_minimal/demo.py
69
- python examples/strands_minimal/demo.py
70
- ```
71
-
72
- ## ⚖️ License
73
- Apache-2.0
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes