agentstr 0.0.5__tar.gz → 0.0.8__tar.gz
Sign up to get free protection for your applications and to get access to all the features.
- agentstr-0.0.8/PKG-INFO +92 -0
- agentstr-0.0.8/README.md +68 -0
- agentstr-0.0.8/agentstr/core.py +42 -0
- agentstr-0.0.8/agentstr.egg-info/PKG-INFO +92 -0
- {agentstr-0.0.5 → agentstr-0.0.8}/agentstr.egg-info/SOURCES.txt +1 -0
- agentstr-0.0.8/agentstr.egg-info/requires.txt +2 -0
- {agentstr-0.0.5 → agentstr-0.0.8}/pyproject.toml +4 -2
- {agentstr-0.0.5 → agentstr-0.0.8}/setup.py +4 -2
- agentstr-0.0.8/tests/test_core.py +17 -0
- agentstr-0.0.5/PKG-INFO +0 -21
- agentstr-0.0.5/README.md +0 -2
- agentstr-0.0.5/agentstr/core.py +0 -3
- agentstr-0.0.5/agentstr.egg-info/PKG-INFO +0 -21
- agentstr-0.0.5/tests/test_core.py +0 -8
- {agentstr-0.0.5 → agentstr-0.0.8}/LICENSE +0 -0
- {agentstr-0.0.5 → agentstr-0.0.8}/agentstr/__init__.py +0 -0
- {agentstr-0.0.5 → agentstr-0.0.8}/agentstr.egg-info/dependency_links.txt +0 -0
- {agentstr-0.0.5 → agentstr-0.0.8}/agentstr.egg-info/top_level.txt +0 -0
- {agentstr-0.0.5 → agentstr-0.0.8}/setup.cfg +0 -0
agentstr-0.0.8/PKG-INFO
ADDED
@@ -0,0 +1,92 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: agentstr
|
3
|
+
Version: 0.0.8
|
4
|
+
Summary: A library for collaborative AI agents
|
5
|
+
Home-page: https://github.com/synvya/agentstr
|
6
|
+
Author: Alejandro Gil
|
7
|
+
Author-email: Alejandro Gil <info@synvya.com>
|
8
|
+
License: MIT
|
9
|
+
Project-URL: Homepage, https://github.com/synvya/agentstr
|
10
|
+
Project-URL: Documentation, https://github.com/synvya/agentstr#readme
|
11
|
+
Project-URL: BugTracker, https://github.com/synvya/agentstr/issues
|
12
|
+
Keywords: AI,agents,collaboration,library
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
15
|
+
Classifier: Operating System :: OS Independent
|
16
|
+
Requires-Python: >=3.6
|
17
|
+
Description-Content-Type: text/markdown
|
18
|
+
License-File: LICENSE
|
19
|
+
Requires-Dist: phi>=2.7.0
|
20
|
+
Requires-Dist: openai>=1.50.0
|
21
|
+
Dynamic: author
|
22
|
+
Dynamic: home-page
|
23
|
+
Dynamic: requires-python
|
24
|
+
|
25
|
+
AgentStr
|
26
|
+
========
|
27
|
+
AgentStr is an extension of [Phidata](https://www.phidata.com) AI agents that allows for agents to communicate with other agents in separate computers using the Nostr communication protocol.
|
28
|
+
|
29
|
+
The goal is for Agent A operated by Company A to be able to work with Agent B operated by Company B to achieve a common goal. For example: Company A wants to buy a product sold by Company B so Agent A and Agent B can coordinate and execute the transaction.
|
30
|
+
|
31
|
+
# License
|
32
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
33
|
+
|
34
|
+
# Current status
|
35
|
+
The library is in its infancy.
|
36
|
+
|
37
|
+
Done:
|
38
|
+
- Workflow to package and distribute the library
|
39
|
+
- Create AgentStr as an extension of Phidata Agent
|
40
|
+
- Test the addition of new properties and capabilities for the AgentStr class
|
41
|
+
|
42
|
+
To be done:
|
43
|
+
- Incorporate Nostr capabilities
|
44
|
+
- Create unique public / private key identifiers for agent instances
|
45
|
+
- Send and retreive messages via Nostr
|
46
|
+
- Expose capabilities via Nostr
|
47
|
+
- Agent B retrieves capabilities exposed by Agent A
|
48
|
+
- Agent B coordinates transaction with Agent A
|
49
|
+
|
50
|
+
# Installation
|
51
|
+
AgentStr is offered as a python library available at https://pypi.org/project/agentstr/.
|
52
|
+
|
53
|
+
Here is an example on how to use the library:
|
54
|
+
|
55
|
+
1. Create a new python environment for your app
|
56
|
+
```
|
57
|
+
cd ~/
|
58
|
+
python3 -m venv mysampleapp
|
59
|
+
source mysampleapp/bin/acticate
|
60
|
+
```
|
61
|
+
2. Install the agentstr library
|
62
|
+
```
|
63
|
+
cd ~/mysampleapp
|
64
|
+
pip install agentstr
|
65
|
+
```
|
66
|
+
3. Create a new python file
|
67
|
+
```
|
68
|
+
touch main.py
|
69
|
+
```
|
70
|
+
4. Copy paste this code to the main.py file
|
71
|
+
```
|
72
|
+
from agentstr.core import AgentStr
|
73
|
+
# Create the agent
|
74
|
+
agent = AgentStr("Synvya Inc", "Seller")
|
75
|
+
|
76
|
+
# Test AgentStr new capabilities
|
77
|
+
print(f"Public key: {agent.get_public_key()}\nPrivate key: {agent.get_private_key()}")
|
78
|
+
print(f"Company: {agent.get_company()}\nRole: {agent.get_role()}")
|
79
|
+
|
80
|
+
# Test phidata inherited capabilities
|
81
|
+
agent.print_response("Write two sentence poem for the love between the sun and the moon.")
|
82
|
+
```
|
83
|
+
5. Run the code
|
84
|
+
```
|
85
|
+
~/mysampleapp/bin/python main.py
|
86
|
+
```
|
87
|
+
|
88
|
+
# Contributing
|
89
|
+
Refer to [CONTRIBUTING.md](CONTRIBUTING.md) for specific instructions on installation instructions for developers and how to contribute.
|
90
|
+
|
91
|
+
# Acknowledgments
|
92
|
+
- [Phidata](https://www.phidata.com/.com/) - For building robust AI agents.
|
agentstr-0.0.8/README.md
ADDED
@@ -0,0 +1,68 @@
|
|
1
|
+
AgentStr
|
2
|
+
========
|
3
|
+
AgentStr is an extension of [Phidata](https://www.phidata.com) AI agents that allows for agents to communicate with other agents in separate computers using the Nostr communication protocol.
|
4
|
+
|
5
|
+
The goal is for Agent A operated by Company A to be able to work with Agent B operated by Company B to achieve a common goal. For example: Company A wants to buy a product sold by Company B so Agent A and Agent B can coordinate and execute the transaction.
|
6
|
+
|
7
|
+
# License
|
8
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
9
|
+
|
10
|
+
# Current status
|
11
|
+
The library is in its infancy.
|
12
|
+
|
13
|
+
Done:
|
14
|
+
- Workflow to package and distribute the library
|
15
|
+
- Create AgentStr as an extension of Phidata Agent
|
16
|
+
- Test the addition of new properties and capabilities for the AgentStr class
|
17
|
+
|
18
|
+
To be done:
|
19
|
+
- Incorporate Nostr capabilities
|
20
|
+
- Create unique public / private key identifiers for agent instances
|
21
|
+
- Send and retreive messages via Nostr
|
22
|
+
- Expose capabilities via Nostr
|
23
|
+
- Agent B retrieves capabilities exposed by Agent A
|
24
|
+
- Agent B coordinates transaction with Agent A
|
25
|
+
|
26
|
+
# Installation
|
27
|
+
AgentStr is offered as a python library available at https://pypi.org/project/agentstr/.
|
28
|
+
|
29
|
+
Here is an example on how to use the library:
|
30
|
+
|
31
|
+
1. Create a new python environment for your app
|
32
|
+
```
|
33
|
+
cd ~/
|
34
|
+
python3 -m venv mysampleapp
|
35
|
+
source mysampleapp/bin/acticate
|
36
|
+
```
|
37
|
+
2. Install the agentstr library
|
38
|
+
```
|
39
|
+
cd ~/mysampleapp
|
40
|
+
pip install agentstr
|
41
|
+
```
|
42
|
+
3. Create a new python file
|
43
|
+
```
|
44
|
+
touch main.py
|
45
|
+
```
|
46
|
+
4. Copy paste this code to the main.py file
|
47
|
+
```
|
48
|
+
from agentstr.core import AgentStr
|
49
|
+
# Create the agent
|
50
|
+
agent = AgentStr("Synvya Inc", "Seller")
|
51
|
+
|
52
|
+
# Test AgentStr new capabilities
|
53
|
+
print(f"Public key: {agent.get_public_key()}\nPrivate key: {agent.get_private_key()}")
|
54
|
+
print(f"Company: {agent.get_company()}\nRole: {agent.get_role()}")
|
55
|
+
|
56
|
+
# Test phidata inherited capabilities
|
57
|
+
agent.print_response("Write two sentence poem for the love between the sun and the moon.")
|
58
|
+
```
|
59
|
+
5. Run the code
|
60
|
+
```
|
61
|
+
~/mysampleapp/bin/python main.py
|
62
|
+
```
|
63
|
+
|
64
|
+
# Contributing
|
65
|
+
Refer to [CONTRIBUTING.md](CONTRIBUTING.md) for specific instructions on installation instructions for developers and how to contribute.
|
66
|
+
|
67
|
+
# Acknowledgments
|
68
|
+
- [Phidata](https://www.phidata.com/.com/) - For building robust AI agents.
|
@@ -0,0 +1,42 @@
|
|
1
|
+
from phi.agent import Agent
|
2
|
+
from phi.model.openai import OpenAIChat
|
3
|
+
from pydantic import Field
|
4
|
+
from typing import Optional
|
5
|
+
|
6
|
+
|
7
|
+
class AgentStr(Agent):
|
8
|
+
|
9
|
+
# -*- Agent settings
|
10
|
+
# Company operating the agent.
|
11
|
+
# Used as seed for public / private key identifier together with the agent role
|
12
|
+
company: str = None
|
13
|
+
|
14
|
+
# -*- Agent public / private key identifiers
|
15
|
+
# The public / private key should be deterministic for a given 'company' and 'role' combination
|
16
|
+
# Public key for the agent
|
17
|
+
npub: str = None
|
18
|
+
# Private key for the agent
|
19
|
+
nsec: str = None
|
20
|
+
|
21
|
+
# Call the parent class (Agent) constructor
|
22
|
+
def __init__(self, company: str, role: str):
|
23
|
+
super().__init__(role = role, model=OpenAIChat(id="gpt-4o"))
|
24
|
+
self.company = company
|
25
|
+
self.npub = f"npub - {self.company} - {self.role}"
|
26
|
+
self.nsec = f"nsec - {self.company} - {self.role}"
|
27
|
+
|
28
|
+
def get_public_key(self) -> str:
|
29
|
+
return self.npub
|
30
|
+
|
31
|
+
def get_private_key(self) -> str:
|
32
|
+
return self.nsec
|
33
|
+
|
34
|
+
def get_company(self) -> str:
|
35
|
+
return self.company
|
36
|
+
|
37
|
+
def get_role(self) -> str:
|
38
|
+
return self.role
|
39
|
+
|
40
|
+
def add(a, b):
|
41
|
+
"""Add two numbers."""
|
42
|
+
return a + b
|
@@ -0,0 +1,92 @@
|
|
1
|
+
Metadata-Version: 2.2
|
2
|
+
Name: agentstr
|
3
|
+
Version: 0.0.8
|
4
|
+
Summary: A library for collaborative AI agents
|
5
|
+
Home-page: https://github.com/synvya/agentstr
|
6
|
+
Author: Alejandro Gil
|
7
|
+
Author-email: Alejandro Gil <info@synvya.com>
|
8
|
+
License: MIT
|
9
|
+
Project-URL: Homepage, https://github.com/synvya/agentstr
|
10
|
+
Project-URL: Documentation, https://github.com/synvya/agentstr#readme
|
11
|
+
Project-URL: BugTracker, https://github.com/synvya/agentstr/issues
|
12
|
+
Keywords: AI,agents,collaboration,library
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
14
|
+
Classifier: License :: OSI Approved :: MIT License
|
15
|
+
Classifier: Operating System :: OS Independent
|
16
|
+
Requires-Python: >=3.6
|
17
|
+
Description-Content-Type: text/markdown
|
18
|
+
License-File: LICENSE
|
19
|
+
Requires-Dist: phi>=2.7.0
|
20
|
+
Requires-Dist: openai>=1.50.0
|
21
|
+
Dynamic: author
|
22
|
+
Dynamic: home-page
|
23
|
+
Dynamic: requires-python
|
24
|
+
|
25
|
+
AgentStr
|
26
|
+
========
|
27
|
+
AgentStr is an extension of [Phidata](https://www.phidata.com) AI agents that allows for agents to communicate with other agents in separate computers using the Nostr communication protocol.
|
28
|
+
|
29
|
+
The goal is for Agent A operated by Company A to be able to work with Agent B operated by Company B to achieve a common goal. For example: Company A wants to buy a product sold by Company B so Agent A and Agent B can coordinate and execute the transaction.
|
30
|
+
|
31
|
+
# License
|
32
|
+
This project is licensed under the MIT License. See the [LICENSE](LICENSE) file for details.
|
33
|
+
|
34
|
+
# Current status
|
35
|
+
The library is in its infancy.
|
36
|
+
|
37
|
+
Done:
|
38
|
+
- Workflow to package and distribute the library
|
39
|
+
- Create AgentStr as an extension of Phidata Agent
|
40
|
+
- Test the addition of new properties and capabilities for the AgentStr class
|
41
|
+
|
42
|
+
To be done:
|
43
|
+
- Incorporate Nostr capabilities
|
44
|
+
- Create unique public / private key identifiers for agent instances
|
45
|
+
- Send and retreive messages via Nostr
|
46
|
+
- Expose capabilities via Nostr
|
47
|
+
- Agent B retrieves capabilities exposed by Agent A
|
48
|
+
- Agent B coordinates transaction with Agent A
|
49
|
+
|
50
|
+
# Installation
|
51
|
+
AgentStr is offered as a python library available at https://pypi.org/project/agentstr/.
|
52
|
+
|
53
|
+
Here is an example on how to use the library:
|
54
|
+
|
55
|
+
1. Create a new python environment for your app
|
56
|
+
```
|
57
|
+
cd ~/
|
58
|
+
python3 -m venv mysampleapp
|
59
|
+
source mysampleapp/bin/acticate
|
60
|
+
```
|
61
|
+
2. Install the agentstr library
|
62
|
+
```
|
63
|
+
cd ~/mysampleapp
|
64
|
+
pip install agentstr
|
65
|
+
```
|
66
|
+
3. Create a new python file
|
67
|
+
```
|
68
|
+
touch main.py
|
69
|
+
```
|
70
|
+
4. Copy paste this code to the main.py file
|
71
|
+
```
|
72
|
+
from agentstr.core import AgentStr
|
73
|
+
# Create the agent
|
74
|
+
agent = AgentStr("Synvya Inc", "Seller")
|
75
|
+
|
76
|
+
# Test AgentStr new capabilities
|
77
|
+
print(f"Public key: {agent.get_public_key()}\nPrivate key: {agent.get_private_key()}")
|
78
|
+
print(f"Company: {agent.get_company()}\nRole: {agent.get_role()}")
|
79
|
+
|
80
|
+
# Test phidata inherited capabilities
|
81
|
+
agent.print_response("Write two sentence poem for the love between the sun and the moon.")
|
82
|
+
```
|
83
|
+
5. Run the code
|
84
|
+
```
|
85
|
+
~/mysampleapp/bin/python main.py
|
86
|
+
```
|
87
|
+
|
88
|
+
# Contributing
|
89
|
+
Refer to [CONTRIBUTING.md](CONTRIBUTING.md) for specific instructions on installation instructions for developers and how to contribute.
|
90
|
+
|
91
|
+
# Acknowledgments
|
92
|
+
- [Phidata](https://www.phidata.com/.com/) - For building robust AI agents.
|
@@ -4,7 +4,7 @@ build-backend = "setuptools.build_meta" # Backend used for the build process
|
|
4
4
|
|
5
5
|
[project]
|
6
6
|
name = "agentstr"
|
7
|
-
version = "0.0.
|
7
|
+
version = "0.0.8"
|
8
8
|
description = "A library for collaborative AI agents"
|
9
9
|
requires-python = ">=3.6"
|
10
10
|
readme = "README.md"
|
@@ -18,7 +18,9 @@ classifiers = [
|
|
18
18
|
"License :: OSI Approved :: MIT License",
|
19
19
|
"Operating System :: OS Independent"
|
20
20
|
]
|
21
|
-
dependencies = [
|
21
|
+
dependencies = [
|
22
|
+
"phi>=2.7.0", "openai>=1.50.0"
|
23
|
+
]
|
22
24
|
|
23
25
|
[project.urls]
|
24
26
|
Homepage = "https://github.com/synvya/agentstr"
|
@@ -2,14 +2,16 @@ from setuptools import setup, find_packages
|
|
2
2
|
|
3
3
|
setup(
|
4
4
|
name="agentstr",
|
5
|
-
version="0.0.
|
5
|
+
version="0.0.8",
|
6
6
|
author="Alejandro Gil",
|
7
7
|
description="A library for collaborative AI agents",
|
8
8
|
long_description=open("README.md").read(),
|
9
9
|
long_description_content_type="text/markdown",
|
10
10
|
url="https://github.com/synvya/agentstr",
|
11
11
|
packages=find_packages(where="."),
|
12
|
-
install_requires=[
|
12
|
+
install_requires=[
|
13
|
+
"phi>=2.7.0", "openai>=1.50.0"
|
14
|
+
],
|
13
15
|
classifiers=[
|
14
16
|
"Programming Language :: Python :: 3",
|
15
17
|
"License :: OSI Approved :: MIT License",
|
@@ -0,0 +1,17 @@
|
|
1
|
+
import unittest
|
2
|
+
import agentstr
|
3
|
+
|
4
|
+
from agentstr.core import add, AgentStr
|
5
|
+
from phi.model.openai import OpenAIChat
|
6
|
+
from dotenv import load_dotenv
|
7
|
+
|
8
|
+
load_dotenv()
|
9
|
+
|
10
|
+
def test_get_public_key():
|
11
|
+
agent = AgentStr(company="Synvya AI", role="Seller")
|
12
|
+
public_key = agent.get_public_key()
|
13
|
+
assert public_key == "npub - Synvya AI - Seller"
|
14
|
+
|
15
|
+
def test_add():
|
16
|
+
assert add(2, 3) == 5
|
17
|
+
|
agentstr-0.0.5/PKG-INFO
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: agentstr
|
3
|
-
Version: 0.0.5
|
4
|
-
Summary: A library for collaborative AI agents
|
5
|
-
Home-page: https://github.com/synvya/agentstr
|
6
|
-
Author: Alejandro Gil
|
7
|
-
Author-email: Alejandro Gil <info@synvya.com>
|
8
|
-
License: MIT
|
9
|
-
Project-URL: Homepage, https://github.com/synvya/agentstr
|
10
|
-
Project-URL: Documentation, https://github.com/synvya/agentstr#readme
|
11
|
-
Project-URL: BugTracker, https://github.com/synvya/agentstr/issues
|
12
|
-
Keywords: AI,agents,collaboration,library
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
15
|
-
Classifier: Operating System :: OS Independent
|
16
|
-
Requires-Python: >=3.6
|
17
|
-
Description-Content-Type: text/markdown
|
18
|
-
License-File: LICENSE
|
19
|
-
|
20
|
-
# agentstr
|
21
|
-
Nostr based communication library for agents
|
agentstr-0.0.5/README.md
DELETED
agentstr-0.0.5/agentstr/core.py
DELETED
@@ -1,21 +0,0 @@
|
|
1
|
-
Metadata-Version: 2.1
|
2
|
-
Name: agentstr
|
3
|
-
Version: 0.0.5
|
4
|
-
Summary: A library for collaborative AI agents
|
5
|
-
Home-page: https://github.com/synvya/agentstr
|
6
|
-
Author: Alejandro Gil
|
7
|
-
Author-email: Alejandro Gil <info@synvya.com>
|
8
|
-
License: MIT
|
9
|
-
Project-URL: Homepage, https://github.com/synvya/agentstr
|
10
|
-
Project-URL: Documentation, https://github.com/synvya/agentstr#readme
|
11
|
-
Project-URL: BugTracker, https://github.com/synvya/agentstr/issues
|
12
|
-
Keywords: AI,agents,collaboration,library
|
13
|
-
Classifier: Programming Language :: Python :: 3
|
14
|
-
Classifier: License :: OSI Approved :: MIT License
|
15
|
-
Classifier: Operating System :: OS Independent
|
16
|
-
Requires-Python: >=3.6
|
17
|
-
Description-Content-Type: text/markdown
|
18
|
-
License-File: LICENSE
|
19
|
-
|
20
|
-
# agentstr
|
21
|
-
Nostr based communication library for agents
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|