agentflow-client 1.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.
- agentflow_client-1.1.0/.gitignore +88 -0
- agentflow_client-1.1.0/PKG-INFO +72 -0
- agentflow_client-1.1.0/README.md +51 -0
- agentflow_client-1.1.0/agentflow/__init__.py +14 -0
- agentflow_client-1.1.0/agentflow/_compat.py +26 -0
- agentflow_client-1.1.0/agentflow/async_client.py +564 -0
- agentflow_client-1.1.0/agentflow/circuit_breaker.py +65 -0
- agentflow_client-1.1.0/agentflow/cli.py +505 -0
- agentflow_client-1.1.0/agentflow/client.py +562 -0
- agentflow_client-1.1.0/agentflow/exceptions.py +27 -0
- agentflow_client-1.1.0/agentflow/models.py +250 -0
- agentflow_client-1.1.0/agentflow/py.typed +0 -0
- agentflow_client-1.1.0/agentflow/retry.py +41 -0
- agentflow_client-1.1.0/agentflow/templates/basic/.env.example.tmpl +2 -0
- agentflow_client-1.1.0/agentflow/templates/basic/README.md.tmpl +15 -0
- agentflow_client-1.1.0/agentflow/templates/basic/main.py.tmpl +25 -0
- agentflow_client-1.1.0/agentflow/templates/basic/requirements.txt.tmpl +1 -0
- agentflow_client-1.1.0/agentflow/templates/crewai/.env.example.tmpl +2 -0
- agentflow_client-1.1.0/agentflow/templates/crewai/README.md.tmpl +12 -0
- agentflow_client-1.1.0/agentflow/templates/crewai/main.py.tmpl +28 -0
- agentflow_client-1.1.0/agentflow/templates/crewai/requirements.txt.tmpl +4 -0
- agentflow_client-1.1.0/agentflow/templates/langchain/.env.example.tmpl +3 -0
- agentflow_client-1.1.0/agentflow/templates/langchain/README.md.tmpl +13 -0
- agentflow_client-1.1.0/agentflow/templates/langchain/main.py.tmpl +28 -0
- agentflow_client-1.1.0/agentflow/templates/langchain/requirements.txt.tmpl +4 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/.env.example.tmpl +3 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/README.md.tmpl +12 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/app/api/chat/route.ts.tmpl +37 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/app/layout.tsx.tmpl +9 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/app/page.tsx.tmpl +46 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/next-env.d.ts.tmpl +2 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/next.config.mjs.tmpl +3 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/package.json.tmpl +24 -0
- agentflow_client-1.1.0/agentflow/templates/vercel-ai/tsconfig.json.tmpl +19 -0
- agentflow_client-1.1.0/pyproject.toml +42 -0
|
@@ -0,0 +1,88 @@
|
|
|
1
|
+
__pycache__/
|
|
2
|
+
*.py[cod]
|
|
3
|
+
*$py.class
|
|
4
|
+
*.egg-info/
|
|
5
|
+
dist/
|
|
6
|
+
build/
|
|
7
|
+
.eggs/
|
|
8
|
+
|
|
9
|
+
.env
|
|
10
|
+
.env.local
|
|
11
|
+
*.pem
|
|
12
|
+
*.key
|
|
13
|
+
|
|
14
|
+
# Local secrets — copy from .example and fill with real values
|
|
15
|
+
docker/kafka-connect/secrets/postgres.properties
|
|
16
|
+
docker/kafka-connect/secrets/mysql.properties
|
|
17
|
+
|
|
18
|
+
.venv/
|
|
19
|
+
venv/
|
|
20
|
+
env/
|
|
21
|
+
|
|
22
|
+
.idea/
|
|
23
|
+
.vscode/
|
|
24
|
+
*.swp
|
|
25
|
+
*.swo
|
|
26
|
+
|
|
27
|
+
*.log
|
|
28
|
+
logs/
|
|
29
|
+
|
|
30
|
+
.terraform/
|
|
31
|
+
*.tfstate
|
|
32
|
+
*.tfstate.backup
|
|
33
|
+
.terraform.lock.hcl
|
|
34
|
+
|
|
35
|
+
data/
|
|
36
|
+
checkpoints/
|
|
37
|
+
*.parquet
|
|
38
|
+
*.avro
|
|
39
|
+
|
|
40
|
+
.pytest_cache/
|
|
41
|
+
htmlcov/
|
|
42
|
+
.coverage
|
|
43
|
+
coverage.xml
|
|
44
|
+
|
|
45
|
+
docker-compose.override.yml
|
|
46
|
+
|
|
47
|
+
# runtime artifacts
|
|
48
|
+
*.duckdb
|
|
49
|
+
*.duckdb.wal
|
|
50
|
+
.artifacts/
|
|
51
|
+
.hypothesis/
|
|
52
|
+
.iceberg/
|
|
53
|
+
.tmp/
|
|
54
|
+
.dora/
|
|
55
|
+
.bandit-baseline.json
|
|
56
|
+
!.bandit-baseline.json
|
|
57
|
+
|
|
58
|
+
# DuckDB runtime state
|
|
59
|
+
*.duckdb.tmp/
|
|
60
|
+
|
|
61
|
+
# Node
|
|
62
|
+
node_modules/
|
|
63
|
+
|
|
64
|
+
# Mutation testing output
|
|
65
|
+
mutants/
|
|
66
|
+
|
|
67
|
+
# Session notes (root-level temp .md created during Codex/Claude sessions).
|
|
68
|
+
# NOTE: BCG_audit.md was removed from this list on 2026-04-19 -
|
|
69
|
+
# it was a release artifact, not a session note.
|
|
70
|
+
/codex_res.md
|
|
71
|
+
/res_co.md
|
|
72
|
+
/rep.md
|
|
73
|
+
/more_help.md
|
|
74
|
+
/About_DE_project.md
|
|
75
|
+
/RELEASING.md
|
|
76
|
+
sdk/agentflow/**/__pycache__/
|
|
77
|
+
sdk/agentflow/**/*.py[cod]
|
|
78
|
+
integrations/agentflow_integrations/**/__pycache__/
|
|
79
|
+
integrations/agentflow_integrations/**/*.py[cod]
|
|
80
|
+
# Local Iceberg warehouse/runtime state (intentionally untracked).
|
|
81
|
+
/warehouse/agentflow/
|
|
82
|
+
# Root API usage DuckDB runtime state (intentionally untracked).
|
|
83
|
+
/agentflow_api.duckdb
|
|
84
|
+
agentflow_bench_debug*.duckdb*
|
|
85
|
+
agentflow_demo_api.duckdb*
|
|
86
|
+
|
|
87
|
+
# Security scan workdir (generated by .github/workflows/security.yml safety job)
|
|
88
|
+
.tmp-security/
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentflow-client
|
|
3
|
+
Version: 1.1.0
|
|
4
|
+
Summary: Python SDK for the AgentFlow API
|
|
5
|
+
License: MIT
|
|
6
|
+
Keywords: agentflow,api,sdk
|
|
7
|
+
Classifier: Development Status :: 5 - Production/Stable
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
14
|
+
Classifier: Typing :: Typed
|
|
15
|
+
Requires-Python: >=3.11
|
|
16
|
+
Requires-Dist: click<9,>=8.1
|
|
17
|
+
Requires-Dist: httpx<1,>=0.27
|
|
18
|
+
Requires-Dist: pydantic<3,>=2.9
|
|
19
|
+
Requires-Dist: rich<15,>=13
|
|
20
|
+
Description-Content-Type: text/markdown
|
|
21
|
+
|
|
22
|
+
# agentflow-client
|
|
23
|
+
|
|
24
|
+
> PyPI distribution name: **`agentflow-client`**. Registry publishing is not
|
|
25
|
+
> complete as of 2026-04-27; until the first green `Publish Python Packages`
|
|
26
|
+
> run, use the local editable install below. Python import remains `agentflow`.
|
|
27
|
+
|
|
28
|
+
After registry publish:
|
|
29
|
+
|
|
30
|
+
```bash
|
|
31
|
+
pip install agentflow-client
|
|
32
|
+
```
|
|
33
|
+
|
|
34
|
+
Inside the monorepo, the root runtime package is tracked separately as
|
|
35
|
+
`agentflow-runtime`, while the SDK keeps the `agentflow` import path and CLI.
|
|
36
|
+
|
|
37
|
+
For a local editable install from this repository (the supported path today):
|
|
38
|
+
|
|
39
|
+
```bash
|
|
40
|
+
python -m pip install -e "./sdk"
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
```python
|
|
44
|
+
from agentflow import AgentFlowClient
|
|
45
|
+
client = AgentFlowClient("http://localhost:8000", api_key="dev-key")
|
|
46
|
+
order = client.get_order("ORD-20260404-1001")
|
|
47
|
+
print(order.status, client.get_metric("revenue", "24h").value)
|
|
48
|
+
```
|
|
49
|
+
|
|
50
|
+
```python
|
|
51
|
+
from agentflow import AgentFlowClient
|
|
52
|
+
from agentflow.retry import RetryPolicy
|
|
53
|
+
|
|
54
|
+
client = AgentFlowClient("http://localhost:8000", api_key="dev-key")
|
|
55
|
+
client.configure_resilience(retry_policy=RetryPolicy(max_attempts=5))
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```python
|
|
59
|
+
from agentflow import AsyncAgentFlowClient
|
|
60
|
+
|
|
61
|
+
async def main() -> None:
|
|
62
|
+
async with AsyncAgentFlowClient("http://localhost:8000", api_key="dev-key") as client:
|
|
63
|
+
order = await client.get_order("ORD-20260404-1001")
|
|
64
|
+
metric = await client.get_metric("revenue", "24h")
|
|
65
|
+
print(order.status, metric.value)
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
The SDK exposes typed methods for v1 read, query, discovery, contract,
|
|
69
|
+
lineage, changelog, and batch routes. Admin and operational surfaces are
|
|
70
|
+
intentionally not wrapped as public typed methods: `/v1/admin/*`,
|
|
71
|
+
`/v1/webhooks`, `/v1/alerts`, `/v1/deadletter`, `/v1/slo`, and
|
|
72
|
+
`/v1/stream/events`.
|
|
@@ -0,0 +1,51 @@
|
|
|
1
|
+
# agentflow-client
|
|
2
|
+
|
|
3
|
+
> PyPI distribution name: **`agentflow-client`**. Registry publishing is not
|
|
4
|
+
> complete as of 2026-04-27; until the first green `Publish Python Packages`
|
|
5
|
+
> run, use the local editable install below. Python import remains `agentflow`.
|
|
6
|
+
|
|
7
|
+
After registry publish:
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
pip install agentflow-client
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
Inside the monorepo, the root runtime package is tracked separately as
|
|
14
|
+
`agentflow-runtime`, while the SDK keeps the `agentflow` import path and CLI.
|
|
15
|
+
|
|
16
|
+
For a local editable install from this repository (the supported path today):
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
python -m pip install -e "./sdk"
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
```python
|
|
23
|
+
from agentflow import AgentFlowClient
|
|
24
|
+
client = AgentFlowClient("http://localhost:8000", api_key="dev-key")
|
|
25
|
+
order = client.get_order("ORD-20260404-1001")
|
|
26
|
+
print(order.status, client.get_metric("revenue", "24h").value)
|
|
27
|
+
```
|
|
28
|
+
|
|
29
|
+
```python
|
|
30
|
+
from agentflow import AgentFlowClient
|
|
31
|
+
from agentflow.retry import RetryPolicy
|
|
32
|
+
|
|
33
|
+
client = AgentFlowClient("http://localhost:8000", api_key="dev-key")
|
|
34
|
+
client.configure_resilience(retry_policy=RetryPolicy(max_attempts=5))
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
```python
|
|
38
|
+
from agentflow import AsyncAgentFlowClient
|
|
39
|
+
|
|
40
|
+
async def main() -> None:
|
|
41
|
+
async with AsyncAgentFlowClient("http://localhost:8000", api_key="dev-key") as client:
|
|
42
|
+
order = await client.get_order("ORD-20260404-1001")
|
|
43
|
+
metric = await client.get_metric("revenue", "24h")
|
|
44
|
+
print(order.status, metric.value)
|
|
45
|
+
```
|
|
46
|
+
|
|
47
|
+
The SDK exposes typed methods for v1 read, query, discovery, contract,
|
|
48
|
+
lineage, changelog, and batch routes. Admin and operational surfaces are
|
|
49
|
+
intentionally not wrapped as public typed methods: `/v1/admin/*`,
|
|
50
|
+
`/v1/webhooks`, `/v1/alerts`, `/v1/deadletter`, `/v1/slo`, and
|
|
51
|
+
`/v1/stream/events`.
|
|
@@ -0,0 +1,14 @@
|
|
|
1
|
+
from agentflow.async_client import AsyncAgentFlowClient
|
|
2
|
+
from agentflow.circuit_breaker import CircuitOpenError
|
|
3
|
+
from agentflow.client import AgentFlowClient
|
|
4
|
+
from agentflow.exceptions import PermissionDeniedError
|
|
5
|
+
|
|
6
|
+
__version__ = "1.1.0"
|
|
7
|
+
|
|
8
|
+
__all__ = [
|
|
9
|
+
"AgentFlowClient",
|
|
10
|
+
"AsyncAgentFlowClient",
|
|
11
|
+
"PermissionDeniedError",
|
|
12
|
+
"CircuitOpenError",
|
|
13
|
+
"__version__",
|
|
14
|
+
]
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import warnings
|
|
2
|
+
from collections.abc import Callable
|
|
3
|
+
from functools import wraps
|
|
4
|
+
from typing import Any
|
|
5
|
+
|
|
6
|
+
|
|
7
|
+
def deprecated(
|
|
8
|
+
replacement: str,
|
|
9
|
+
removed_in: str,
|
|
10
|
+
) -> Callable[[Callable[..., Any]], Callable[..., Any]]:
|
|
11
|
+
def decorator(func: Callable[..., Any]) -> Callable[..., Any]:
|
|
12
|
+
@wraps(func)
|
|
13
|
+
def wrapper(*args: Any, **kwargs: Any) -> Any:
|
|
14
|
+
warnings.warn(
|
|
15
|
+
(
|
|
16
|
+
f"{func.__name__} is deprecated and will be removed in {removed_in}. "
|
|
17
|
+
f"Use {replacement} instead."
|
|
18
|
+
),
|
|
19
|
+
DeprecationWarning,
|
|
20
|
+
stacklevel=2,
|
|
21
|
+
)
|
|
22
|
+
return func(*args, **kwargs)
|
|
23
|
+
|
|
24
|
+
return wrapper
|
|
25
|
+
|
|
26
|
+
return decorator
|