agentflowkit 0.6.1__tar.gz → 0.7.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.
Files changed (101) hide show
  1. agentflowkit-0.7.0/.github/pull_request_template.md +27 -0
  2. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/.github/workflows/ci.yml +113 -81
  3. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/CHANGELOG.md +328 -240
  4. agentflowkit-0.7.0/CODE_OF_CONDUCT.md +49 -0
  5. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/PKG-INFO +129 -42
  6. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/PUBLIC_API.md +109 -78
  7. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/README.md +128 -41
  8. agentflowkit-0.7.0/docs/adr/0001-fail-fast-dag-levels.md +55 -0
  9. agentflowkit-0.7.0/docs/adr/0002-structured-output-via-prompt-and-repair.md +60 -0
  10. agentflowkit-0.7.0/docs/adr/0003-unpriced-models-report-zero-loudly.md +57 -0
  11. agentflowkit-0.7.0/docs/guides/cost-streaming.md +85 -0
  12. agentflowkit-0.7.0/docs/reference.md +119 -0
  13. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/drone_telemetry_agent.py +167 -169
  14. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/earnings_triage.py +3 -3
  15. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/robotics_mqtt_agent.py +121 -114
  16. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/mkdocs.yml +70 -66
  17. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/pyproject.toml +96 -87
  18. agentflowkit-0.7.0/scripts/check_sdist.py +95 -0
  19. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/__init__.py +95 -95
  20. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/agent.py +759 -645
  21. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/cache.py +169 -163
  22. agentflowkit-0.7.0/src/agentflow/events.py +33 -0
  23. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/exceptions.py +81 -61
  24. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/llm.py +268 -255
  25. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/memory.py +373 -478
  26. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/pipeline.py +948 -744
  27. agentflowkit-0.7.0/src/agentflow/pricing.py +127 -0
  28. agentflowkit-0.6.1/src/agentflow/events.py → agentflowkit-0.7.0/src/agentflow/triggers.py +383 -259
  29. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/types.py +142 -136
  30. agentflowkit-0.7.0/tests/test_examples.py +45 -0
  31. agentflowkit-0.7.0/tests/test_explain_and_concurrency.py +177 -0
  32. agentflowkit-0.7.0/tests/test_fail_fast.py +200 -0
  33. agentflowkit-0.7.0/tests/test_llm.py +144 -0
  34. agentflowkit-0.7.0/tests/test_mqtt.py +355 -0
  35. agentflowkit-0.7.0/tests/test_otel.py +164 -0
  36. agentflowkit-0.7.0/tests/test_packaging.py +85 -0
  37. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_pipeline.py +323 -237
  38. agentflowkit-0.7.0/tests/test_pricing.py +115 -0
  39. agentflowkit-0.7.0/tests/test_structured_output.py +207 -0
  40. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/uv.lock +4185 -4185
  41. agentflowkit-0.6.1/LEVEL_UP.md +0 -314
  42. agentflowkit-0.6.1/docs/guides/cost-streaming.md +0 -48
  43. agentflowkit-0.6.1/docs/reference.md +0 -49
  44. agentflowkit-0.6.1/src/agentflow/distillation.py +0 -160
  45. agentflowkit-0.6.1/src/agentflow/pricing.py +0 -57
  46. agentflowkit-0.6.1/src/agentflow/triggers.py +0 -127
  47. agentflowkit-0.6.1/tests/test_llm.py +0 -53
  48. agentflowkit-0.6.1/tests/test_pricing.py +0 -36
  49. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/.gitattributes +0 -0
  50. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/.github/ISSUE_TEMPLATE/bug_report.md +0 -0
  51. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/.github/ISSUE_TEMPLATE/feature_request.md +0 -0
  52. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/.github/workflows/docs.yml +0 -0
  53. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/.github/workflows/publish.yml +0 -0
  54. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/.gitignore +0 -0
  55. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/CONTRIBUTING.md +0 -0
  56. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/LICENSE +0 -0
  57. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/SECURITY.md +0 -0
  58. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/benchmarks/parallel_speedup.py +0 -0
  59. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/docs/getting-started.md +0 -0
  60. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/docs/guides/memory.md +0 -0
  61. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/docs/guides/observability.md +0 -0
  62. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/docs/guides/tools.md +0 -0
  63. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/docs/index.md +0 -0
  64. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/code_reviewer.py +0 -0
  65. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/cpp_build_pipeline.py +0 -0
  66. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/market_analysis_crew.py +0 -0
  67. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/memory_chat_agents.py +0 -0
  68. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/notebooks/parallel_execution_demo.ipynb +0 -0
  69. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/notebooks/quickstart.ipynb +0 -0
  70. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/research_crew.py +0 -0
  71. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/research_react_agent.py +0 -0
  72. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/streaming_and_cost.py +0 -0
  73. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/examples/tool_agent.py +0 -0
  74. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/contrib/__init__.py +0 -0
  75. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/contrib/otel.py +0 -0
  76. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/hitl.py +0 -0
  77. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/logging.py +0 -0
  78. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/observability.py +0 -0
  79. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/py.typed +0 -0
  80. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/rate_limiter.py +0 -0
  81. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/sandbox.py +0 -0
  82. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/swarm.py +0 -0
  83. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/swarm_routing.py +0 -0
  84. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/src/agentflow/tools.py +0 -0
  85. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_agent.py +0 -0
  86. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_cache.py +0 -0
  87. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_conditional.py +0 -0
  88. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_hitl.py +0 -0
  89. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_logging.py +0 -0
  90. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_long_term_memory.py +0 -0
  91. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_memory.py +0 -0
  92. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_observability.py +0 -0
  93. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_parallel.py +0 -0
  94. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_rate_limiter.py +0 -0
  95. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_retry.py +0 -0
  96. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_sandbox.py +0 -0
  97. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_streaming.py +0 -0
  98. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_swarm.py +0 -0
  99. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_swarm_routing.py +0 -0
  100. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_tools.py +0 -0
  101. {agentflowkit-0.6.1 → agentflowkit-0.7.0}/tests/test_triggers.py +0 -0
