vouch-crewai 0.1.0__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.
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: vouch-crewai
3
+ Version: 0.1.0
4
+ Summary: CrewAI tool that issues Vouch Credentials to authorize multi-agent tool calls.
5
+ Author: Ramprasad Gaddam
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://vouch-protocol.com
8
+ Project-URL: Source, https://github.com/vouch-protocol/vouch
9
+ Keywords: crewai,vouch,ai-agents,verifiable-credentials,delegation
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: vouch-protocol[crewai]>=1.6.0
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=7.0; extra == "dev"
15
+
16
+ # vouch-crewai
17
+
18
+ A [CrewAI](https://www.crewai.com/) tool that issues
19
+ [Vouch](https://vouch-protocol.com) Credentials, so the agents in a crew can
20
+ cryptographically authorize their tool calls, including across delegation.
21
+
22
+ Each signed call carries a W3C Verifiable Credential with an `eddsa-jcs-2022`
23
+ Data Integrity proof. When a supervisor agent delegates to a worker, the
24
+ worker's credential extends the supervisor's chain and can only narrow the
25
+ authority, never broaden it.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ pip install vouch-crewai
31
+ ```
32
+
33
+ This pulls in `vouch-protocol[crewai]`.
34
+
35
+ ## Configure
36
+
37
+ - `VOUCH_PRIVATE_KEY` the agent's private key (JWK JSON string).
38
+ - `VOUCH_DID` the agent's DID, e.g. `did:web:agent.example.com`.
39
+
40
+ ## Use
41
+
42
+ ```python
43
+ from vouch_crewai import sign_request
44
+
45
+ # Give the tool to a CrewAI agent. It calls it before an authenticated request.
46
+ credential_json = sign_request(
47
+ action="read",
48
+ target="https://api.example.com",
49
+ resource="customer:123",
50
+ )
51
+ ```
52
+
53
+ ## Delegation between agents
54
+
55
+ See `examples/integrations_delegation.py` in the main repo for a supervisor
56
+ that issues a broad credential and a worker that narrows it under capability
57
+ attenuation.
58
+
59
+ ## Verify on the receiving side
60
+
61
+ ```python
62
+ from vouch import Verifier
63
+ ok, passport = Verifier.verify_credential(received_json, public_key=agent_pubkey)
64
+ ```
65
+
66
+ ## License
67
+
68
+ Apache-2.0.
@@ -0,0 +1,53 @@
1
+ # vouch-crewai
2
+
3
+ A [CrewAI](https://www.crewai.com/) tool that issues
4
+ [Vouch](https://vouch-protocol.com) Credentials, so the agents in a crew can
5
+ cryptographically authorize their tool calls, including across delegation.
6
+
7
+ Each signed call carries a W3C Verifiable Credential with an `eddsa-jcs-2022`
8
+ Data Integrity proof. When a supervisor agent delegates to a worker, the
9
+ worker's credential extends the supervisor's chain and can only narrow the
10
+ authority, never broaden it.
11
+
12
+ ## Install
13
+
14
+ ```bash
15
+ pip install vouch-crewai
16
+ ```
17
+
18
+ This pulls in `vouch-protocol[crewai]`.
19
+
20
+ ## Configure
21
+
22
+ - `VOUCH_PRIVATE_KEY` the agent's private key (JWK JSON string).
23
+ - `VOUCH_DID` the agent's DID, e.g. `did:web:agent.example.com`.
24
+
25
+ ## Use
26
+
27
+ ```python
28
+ from vouch_crewai import sign_request
29
+
30
+ # Give the tool to a CrewAI agent. It calls it before an authenticated request.
31
+ credential_json = sign_request(
32
+ action="read",
33
+ target="https://api.example.com",
34
+ resource="customer:123",
35
+ )
36
+ ```
37
+
38
+ ## Delegation between agents
39
+
40
+ See `examples/integrations_delegation.py` in the main repo for a supervisor
41
+ that issues a broad credential and a worker that narrows it under capability
42
+ attenuation.
43
+
44
+ ## Verify on the receiving side
45
+
46
+ ```python
47
+ from vouch import Verifier
48
+ ok, passport = Verifier.verify_credential(received_json, public_key=agent_pubkey)
49
+ ```
50
+
51
+ ## License
52
+
53
+ Apache-2.0.
@@ -0,0 +1,24 @@
1
+ [build-system]
2
+ requires = ["setuptools>=61.0"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "vouch-crewai"
7
+ version = "0.1.0"
8
+ description = "CrewAI tool that issues Vouch Credentials to authorize multi-agent tool calls."
9
+ readme = "README.md"
10
+ requires-python = ">=3.9"
11
+ license = { text = "Apache-2.0" }
12
+ authors = [{ name = "Ramprasad Gaddam" }]
13
+ keywords = ["crewai", "vouch", "ai-agents", "verifiable-credentials", "delegation"]
14
+ dependencies = ["vouch-protocol[crewai]>=1.6.0"]
15
+
16
+ [project.optional-dependencies]
17
+ dev = ["pytest>=7.0"]
18
+
19
+ [project.urls]
20
+ Homepage = "https://vouch-protocol.com"
21
+ Source = "https://github.com/vouch-protocol/vouch"
22
+
23
+ [tool.setuptools.packages.find]
24
+ where = ["src"]
@@ -0,0 +1,4 @@
1
+ [egg_info]
2
+ tag_build =
3
+ tag_date = 0
4
+
@@ -0,0 +1,11 @@
1
+ """vouch-crewai: a CrewAI tool that issues Vouch Credentials.
2
+
3
+ Thin distribution wrapping vouch.integrations.crewai. It exists so the tool can
4
+ be installed and listed on its own while the implementation stays
5
+ single-sourced in the vouch-protocol package.
6
+ """
7
+
8
+ from vouch.integrations.crewai.tool import VouchCrewTools, sign_request
9
+
10
+ __all__ = ["sign_request", "VouchCrewTools"]
11
+ __version__ = "0.1.0"
@@ -0,0 +1,68 @@
1
+ Metadata-Version: 2.4
2
+ Name: vouch-crewai
3
+ Version: 0.1.0
4
+ Summary: CrewAI tool that issues Vouch Credentials to authorize multi-agent tool calls.
5
+ Author: Ramprasad Gaddam
6
+ License: Apache-2.0
7
+ Project-URL: Homepage, https://vouch-protocol.com
8
+ Project-URL: Source, https://github.com/vouch-protocol/vouch
9
+ Keywords: crewai,vouch,ai-agents,verifiable-credentials,delegation
10
+ Requires-Python: >=3.9
11
+ Description-Content-Type: text/markdown
12
+ Requires-Dist: vouch-protocol[crewai]>=1.6.0
13
+ Provides-Extra: dev
14
+ Requires-Dist: pytest>=7.0; extra == "dev"
15
+
16
+ # vouch-crewai
17
+
18
+ A [CrewAI](https://www.crewai.com/) tool that issues
19
+ [Vouch](https://vouch-protocol.com) Credentials, so the agents in a crew can
20
+ cryptographically authorize their tool calls, including across delegation.
21
+
22
+ Each signed call carries a W3C Verifiable Credential with an `eddsa-jcs-2022`
23
+ Data Integrity proof. When a supervisor agent delegates to a worker, the
24
+ worker's credential extends the supervisor's chain and can only narrow the
25
+ authority, never broaden it.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ pip install vouch-crewai
31
+ ```
32
+
33
+ This pulls in `vouch-protocol[crewai]`.
34
+
35
+ ## Configure
36
+
37
+ - `VOUCH_PRIVATE_KEY` the agent's private key (JWK JSON string).
38
+ - `VOUCH_DID` the agent's DID, e.g. `did:web:agent.example.com`.
39
+
40
+ ## Use
41
+
42
+ ```python
43
+ from vouch_crewai import sign_request
44
+
45
+ # Give the tool to a CrewAI agent. It calls it before an authenticated request.
46
+ credential_json = sign_request(
47
+ action="read",
48
+ target="https://api.example.com",
49
+ resource="customer:123",
50
+ )
51
+ ```
52
+
53
+ ## Delegation between agents
54
+
55
+ See `examples/integrations_delegation.py` in the main repo for a supervisor
56
+ that issues a broad credential and a worker that narrows it under capability
57
+ attenuation.
58
+
59
+ ## Verify on the receiving side
60
+
61
+ ```python
62
+ from vouch import Verifier
63
+ ok, passport = Verifier.verify_credential(received_json, public_key=agent_pubkey)
64
+ ```
65
+
66
+ ## License
67
+
68
+ Apache-2.0.
@@ -0,0 +1,9 @@
1
+ README.md
2
+ pyproject.toml
3
+ src/vouch_crewai/__init__.py
4
+ src/vouch_crewai.egg-info/PKG-INFO
5
+ src/vouch_crewai.egg-info/SOURCES.txt
6
+ src/vouch_crewai.egg-info/dependency_links.txt
7
+ src/vouch_crewai.egg-info/requires.txt
8
+ src/vouch_crewai.egg-info/top_level.txt
9
+ tests/test_smoke.py
@@ -0,0 +1,4 @@
1
+ vouch-protocol[crewai]>=1.6.0
2
+
3
+ [dev]
4
+ pytest>=7.0
@@ -0,0 +1 @@
1
+ vouch_crewai
@@ -0,0 +1,35 @@
1
+ """Smoke tests for the vouch-crewai package.
2
+
3
+ The signing path is verified through the shared helper so the test is robust
4
+ whether or not CrewAI is installed (CrewAI wraps sign_request in a tool object).
5
+ """
6
+
7
+ import json
8
+ import os
9
+
10
+ from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
11
+ from jwcrypto.common import base64url_decode
12
+
13
+ from vouch import Verifier, generate_identity
14
+ from vouch.integrations._common import load_signer, sign_tool_call_json
15
+
16
+
17
+ def test_package_exports():
18
+ import vouch_crewai
19
+
20
+ assert vouch_crewai.sign_request is not None
21
+ assert vouch_crewai.VouchCrewTools is not None
22
+
23
+
24
+ def test_signing_path_verifies():
25
+ kp = generate_identity()
26
+ os.environ["VOUCH_PRIVATE_KEY"] = kp.private_key_jwk
27
+ os.environ["VOUCH_DID"] = "did:web:agent.example.com"
28
+
29
+ out = sign_tool_call_json(load_signer(), "read", "https://api.example.com", "customer:123")
30
+ cred = json.loads(out)
31
+ assert cred["proof"]["cryptosuite"] == "eddsa-jcs-2022"
32
+
33
+ pub = Ed25519PublicKey.from_public_bytes(base64url_decode(json.loads(kp.public_key_jwk)["x"]))
34
+ ok, _ = Verifier.verify_credential(cred, public_key=pub)
35
+ assert ok is True