agentstr 0.1.7__tar.gz → 0.1.9__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.
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2024 Synvya
3
+ Copyright (c) 2025 Synvya
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
@@ -0,0 +1 @@
1
+ include src/agentstr/examples/basic_cli/.env.example
@@ -0,0 +1,110 @@
1
+ Metadata-Version: 2.2
2
+ Name: agentstr
3
+ Version: 0.1.9
4
+ Summary: Nostr extension for Phidata AI agents
5
+ Project-URL: Homepage, https://github.com/synvya/agentstr
6
+ Project-URL: Documentation, https://github.com/synvya/agentstr#readme
7
+ Project-URL: BugTracker, https://github.com/synvya/agentstr/issues
8
+ Requires-Python: <3.13,>=3.9
9
+ Description-Content-Type: text/markdown
10
+ License-File: LICENSE
11
+ Requires-Dist: phidata>=2.7.0
12
+ Requires-Dist: openai>=1.50.0
13
+ Requires-Dist: packaging>=24.0
14
+ Requires-Dist: nostr-sdk>=0.38.0
15
+ Requires-Dist: pydantic>=2.0.0
16
+ Provides-Extra: dev
17
+ Requires-Dist: pytest>=7.0; extra == "dev"
18
+ Requires-Dist: black>=23.0; extra == "dev"
19
+ Requires-Dist: isort>=5.0; extra == "dev"
20
+ Requires-Dist: mypy>=1.0; extra == "dev"
21
+ Requires-Dist: python-dotenv>=1.0; extra == "dev"
22
+
23
+ # AgentStr
24
+
25
+ AgentStr is an extension of [Phidata](https://www.phidata.com) AI agents that enables peer-to-peer agent communication using the Nostr protocol.
26
+
27
+ ## Overview
28
+
29
+ AgentStr allows AI agents operated by different organizations to communicate and collaborate. For example:
30
+ - Agent A from Company A can coordinate with Agent B from Company B to execute a transaction
31
+ - Agents can discover and interact with each other through the decentralized Nostr network
32
+ - No central authority or intermediary required
33
+
34
+ ## Project Structure
35
+
36
+ ```
37
+ agentstr/
38
+ ├── src/ # Source code
39
+ │ └── agentstr/
40
+ │ ├── __init__.py
41
+ │ ├── marketplace.py
42
+ │ └── nostr.py
43
+ ├── tests/ # Test files
44
+ ├── docs/ # Documentation
45
+ ├── examples/ # Example implementations
46
+ └── ...
47
+ ```
48
+
49
+ ## Features
50
+
51
+ ### Current Features
52
+ - Create Merchant agents with Nostr identities
53
+ - Publish and manage merchant products using [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) marketplace protocol
54
+ - Create merchant stalls to organize products
55
+ - Handle shipping zones and costs
56
+ - Secure communication using Nostr keys
57
+
58
+ ### Roadmap
59
+ - [ ] Create marketplace with stalls
60
+ - [ ] Create Buyer agents
61
+ - [ ] Enable merchants to define products
62
+ - [ ] Add customer toolkit for buyers
63
+ - [ ] Support additional Nostr NIPs
64
+ - [ ] Add more agent interaction patterns
65
+
66
+ ## Installation
67
+
68
+ ```bash
69
+ # Create a new python environment
70
+ python3 -m venv ~/.venvs/aienv
71
+ source ~/.venvs/aienv/bin/activate
72
+
73
+ # Install agentstr
74
+ pip install --upgrade pip
75
+ pip install agentstr
76
+ ```
77
+
78
+ ## Examples
79
+
80
+ See our [examples directory](https://github.com/Synvya/agentstr/tree/main/examples/) for complete working implementations:
81
+
82
+ - [Basic CLI Agent](https://github.com/Synvya/agentstr/tree/main/examples/basic_cli/main.py) - A complete example showing:
83
+ - Setting up merchant profiles
84
+ - Creating stalls with shipping methods
85
+ - Defining products with shipping costs
86
+ - Configuring the agent with the merchant toolkit
87
+ - Running an interactive CLI application
88
+
89
+
90
+ ## Documentation
91
+
92
+ For more detailed documentation and examples, see [Docs](https://github.com/Synvya/agentstr/tree/main/docs/docs.md)
93
+
94
+ ## Development
95
+
96
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for:
97
+ - Development setup
98
+ - Testing instructions
99
+ - Contribution guidelines
100
+
101
+ ## License
102
+
103
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
104
+
105
+ ## Acknowledgments
106
+
107
+ - [Phidata](https://www.phidata.com) - For their AI agent framework
108
+ - [Rust-Nostr](https://rust-nostr.org) - For their Python Nostr SDK
109
+ - [Nostr Protocol](https://github.com/nostr-protocol/nips) - For the protocol specification
110
+
@@ -0,0 +1,88 @@
1
+ # AgentStr
2
+
3
+ AgentStr is an extension of [Phidata](https://www.phidata.com) AI agents that enables peer-to-peer agent communication using the Nostr protocol.
4
+
5
+ ## Overview
6
+
7
+ AgentStr allows AI agents operated by different organizations to communicate and collaborate. For example:
8
+ - Agent A from Company A can coordinate with Agent B from Company B to execute a transaction
9
+ - Agents can discover and interact with each other through the decentralized Nostr network
10
+ - No central authority or intermediary required
11
+
12
+ ## Project Structure
13
+
14
+ ```
15
+ agentstr/
16
+ ├── src/ # Source code
17
+ │ └── agentstr/
18
+ │ ├── __init__.py
19
+ │ ├── marketplace.py
20
+ │ └── nostr.py
21
+ ├── tests/ # Test files
22
+ ├── docs/ # Documentation
23
+ ├── examples/ # Example implementations
24
+ └── ...
25
+ ```
26
+
27
+ ## Features
28
+
29
+ ### Current Features
30
+ - Create Merchant agents with Nostr identities
31
+ - Publish and manage merchant products using [NIP-15](https://github.com/nostr-protocol/nips/blob/master/15.md) marketplace protocol
32
+ - Create merchant stalls to organize products
33
+ - Handle shipping zones and costs
34
+ - Secure communication using Nostr keys
35
+
36
+ ### Roadmap
37
+ - [ ] Create marketplace with stalls
38
+ - [ ] Create Buyer agents
39
+ - [ ] Enable merchants to define products
40
+ - [ ] Add customer toolkit for buyers
41
+ - [ ] Support additional Nostr NIPs
42
+ - [ ] Add more agent interaction patterns
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ # Create a new python environment
48
+ python3 -m venv ~/.venvs/aienv
49
+ source ~/.venvs/aienv/bin/activate
50
+
51
+ # Install agentstr
52
+ pip install --upgrade pip
53
+ pip install agentstr
54
+ ```
55
+
56
+ ## Examples
57
+
58
+ See our [examples directory](https://github.com/Synvya/agentstr/tree/main/examples/) for complete working implementations:
59
+
60
+ - [Basic CLI Agent](https://github.com/Synvya/agentstr/tree/main/examples/basic_cli/main.py) - A complete example showing:
61
+ - Setting up merchant profiles
62
+ - Creating stalls with shipping methods
63
+ - Defining products with shipping costs
64
+ - Configuring the agent with the merchant toolkit
65
+ - Running an interactive CLI application
66
+
67
+
68
+ ## Documentation
69
+
70
+ For more detailed documentation and examples, see [Docs](https://github.com/Synvya/agentstr/tree/main/docs/docs.md)
71
+
72
+ ## Development
73
+
74
+ See [CONTRIBUTING.md](CONTRIBUTING.md) for:
75
+ - Development setup
76
+ - Testing instructions
77
+ - Contribution guidelines
78
+
79
+ ## License
80
+
81
+ This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.
82
+
83
+ ## Acknowledgments
84
+
85
+ - [Phidata](https://www.phidata.com) - For their AI agent framework
86
+ - [Rust-Nostr](https://rust-nostr.org) - For their Python Nostr SDK
87
+ - [Nostr Protocol](https://github.com/nostr-protocol/nips) - For the protocol specification
88
+
@@ -0,0 +1,56 @@
1
+ [build-system]
2
+ requires = ["setuptools>=45", "wheel"]
3
+ build-backend = "setuptools.build_meta"
4
+
5
+ [project]
6
+ name = "agentstr"
7
+ version = "0.1.9"
8
+ description = "Nostr extension for Phidata AI agents"
9
+ readme = "README.md"
10
+ requires-python = ">=3.9, <3.13"
11
+ dependencies = [
12
+ "phidata>=2.7.0",
13
+ "openai>=1.50.0",
14
+ "packaging>=24.0",
15
+ "nostr-sdk>=0.38.0",
16
+ "pydantic>=2.0.0",
17
+ ]
18
+
19
+ [project.optional-dependencies]
20
+ dev = [
21
+ "pytest>=7.0",
22
+ "black>=23.0",
23
+ "isort>=5.0",
24
+ "mypy>=1.0",
25
+ "python-dotenv>=1.0",
26
+ ]
27
+
28
+ [project.urls]
29
+ Homepage = "https://github.com/synvya/agentstr"
30
+ Documentation = "https://github.com/synvya/agentstr#readme"
31
+ BugTracker = "https://github.com/synvya/agentstr/issues"
32
+
33
+ [tool.setuptools]
34
+ package-dir = {"" = "src"}
35
+ packages = ["agentstr"]
36
+
37
+ [tool.black]
38
+ line-length = 88
39
+ target-version = ['py39']
40
+ include = '\.pyi?$'
41
+ src = ["src", "tests", "examples"]
42
+
43
+ [tool.isort]
44
+ profile = "black"
45
+ src_paths = ["src", "tests", "examples"]
46
+ multi_line_output = 3
47
+
48
+ [tool.mypy]
49
+ python_version = "3.9"
50
+ warn_return_any = true
51
+ warn_unused_configs = true
52
+ mypy_path = "src"
53
+
54
+ [[tool.mypy.overrides]]
55
+ module = ["nostr_sdk.*"]
56
+ ignore_missing_imports = true
@@ -0,0 +1,30 @@
1
+ """
2
+ AgentStr: Nostr extension for Phidata AI agents
3
+ """
4
+
5
+ # Import main classes to make them available at package level
6
+ from .marketplace import (
7
+ Merchant,
8
+ MerchantProduct,
9
+ MerchantStall,
10
+ Profile,
11
+ ShippingCost,
12
+ ShippingMethod,
13
+ )
14
+
15
+ # Import version from pyproject.toml at runtime
16
+ try:
17
+ from importlib.metadata import version
18
+
19
+ __version__ = version("agentstr")
20
+ except Exception:
21
+ __version__ = "unknown"
22
+
23
+ __all__ = [
24
+ "Profile",
25
+ "Merchant",
26
+ "MerchantStall",
27
+ "MerchantProduct",
28
+ "ShippingMethod",
29
+ "ShippingCost",
30
+ ]