priostack 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.
- priostack-0.1.0/LICENSE +21 -0
- priostack-0.1.0/PKG-INFO +113 -0
- priostack-0.1.0/README.md +86 -0
- priostack-0.1.0/examples/cursor_config.json +12 -0
- priostack-0.1.0/examples/quickstart.py +29 -0
- priostack-0.1.0/pyproject.toml +48 -0
- priostack-0.1.0/src/priostack/__init__.py +4 -0
- priostack-0.1.0/src/priostack/client.py +59 -0
priostack-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 Ideaswave
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
priostack-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,113 @@
|
|
|
1
|
+
Metadata-Version: 2.5
|
|
2
|
+
Name: priostack
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Python SDK and MCP interface for Priostack Agent Context Network (ACN).
|
|
5
|
+
Project-URL: Homepage, https://priostack.com
|
|
6
|
+
Project-URL: Documentation, https://priostack.com/acn
|
|
7
|
+
Project-URL: Repository, https://github.com/ideaswave/priostack
|
|
8
|
+
Project-URL: Issues, https://github.com/ideaswave/priostack/issues
|
|
9
|
+
Author-email: Ideaswave <contact@ideaswave.com>
|
|
10
|
+
License: MIT
|
|
11
|
+
License-File: LICENSE
|
|
12
|
+
Keywords: agent-memory,ai-agents,context-management,llm,mcp,model-context-protocol,priostack
|
|
13
|
+
Classifier: Development Status :: 4 - Beta
|
|
14
|
+
Classifier: Intended Audience :: Developers
|
|
15
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
16
|
+
Classifier: Programming Language :: Python :: 3
|
|
17
|
+
Classifier: Programming Language :: Python :: 3.8
|
|
18
|
+
Classifier: Programming Language :: Python :: 3.9
|
|
19
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
20
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
21
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
22
|
+
Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
|
|
23
|
+
Classifier: Topic :: Software Development :: Libraries :: Python Modules
|
|
24
|
+
Requires-Python: >=3.8
|
|
25
|
+
Requires-Dist: requests>=2.28.0
|
|
26
|
+
Description-Content-Type: text/markdown
|
|
27
|
+
|
|
28
|
+
# ⚡ Priostack Agent Context Network (ACN)
|
|
29
|
+
|
|
30
|
+
> **Zero-setup, autonomous memory orchestration for AI Agents via MCP.**
|
|
31
|
+
|
|
32
|
+
[](https://pypi.org/project/priostack/)
|
|
33
|
+
[](https://opensource.org/licenses/MIT)
|
|
34
|
+
|
|
35
|
+
Priostack ACN provides AI agents with persistent long-term memory, isolated space context, and execution-state management. Powered by the **Model Context Protocol (MCP)** over JSON-RPC.
|
|
36
|
+
|
|
37
|
+
---
|
|
38
|
+
|
|
39
|
+
## 🔥 Features
|
|
40
|
+
|
|
41
|
+
- 🤖 **Zero-Setup Agent Onboarding**: Agents register themselves via API without dashboards or credit cards.
|
|
42
|
+
- 🧠 **Structured Context Spaces**: Isolate memories, rules, and state across different agent executions.
|
|
43
|
+
- 🔌 **Native MCP Protocol**: Seamlessly hooks into Claude Desktop, Cursor, LangChain, CrewAI, and LlamaIndex.
|
|
44
|
+
- ⚡ **Sub-10ms Context Injection**: Pure JSON-RPC API endpoint for maximum execution speed.
|
|
45
|
+
|
|
46
|
+
---
|
|
47
|
+
|
|
48
|
+
## 🚀 Quickstart (Python)
|
|
49
|
+
|
|
50
|
+
### 1. Installation
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
pip install priostack
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
### 2. Connect Your Agent in 4 Lines
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from priostack import ACNClient
|
|
60
|
+
|
|
61
|
+
# Initialize Client
|
|
62
|
+
acn = ACNClient()
|
|
63
|
+
|
|
64
|
+
# Self-register agent & retrieve ACN Token
|
|
65
|
+
token = acn.register(display_name="my-first-agent")
|
|
66
|
+
|
|
67
|
+
# Connect session
|
|
68
|
+
session_id = acn.connect(token=token)
|
|
69
|
+
|
|
70
|
+
# Store persistent context
|
|
71
|
+
acn.create_space(display_name="global-memory")
|
|
72
|
+
acn.store(space_id="global-memory", content="Agent state initialized.", object_type="declaration")
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
---
|
|
76
|
+
|
|
77
|
+
## 🛠️ MCP Integration (Cursor / Claude Desktop)
|
|
78
|
+
|
|
79
|
+
Add Priostack ACN directly to your `mcpServers` config:
|
|
80
|
+
|
|
81
|
+
```json
|
|
82
|
+
{
|
|
83
|
+
"mcpServers": {
|
|
84
|
+
"priostack-acn": {
|
|
85
|
+
"command": "npx",
|
|
86
|
+
"args": [
|
|
87
|
+
"-y",
|
|
88
|
+
"@modelcontextprotocol/server-fetch",
|
|
89
|
+
"https://priostack.com/acn/rpc"
|
|
90
|
+
]
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
```
|
|
95
|
+
|
|
96
|
+
---
|
|
97
|
+
|
|
98
|
+
## 📖 API Reference (JSON-RPC)
|
|
99
|
+
|
|
100
|
+
All interactions are routed through `https://priostack.com/acn/rpc`:
|
|
101
|
+
|
|
102
|
+
| Method | Description | Primary Arguments |
|
|
103
|
+
| :--- | :--- | :--- |
|
|
104
|
+
| `noetic.register` | Registers a new agent autonomously | `displayName` |
|
|
105
|
+
| `noetic.connect` | Creates an active session for an agent | `token`, `maxResponseTokens` |
|
|
106
|
+
| `noetic.create_space` | Instantiates a memory partition | `sessionId`, `displayName` |
|
|
107
|
+
| `noetic.store` | Persists a memory object | `sessionId`, `space`, `objects` |
|
|
108
|
+
|
|
109
|
+
---
|
|
110
|
+
|
|
111
|
+
## 📄 License
|
|
112
|
+
|
|
113
|
+
Distributed under the MIT License.
|
|
@@ -0,0 +1,86 @@
|
|
|
1
|
+
# ⚡ Priostack Agent Context Network (ACN)
|
|
2
|
+
|
|
3
|
+
> **Zero-setup, autonomous memory orchestration for AI Agents via MCP.**
|
|
4
|
+
|
|
5
|
+
[](https://pypi.org/project/priostack/)
|
|
6
|
+
[](https://opensource.org/licenses/MIT)
|
|
7
|
+
|
|
8
|
+
Priostack ACN provides AI agents with persistent long-term memory, isolated space context, and execution-state management. Powered by the **Model Context Protocol (MCP)** over JSON-RPC.
|
|
9
|
+
|
|
10
|
+
---
|
|
11
|
+
|
|
12
|
+
## 🔥 Features
|
|
13
|
+
|
|
14
|
+
- 🤖 **Zero-Setup Agent Onboarding**: Agents register themselves via API without dashboards or credit cards.
|
|
15
|
+
- 🧠 **Structured Context Spaces**: Isolate memories, rules, and state across different agent executions.
|
|
16
|
+
- 🔌 **Native MCP Protocol**: Seamlessly hooks into Claude Desktop, Cursor, LangChain, CrewAI, and LlamaIndex.
|
|
17
|
+
- ⚡ **Sub-10ms Context Injection**: Pure JSON-RPC API endpoint for maximum execution speed.
|
|
18
|
+
|
|
19
|
+
---
|
|
20
|
+
|
|
21
|
+
## 🚀 Quickstart (Python)
|
|
22
|
+
|
|
23
|
+
### 1. Installation
|
|
24
|
+
|
|
25
|
+
```bash
|
|
26
|
+
pip install priostack
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
### 2. Connect Your Agent in 4 Lines
|
|
30
|
+
|
|
31
|
+
```python
|
|
32
|
+
from priostack import ACNClient
|
|
33
|
+
|
|
34
|
+
# Initialize Client
|
|
35
|
+
acn = ACNClient()
|
|
36
|
+
|
|
37
|
+
# Self-register agent & retrieve ACN Token
|
|
38
|
+
token = acn.register(display_name="my-first-agent")
|
|
39
|
+
|
|
40
|
+
# Connect session
|
|
41
|
+
session_id = acn.connect(token=token)
|
|
42
|
+
|
|
43
|
+
# Store persistent context
|
|
44
|
+
acn.create_space(display_name="global-memory")
|
|
45
|
+
acn.store(space_id="global-memory", content="Agent state initialized.", object_type="declaration")
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## 🛠️ MCP Integration (Cursor / Claude Desktop)
|
|
51
|
+
|
|
52
|
+
Add Priostack ACN directly to your `mcpServers` config:
|
|
53
|
+
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"mcpServers": {
|
|
57
|
+
"priostack-acn": {
|
|
58
|
+
"command": "npx",
|
|
59
|
+
"args": [
|
|
60
|
+
"-y",
|
|
61
|
+
"@modelcontextprotocol/server-fetch",
|
|
62
|
+
"https://priostack.com/acn/rpc"
|
|
63
|
+
]
|
|
64
|
+
}
|
|
65
|
+
}
|
|
66
|
+
}
|
|
67
|
+
```
|
|
68
|
+
|
|
69
|
+
---
|
|
70
|
+
|
|
71
|
+
## 📖 API Reference (JSON-RPC)
|
|
72
|
+
|
|
73
|
+
All interactions are routed through `https://priostack.com/acn/rpc`:
|
|
74
|
+
|
|
75
|
+
| Method | Description | Primary Arguments |
|
|
76
|
+
| :--- | :--- | :--- |
|
|
77
|
+
| `noetic.register` | Registers a new agent autonomously | `displayName` |
|
|
78
|
+
| `noetic.connect` | Creates an active session for an agent | `token`, `maxResponseTokens` |
|
|
79
|
+
| `noetic.create_space` | Instantiates a memory partition | `sessionId`, `displayName` |
|
|
80
|
+
| `noetic.store` | Persists a memory object | `sessionId`, `space`, `objects` |
|
|
81
|
+
|
|
82
|
+
---
|
|
83
|
+
|
|
84
|
+
## 📄 License
|
|
85
|
+
|
|
86
|
+
Distributed under the MIT License.
|
|
@@ -0,0 +1,29 @@
|
|
|
1
|
+
from priostack.client import ACNClient
|
|
2
|
+
|
|
3
|
+
def main():
|
|
4
|
+
# 1. Initialisation
|
|
5
|
+
acn = ACNClient()
|
|
6
|
+
|
|
7
|
+
# 2. Autonomously Register Agent (No API Key Required)
|
|
8
|
+
print("1. Enregistrement de l'agent...")
|
|
9
|
+
acn_key = acn.register(display_name="my-ai-agent")
|
|
10
|
+
print(f"Clé ACN obtenue : {acn_key}")
|
|
11
|
+
|
|
12
|
+
# 3. Connexion & Obtention du Session ID
|
|
13
|
+
session_id = acn.connect(token=acn_key)
|
|
14
|
+
print(f"Session ID actif : {session_id}")
|
|
15
|
+
|
|
16
|
+
# 4. Création d'un espace de mémoire
|
|
17
|
+
space = acn.create_space(display_name="prod-agent-memory")
|
|
18
|
+
print(f"Espace de mémoire créé : {space}")
|
|
19
|
+
|
|
20
|
+
# 5. Stockage d'une règle ou observation
|
|
21
|
+
acn.store(
|
|
22
|
+
space_id="prod-agent-memory",
|
|
23
|
+
content="L'utilisateur a validé le workflow d'exécution numéro #402.",
|
|
24
|
+
object_type="declaration"
|
|
25
|
+
)
|
|
26
|
+
print("Mémoire stockée avec succès sur Priostack ACN !")
|
|
27
|
+
|
|
28
|
+
if __name__ == "__main__":
|
|
29
|
+
main()
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
[build-system]
|
|
2
|
+
requires = ["hatchling"]
|
|
3
|
+
build-backend = "hatchling.build"
|
|
4
|
+
|
|
5
|
+
[project]
|
|
6
|
+
name = "priostack"
|
|
7
|
+
version = "0.1.0"
|
|
8
|
+
description = "Python SDK and MCP interface for Priostack Agent Context Network (ACN)."
|
|
9
|
+
readme = "README.md"
|
|
10
|
+
requires-python = ">=3.8"
|
|
11
|
+
license = { text = "MIT" }
|
|
12
|
+
authors = [
|
|
13
|
+
{ name = "Ideaswave", email = "contact@ideaswave.com" }
|
|
14
|
+
]
|
|
15
|
+
keywords = [
|
|
16
|
+
"mcp",
|
|
17
|
+
"model-context-protocol",
|
|
18
|
+
"ai-agents",
|
|
19
|
+
"agent-memory",
|
|
20
|
+
"priostack",
|
|
21
|
+
"llm",
|
|
22
|
+
"context-management"
|
|
23
|
+
]
|
|
24
|
+
classifiers = [
|
|
25
|
+
"Development Status :: 4 - Beta",
|
|
26
|
+
"Intended Audience :: Developers",
|
|
27
|
+
"License :: OSI Approved :: MIT License",
|
|
28
|
+
"Programming Language :: Python :: 3",
|
|
29
|
+
"Programming Language :: Python :: 3.8",
|
|
30
|
+
"Programming Language :: Python :: 3.9",
|
|
31
|
+
"Programming Language :: Python :: 3.10",
|
|
32
|
+
"Programming Language :: Python :: 3.11",
|
|
33
|
+
"Programming Language :: Python :: 3.12",
|
|
34
|
+
"Topic :: Software Development :: Libraries :: Python Modules",
|
|
35
|
+
"Topic :: Scientific/Engineering :: Artificial Intelligence",
|
|
36
|
+
]
|
|
37
|
+
dependencies = [
|
|
38
|
+
"requests>=2.28.0",
|
|
39
|
+
]
|
|
40
|
+
|
|
41
|
+
[project.urls]
|
|
42
|
+
Homepage = "https://priostack.com"
|
|
43
|
+
Documentation = "https://priostack.com/acn"
|
|
44
|
+
Repository = "https://github.com/ideaswave/priostack"
|
|
45
|
+
Issues = "https://github.com/ideaswave/priostack/issues"
|
|
46
|
+
|
|
47
|
+
[tool.hatch.build.targets.wheel]
|
|
48
|
+
packages = ["src/priostack"]
|
|
@@ -0,0 +1,59 @@
|
|
|
1
|
+
import requests
|
|
2
|
+
from typing import Dict, Any, List, Optional
|
|
3
|
+
|
|
4
|
+
class ACNClient:
|
|
5
|
+
"""Client Python léger pour Priostack Agent Context Network (ACN)."""
|
|
6
|
+
|
|
7
|
+
def __init__(self, endpoint: str = "https://priostack.com/acn/rpc"):
|
|
8
|
+
self.endpoint = endpoint
|
|
9
|
+
self.session_id: Optional[str] = None
|
|
10
|
+
|
|
11
|
+
def _rpc_call(self, method_name: str, arguments: Dict[str, Any]) -> Dict[str, Any]:
|
|
12
|
+
payload = {
|
|
13
|
+
"jsonrpc": "2.0",
|
|
14
|
+
"id": 1,
|
|
15
|
+
"method": "tools/call",
|
|
16
|
+
"params": {
|
|
17
|
+
"name": method_name,
|
|
18
|
+
"arguments": arguments
|
|
19
|
+
}
|
|
20
|
+
}
|
|
21
|
+
response = requests.post(self.endpoint, json=payload)
|
|
22
|
+
response.raise_for_status()
|
|
23
|
+
res_data = response.json()
|
|
24
|
+
if "error" in res_data:
|
|
25
|
+
raise Exception(f"ACN Error: {res_data['error']}")
|
|
26
|
+
return res_data.get("result", {})
|
|
27
|
+
|
|
28
|
+
def register(self, display_name: str) -> str:
|
|
29
|
+
"""Enregistre l'agent de manière autonome et retourne la clé ACN."""
|
|
30
|
+
result = self._rpc_call("noetic.register", {"displayName": display_name})
|
|
31
|
+
return result.get("token") or result.get("content", [{}])[0].get("text")
|
|
32
|
+
|
|
33
|
+
def connect(self, token: str, max_tokens: int = 4096) -> str:
|
|
34
|
+
"""Connecte l'agent et obtient un sessionId pour les opérations de mémoire."""
|
|
35
|
+
result = self._rpc_call("noetic.connect", {
|
|
36
|
+
"token": token,
|
|
37
|
+
"maxResponseTokens": max_tokens
|
|
38
|
+
})
|
|
39
|
+
self.session_id = result.get("sessionId")
|
|
40
|
+
return self.session_id
|
|
41
|
+
|
|
42
|
+
def create_space(self, display_name: str) -> str:
|
|
43
|
+
"""Crée un espace de mémoire étanche."""
|
|
44
|
+
if not self.session_id:
|
|
45
|
+
raise ValueError("Vous devez appeler connect() avant de créer un espace.")
|
|
46
|
+
return self._rpc_call("noetic.create_space", {
|
|
47
|
+
"sessionId": self.session_id,
|
|
48
|
+
"displayName": display_name
|
|
49
|
+
})
|
|
50
|
+
|
|
51
|
+
def store(self, space_id: str, content: str, object_type: str = "declaration") -> Dict[str, Any]:
|
|
52
|
+
"""Stocke une mémoire (observation ou déclaration) dans un espace."""
|
|
53
|
+
if not self.session_id:
|
|
54
|
+
raise ValueError("Vous devez appeler connect() avant de stocker du contexte.")
|
|
55
|
+
return self._rpc_call("noetic.store", {
|
|
56
|
+
"sessionId": self.session_id,
|
|
57
|
+
"space": space_id,
|
|
58
|
+
"objects": [{"content": content, "type": object_type}]
|
|
59
|
+
})
|