agentic-fabriq-sdk 0.1.5__tar.gz → 0.1.29__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.
- agentic_fabriq_sdk-0.1.29/PKG-INFO +148 -0
- agentic_fabriq_sdk-0.1.29/README.md +111 -0
- agentic_fabriq_sdk-0.1.29/af_cli/__init__.py +17 -0
- agentic_fabriq_sdk-0.1.29/af_cli/commands/__init__.py +3 -0
- agentic_fabriq_sdk-0.1.29/af_cli/commands/applications.py +453 -0
- agentic_fabriq_sdk-0.1.29/af_cli/commands/auth.py +413 -0
- agentic_fabriq_sdk-0.1.29/af_cli/commands/config.py +132 -0
- agentic_fabriq_sdk-0.1.29/af_cli/commands/tools.py +809 -0
- agentic_fabriq_sdk-0.1.29/af_cli/core/__init__.py +3 -0
- agentic_fabriq_sdk-0.1.29/af_cli/core/client.py +161 -0
- agentic_fabriq_sdk-0.1.29/af_cli/core/config.py +225 -0
- agentic_fabriq_sdk-0.1.29/af_cli/core/oauth.py +506 -0
- agentic_fabriq_sdk-0.1.29/af_cli/core/output.py +180 -0
- agentic_fabriq_sdk-0.1.29/af_cli/core/token_storage.py +266 -0
- agentic_fabriq_sdk-0.1.29/af_cli/main.py +176 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/__init__.py +21 -4
- agentic_fabriq_sdk-0.1.29/af_sdk/audit_events.py +321 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/auth/__init__.py +22 -0
- agentic_fabriq_sdk-0.1.29/af_sdk/auth/applications.py +592 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/auth/oauth.py +3 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/connectors/__init__.py +0 -2
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/connectors/base.py +9 -42
- agentic_fabriq_sdk-0.1.29/af_sdk/dx/__init__.py +9 -0
- agentic_fabriq_sdk-0.1.29/af_sdk/dx/runtime.py +42 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/events.py +18 -55
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/fabriq_client.py +34 -58
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/models/__init__.py +0 -12
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/models/types.py +0 -72
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/pyproject.toml +27 -8
- agentic_fabriq_sdk-0.1.5/PKG-INFO +0 -85
- agentic_fabriq_sdk-0.1.5/README.md +0 -54
- agentic_fabriq_sdk-0.1.5/af_sdk/dx/__init__.py +0 -12
- agentic_fabriq_sdk-0.1.5/af_sdk/dx/runtime.py +0 -170
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/auth/dpop.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/auth/token_cache.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/connectors/registry.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/dx/decorators.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/exceptions.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/models/audit.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/py.typed +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/transport/__init__.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/transport/http.py +0 -0
- {agentic_fabriq_sdk-0.1.5 → agentic_fabriq_sdk-0.1.29}/af_sdk/vault.py +0 -0
|
@@ -0,0 +1,148 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentic-fabriq-sdk
|
|
3
|
+
Version: 0.1.29
|
|
4
|
+
Summary: Agentic Fabriq SDK: high-level client, CLI tool, DX helpers, and auth for AI agents
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Keywords: fabriq,agentic-fabriq,sdk,ai,agents,agentic,fabric,cli
|
|
7
|
+
Author: Agentic Fabriq Contributors
|
|
8
|
+
Author-email: contributors@agentic-fabriq.org
|
|
9
|
+
Requires-Python: >=3.11,<3.13
|
|
10
|
+
Classifier: Development Status :: 4 - Beta
|
|
11
|
+
Classifier: Intended Audience :: Developers
|
|
12
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
13
|
+
Classifier: Programming Language :: Python :: 3
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
15
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
16
|
+
Classifier: Typing :: Typed
|
|
17
|
+
Requires-Dist: PyJWT (>=2.8.0)
|
|
18
|
+
Requires-Dist: PyYAML (>=6.0.0)
|
|
19
|
+
Requires-Dist: aiohttp (>=3.9.0)
|
|
20
|
+
Requires-Dist: click (>=8.1.0)
|
|
21
|
+
Requires-Dist: cryptography (>=41.0.0)
|
|
22
|
+
Requires-Dist: httpx (>=0.25.0)
|
|
23
|
+
Requires-Dist: keyring (>=25.0.0)
|
|
24
|
+
Requires-Dist: nats-py (>=2.4.0)
|
|
25
|
+
Requires-Dist: opentelemetry-api (>=1.20.0)
|
|
26
|
+
Requires-Dist: opentelemetry-instrumentation-httpx (>=0.41b0)
|
|
27
|
+
Requires-Dist: pydantic (>=2.4.0)
|
|
28
|
+
Requires-Dist: rich (>=13.7.0)
|
|
29
|
+
Requires-Dist: stevedore (>=5.1.0)
|
|
30
|
+
Requires-Dist: typer[all] (>=0.20.0)
|
|
31
|
+
Requires-Dist: typing-extensions (>=4.0.0)
|
|
32
|
+
Project-URL: Documentation, https://docs.agentic-fabric.org
|
|
33
|
+
Project-URL: Homepage, https://github.com/agentic-fabric/agentic-fabric
|
|
34
|
+
Project-URL: Repository, https://github.com/agentic-fabric/agentic-fabric
|
|
35
|
+
Description-Content-Type: text/markdown
|
|
36
|
+
|
|
37
|
+
# Agentic Fabriq SDK
|
|
38
|
+
|
|
39
|
+
`agentic-fabriq-sdk` provides a Python SDK and CLI tool for interacting with Agentic Fabriq.
|
|
40
|
+
|
|
41
|
+
**What's included:**
|
|
42
|
+
- 🐍 **Python SDK**: High-level client (`af_sdk.FabriqClient`) and DX layer
|
|
43
|
+
- 🛠️ **CLI Tool**: `afctl` command for authentication and management
|
|
44
|
+
- 🔐 **OAuth2/PKCE**: Secure browser-based authentication with token storage
|
|
45
|
+
|
|
46
|
+
## Install
|
|
47
|
+
|
|
48
|
+
```bash
|
|
49
|
+
pip install agentic-fabriq-sdk
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
This installs both the Python library and the `afctl` CLI tool.
|
|
53
|
+
|
|
54
|
+
## Quickstart
|
|
55
|
+
|
|
56
|
+
### CLI Tool
|
|
57
|
+
|
|
58
|
+
Authenticate and manage your Agentic Fabriq resources:
|
|
59
|
+
|
|
60
|
+
```bash
|
|
61
|
+
# Login with OAuth2 (browser opens automatically)
|
|
62
|
+
afctl auth login
|
|
63
|
+
|
|
64
|
+
# Check authentication status
|
|
65
|
+
afctl auth status
|
|
66
|
+
|
|
67
|
+
# List available tools
|
|
68
|
+
afctl tools list
|
|
69
|
+
|
|
70
|
+
# List agents
|
|
71
|
+
afctl agents list
|
|
72
|
+
|
|
73
|
+
# Get help
|
|
74
|
+
afctl --help
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
### Python SDK
|
|
78
|
+
|
|
79
|
+
```python
|
|
80
|
+
from af_sdk.fabriq_client import FabriqClient
|
|
81
|
+
|
|
82
|
+
TOKEN = "..." # Bearer JWT for the Fabriq Gateway
|
|
83
|
+
BASE = "https://dashboard.agenticfabriq.com"
|
|
84
|
+
|
|
85
|
+
async def main():
|
|
86
|
+
async with FabriqClient(base_url=BASE, auth_token=TOKEN) as af:
|
|
87
|
+
# List tools and agents
|
|
88
|
+
tools = await af.list_tools()
|
|
89
|
+
agents = await af.list_agents()
|
|
90
|
+
|
|
91
|
+
# Invoke Slack tools
|
|
92
|
+
result = await af.invoke_connection("my-slack", method="get_channels")
|
|
93
|
+
|
|
94
|
+
# Post a Slack message
|
|
95
|
+
await af.invoke_connection(
|
|
96
|
+
"my-slack",
|
|
97
|
+
method="post_message",
|
|
98
|
+
parameters={"channel": "test", "text": "Hello from SDK!"}
|
|
99
|
+
)
|
|
100
|
+
|
|
101
|
+
# Get Gmail emails
|
|
102
|
+
result = await af.invoke_connection(
|
|
103
|
+
"gmail_work",
|
|
104
|
+
method="get_emails",
|
|
105
|
+
parameters={"max_results": 10, "q": "is:unread"}
|
|
106
|
+
)
|
|
107
|
+
emails = result.get("emails", [])
|
|
108
|
+
|
|
109
|
+
# Send an email
|
|
110
|
+
await af.invoke_connection(
|
|
111
|
+
"gmail_work",
|
|
112
|
+
method="send_email",
|
|
113
|
+
parameters={
|
|
114
|
+
"to": "recipient@example.com",
|
|
115
|
+
"subject": "Hello from SDK",
|
|
116
|
+
"body": "This email was sent via Agentic Fabric SDK!"
|
|
117
|
+
}
|
|
118
|
+
)
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
DX orchestration:
|
|
122
|
+
|
|
123
|
+
```python
|
|
124
|
+
from af_sdk.dx import ToolFabric, AgentFabric, Agent, tool
|
|
125
|
+
|
|
126
|
+
slack = ToolFabric(provider="slack", base_url="https://dashboard.agenticfabriq.com", access_token=TOKEN, tenant_id=TENANT)
|
|
127
|
+
agents = AgentFabric(base_url="https://dashboard.agenticfabriq.com", access_token=TOKEN, tenant_id=TENANT)
|
|
128
|
+
|
|
129
|
+
@tool
|
|
130
|
+
def echo(x: str) -> str:
|
|
131
|
+
return x
|
|
132
|
+
|
|
133
|
+
bot = Agent(
|
|
134
|
+
system_prompt="demo",
|
|
135
|
+
tools=[echo],
|
|
136
|
+
agents=agents.get_agents(["summarizer"]),
|
|
137
|
+
base_url="https://dashboard.agenticfabriq.com",
|
|
138
|
+
access_token=TOKEN,
|
|
139
|
+
tenant_id=TENANT,
|
|
140
|
+
provider_fabrics={"slack": slack},
|
|
141
|
+
)
|
|
142
|
+
print(bot.run("Summarize my Slack messages"))
|
|
143
|
+
```
|
|
144
|
+
|
|
145
|
+
## License
|
|
146
|
+
|
|
147
|
+
Apache-2.0
|
|
148
|
+
|
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
# Agentic Fabriq SDK
|
|
2
|
+
|
|
3
|
+
`agentic-fabriq-sdk` provides a Python SDK and CLI tool for interacting with Agentic Fabriq.
|
|
4
|
+
|
|
5
|
+
**What's included:**
|
|
6
|
+
- 🐍 **Python SDK**: High-level client (`af_sdk.FabriqClient`) and DX layer
|
|
7
|
+
- 🛠️ **CLI Tool**: `afctl` command for authentication and management
|
|
8
|
+
- 🔐 **OAuth2/PKCE**: Secure browser-based authentication with token storage
|
|
9
|
+
|
|
10
|
+
## Install
|
|
11
|
+
|
|
12
|
+
```bash
|
|
13
|
+
pip install agentic-fabriq-sdk
|
|
14
|
+
```
|
|
15
|
+
|
|
16
|
+
This installs both the Python library and the `afctl` CLI tool.
|
|
17
|
+
|
|
18
|
+
## Quickstart
|
|
19
|
+
|
|
20
|
+
### CLI Tool
|
|
21
|
+
|
|
22
|
+
Authenticate and manage your Agentic Fabriq resources:
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
# Login with OAuth2 (browser opens automatically)
|
|
26
|
+
afctl auth login
|
|
27
|
+
|
|
28
|
+
# Check authentication status
|
|
29
|
+
afctl auth status
|
|
30
|
+
|
|
31
|
+
# List available tools
|
|
32
|
+
afctl tools list
|
|
33
|
+
|
|
34
|
+
# List agents
|
|
35
|
+
afctl agents list
|
|
36
|
+
|
|
37
|
+
# Get help
|
|
38
|
+
afctl --help
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Python SDK
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from af_sdk.fabriq_client import FabriqClient
|
|
45
|
+
|
|
46
|
+
TOKEN = "..." # Bearer JWT for the Fabriq Gateway
|
|
47
|
+
BASE = "https://dashboard.agenticfabriq.com"
|
|
48
|
+
|
|
49
|
+
async def main():
|
|
50
|
+
async with FabriqClient(base_url=BASE, auth_token=TOKEN) as af:
|
|
51
|
+
# List tools and agents
|
|
52
|
+
tools = await af.list_tools()
|
|
53
|
+
agents = await af.list_agents()
|
|
54
|
+
|
|
55
|
+
# Invoke Slack tools
|
|
56
|
+
result = await af.invoke_connection("my-slack", method="get_channels")
|
|
57
|
+
|
|
58
|
+
# Post a Slack message
|
|
59
|
+
await af.invoke_connection(
|
|
60
|
+
"my-slack",
|
|
61
|
+
method="post_message",
|
|
62
|
+
parameters={"channel": "test", "text": "Hello from SDK!"}
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
# Get Gmail emails
|
|
66
|
+
result = await af.invoke_connection(
|
|
67
|
+
"gmail_work",
|
|
68
|
+
method="get_emails",
|
|
69
|
+
parameters={"max_results": 10, "q": "is:unread"}
|
|
70
|
+
)
|
|
71
|
+
emails = result.get("emails", [])
|
|
72
|
+
|
|
73
|
+
# Send an email
|
|
74
|
+
await af.invoke_connection(
|
|
75
|
+
"gmail_work",
|
|
76
|
+
method="send_email",
|
|
77
|
+
parameters={
|
|
78
|
+
"to": "recipient@example.com",
|
|
79
|
+
"subject": "Hello from SDK",
|
|
80
|
+
"body": "This email was sent via Agentic Fabric SDK!"
|
|
81
|
+
}
|
|
82
|
+
)
|
|
83
|
+
```
|
|
84
|
+
|
|
85
|
+
DX orchestration:
|
|
86
|
+
|
|
87
|
+
```python
|
|
88
|
+
from af_sdk.dx import ToolFabric, AgentFabric, Agent, tool
|
|
89
|
+
|
|
90
|
+
slack = ToolFabric(provider="slack", base_url="https://dashboard.agenticfabriq.com", access_token=TOKEN, tenant_id=TENANT)
|
|
91
|
+
agents = AgentFabric(base_url="https://dashboard.agenticfabriq.com", access_token=TOKEN, tenant_id=TENANT)
|
|
92
|
+
|
|
93
|
+
@tool
|
|
94
|
+
def echo(x: str) -> str:
|
|
95
|
+
return x
|
|
96
|
+
|
|
97
|
+
bot = Agent(
|
|
98
|
+
system_prompt="demo",
|
|
99
|
+
tools=[echo],
|
|
100
|
+
agents=agents.get_agents(["summarizer"]),
|
|
101
|
+
base_url="https://dashboard.agenticfabriq.com",
|
|
102
|
+
access_token=TOKEN,
|
|
103
|
+
tenant_id=TENANT,
|
|
104
|
+
provider_fabrics={"slack": slack},
|
|
105
|
+
)
|
|
106
|
+
print(bot.run("Summarize my Slack messages"))
|
|
107
|
+
```
|
|
108
|
+
|
|
109
|
+
## License
|
|
110
|
+
|
|
111
|
+
Apache-2.0
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
"""
|
|
2
|
+
Agentic Fabric CLI Tool
|
|
3
|
+
|
|
4
|
+
A command-line interface for managing Agentic Fabric resources including
|
|
5
|
+
agents, tools, and administrative operations.
|
|
6
|
+
"""
|
|
7
|
+
|
|
8
|
+
try:
|
|
9
|
+
from importlib.metadata import version, PackageNotFoundError
|
|
10
|
+
try:
|
|
11
|
+
__version__ = version("agentic-fabriq-sdk")
|
|
12
|
+
except PackageNotFoundError:
|
|
13
|
+
# Fallback if package is not installed
|
|
14
|
+
__version__ = "0.0.0-dev"
|
|
15
|
+
except ImportError:
|
|
16
|
+
# Fallback for Python < 3.8 (though we require 3.11+)
|
|
17
|
+
__version__ = "0.0.0-dev"
|