@@ -0,0 +1,27 @@
1
+ # What
2
+
3
+ <!-- One or two sentences: what changes for a user of the library? -->
4
+
5
+ # Why
6
+
7
+ <!-- The problem this solves. Link the issue if there is one. -->
8
+
9
+ # How it was verified
10
+
11
+ <!-- Paste the actual output, not "tests pass". -->
12
+
13
+ ```
14
+ ruff check src/ tests/ examples/ benchmarks/ scripts/
15
+ mypy src/agentflow/
16
+ pytest # includes the 90% coverage gate
17
+ ```
18
+
19
+ # Checklist
20
+
21
+ - [ ] Lint, typecheck, and the full suite are green locally (output pasted above)
22
+ - [ ] New behaviour has tests — happy path **and** at least one failure path
23
+ - [ ] `CHANGELOG.md` `[Unreleased]` updated
24
+ - [ ] Public API change? `PUBLIC_API.md` updated, and a deprecation shim if it breaks
25
+ - [ ] Hard-to-reverse decision? An ADR added under `docs/adr/`
26
+ - [ ] Docs updated (`README.md`, `docs/`) if commands, config, or behaviour changed
27
+ - [ ] No secrets, debug leftovers, or unrelated drive-by changes in the diff
@@ -1,81 +1,113 @@
1
- name: CI
2
-
3
- on:
4
- push:
5
- branches: [main]
6
- pull_request:
7
- branches: [main]
8
-
9
- jobs:
10
- lint:
11
- name: Lint & Type Check
12
- runs-on: ubuntu-latest
13
- steps:
14
- - uses: actions/checkout@v4
15
-
16
- - name: Set up Python
17
- uses: actions/setup-python@v5
18
- with:
19
- python-version: "3.11"
20
-
21
- - name: Install dev dependencies
22
- run: pip install -e ".[dev]"
23
-
24
- - name: Run ruff
25
- run: ruff check src/ tests/ examples/ benchmarks/
26
-
27
- - name: Run mypy
28
- run: mypy src/agentflow/
29
-
30
- test:
31
- name: Tests (Python ${{ matrix.python-version }})
32
- runs-on: ubuntu-latest
33
- strategy:
34
- fail-fast: false
35
- matrix:
36
- python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
37
-
38
- steps:
39
- - uses: actions/checkout@v4
40
-
41
- - name: Set up Python ${{ matrix.python-version }}
42
- uses: actions/setup-python@v5
43
- with:
44
- python-version: ${{ matrix.python-version }}
45
-
46
- - name: Install dependencies
47
- run: pip install -e ".[dev]"
48
-
49
- - name: Run tests with coverage
50
- run: pytest tests/ -v --cov=agentflow --cov-report=xml --cov-report=term-missing
51
-
52
- - name: Upload coverage to Codecov
53
- uses: codecov/codecov-action@v4
54
- with:
55
- file: ./coverage.xml
56
- fail_ci_if_error: false
57
- env:
58
- CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
59
-
60
- build:
61
- name: Build Distribution
62
- runs-on: ubuntu-latest
63
- needs: [lint, test]
64
- steps:
65
- - uses: actions/checkout@v4
66
-
67
- - name: Set up Python
68
- uses: actions/setup-python@v5
69
- with:
70
- python-version: "3.11"
71
-
72
- - name: Install build tools
73
- run: pip install build
74
-
75
- - name: Build wheel and sdist
76
- run: python -m build
77
-
78
- - name: Check distributions
79
- run: |
80
- pip install twine
81
- twine check dist/*
1
+ name: CI
2
+
3
+ on:
4
+ push:
5
+ branches: [main]
6
+ pull_request:
7
+ branches: [main]
8
+
9
+ # A new push makes the previous run's result irrelevant — don't pay for it.
10
+ concurrency:
11
+ group: ${{ github.workflow }}-${{ github.ref }}
12
+ cancel-in-progress: true
13
+
14
+ jobs:
15
+ lint:
16
+ name: Lint & Type Check
17
+ runs-on: ubuntu-latest
18
+ steps:
19
+ - uses: actions/checkout@v4
20
+
21
+ - name: Set up Python
22
+ uses: actions/setup-python@v5
23
+ with:
24
+ python-version: "3.11"
25
+
26
+ - name: Install dev dependencies
27
+ run: pip install -e ".[dev]"
28
+
29
+ - name: Run ruff
30
+ run: ruff check src/ tests/ examples/ benchmarks/
31
+
32
+ - name: Run mypy
33
+ run: mypy src/agentflow/
34
+
35
+ test:
36
+ name: Tests (Python ${{ matrix.python-version }})
37
+ runs-on: ubuntu-latest
38
+ strategy:
39
+ fail-fast: false
40
+ matrix:
41
+ python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"]
42
+
43
+ steps:
44
+ - uses: actions/checkout@v4
45
+
46
+ - name: Set up Python ${{ matrix.python-version }}
47
+ uses: actions/setup-python@v5
48
+ with:
49
+ python-version: ${{ matrix.python-version }}
50
+
51
+ # otel and mqtt are installed so contrib/otel.py and triggers.py are
52
+ # actually exercised without them those modules are skipped and the
53
+ # coverage gate reports on a smaller package than the one we ship.
54
+ - name: Install dependencies
55
+ run: pip install -e ".[dev,otel,mqtt]"
56
+
57
+ - name: Run tests with coverage
58
+ run: pytest tests/ -v --cov=agentflow --cov-report=xml --cov-report=term-missing
59
+
60
+ - name: Upload coverage to Codecov
61
+ uses: codecov/codecov-action@v4
62
+ with:
63
+ file: ./coverage.xml
64
+ fail_ci_if_error: false
65
+ env:
66
+ CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
67
+
68
+ build:
69
+ name: Build Distribution
70
+ runs-on: ubuntu-latest
71
+ needs: [lint, test]
72
+ steps:
73
+ - uses: actions/checkout@v4
74
+
75
+ - name: Set up Python
76
+ uses: actions/setup-python@v5
77
+ with:
78
+ python-version: "3.11"
79
+
80
+ - name: Install build tools
81
+ run: pip install build
82
+
83
+ - name: Build wheel and sdist
84
+ run: python -m build
85
+
86
+ - name: Check distributions
87
+ run: |
88
+ pip install twine
89
+ twine check dist/*
90
+
91
+ # The published sdist once shipped a stray local directory; assert the
92
+ # archive contains only what the package is supposed to contain.
93
+ - name: Check the sdist has no stray files
94
+ run: python scripts/check_sdist.py
95
+
96
+ docs:
97
+ name: Docs Build
98
+ runs-on: ubuntu-latest
99
+ steps:
100
+ - uses: actions/checkout@v4
101
+
102
+ - name: Set up Python
103
+ uses: actions/setup-python@v5
104
+ with:
105
+ python-version: "3.11"
106
+
107
+ - name: Install docs dependencies
108
+ run: pip install -e ".[docs]"
109
+
110
+ # --strict fails on a broken reference or a page missing from the nav,
111
+ # so a docs break is caught on the PR instead of on the live site.
112
+ - name: Build the documentation
113
+ run: mkdocs build --strict