agenttrafficcop 2.2.0__tar.gz → 2.3.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 (39) hide show
  1. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/CHANGELOG.md +21 -5
  2. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/PKG-INFO +83 -17
  3. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/QUICKSTARTS.md +1 -1
  4. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/README.md +82 -16
  5. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/RUNTIME_FEATURES.md +14 -4
  6. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/__init__.py +1 -1
  7. agenttrafficcop-2.3.0/agenttrafficcop/cli.py +749 -0
  8. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/client.py +20 -6
  9. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop.egg-info/PKG-INFO +83 -17
  10. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/pyproject.toml +1 -1
  11. agenttrafficcop-2.2.0/agenttrafficcop/cli.py +0 -251
  12. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/FEATURES.md +0 -0
  13. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/LICENSE +0 -0
  14. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/MANIFEST.in +0 -0
  15. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/accounting.py +0 -0
  16. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/autogen.py +0 -0
  17. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/embeddings.py +0 -0
  18. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/exceptions.py +0 -0
  19. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/frameworks.py +0 -0
  20. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/langgraph.py +0 -0
  21. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/local.py +0 -0
  22. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/models.py +0 -0
  23. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/normalization.py +0 -0
  24. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/openai_gateway.py +0 -0
  25. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/outage.py +0 -0
  26. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/py.typed +0 -0
  27. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/recipes.py +0 -0
  28. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/recovery.py +0 -0
  29. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/replay.py +0 -0
  30. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/runtime.py +0 -0
  31. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/security.py +0 -0
  32. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/semantic.py +0 -0
  33. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop/tracing.py +0 -0
  34. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop.egg-info/SOURCES.txt +0 -0
  35. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop.egg-info/dependency_links.txt +0 -0
  36. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop.egg-info/entry_points.txt +0 -0
  37. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop.egg-info/requires.txt +0 -0
  38. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/agenttrafficcop.egg-info/top_level.txt +0 -0
  39. {agenttrafficcop-2.2.0 → agenttrafficcop-2.3.0}/setup.cfg +0 -0
@@ -1,3 +1,23 @@
1
+ ## 2.3.0
2
+
3
+ - Add a gateway setup wizard (`atc gateway init`) that fetches priced models,
4
+ writes a secret-safe environment template, and protects existing files unless
5
+ `--force` is specified.
6
+ - Add `atc gateway models` and an explicitly confirmed `atc gateway test`; the
7
+ live test sets a per-run budget first, limits output tokens, and prints only
8
+ safe error identifiers. A live provider request can still incur charges.
9
+ - Add automatic, cached gateway pricing refresh from the public LiteLLM model
10
+ catalog, with last-known-good fallback and exact `ATC_PROXY_MODEL_PRICES_JSON`
11
+ operator overrides. Rates remain estimates, not provider invoices or hard caps.
12
+ - Add optional per-run cumulative gateway token ceilings and warning thresholds.
13
+ Reservations include an input-token provider count where available or a
14
+ conservative byte-based estimate plus maximum output; actual provider-reported
15
+ usage and one-time threshold events appear in run history/dashboard. In-flight
16
+ calls and non-gateway use are not blocked by this estimate-based control.
17
+ - Add `atc init`/`atc doctor`, Anthropic model-aware input-token preflight with
18
+ labeled estimate fallback, and the LangGraph checkpointed-review adapter.
19
+ - Include the setup documentation and examples for the above release features.
20
+
1
21
  ## 2.2.0
2
22
 
3
23
  - Publish the SDK LangGraph checkpointed-review adapter with a built-in,
@@ -9,11 +29,7 @@
9
29
 
10
30
  ## Unreleased
11
31
 
12
- - Add Anthropic model-aware gateway input-token preflight with a clearly labeled
13
- buffered-estimate fallback; estimates remain admission buffers, not invoice caps.
14
- - Add a starter Kubernetes Helm chart and `atc doctor` deployment preflight.
15
- - Add LangGraph checkpointed review interrupts with safe reasons, exact-action
16
- approval verification and a fresh ATC check before resumed node execution.
32
+ - No unreleased changes.
17
33
 
18
34
  ## 2.1.0
19
35
 
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: agenttrafficcop
3
- Version: 2.2.0
3
+ Version: 2.3.0
4
4
  Summary: Python SDK for AgentTrafficCop — local and hosted deterministic checks for agent workflows.
5
5
  Author: AgentTrafficCop
6
6
  License-Expression: MIT
@@ -82,13 +82,55 @@ change. Unknown-cost exceptions retain holds; they are never settled as zero.
82
82
  Python **3.11+**:
83
83
 
84
84
  ```bash
85
- python -m pip install --upgrade 'agenttrafficcop==2.2.0'
85
+ python -m pip install --upgrade 'agenttrafficcop==2.3.0'
86
86
  python -c "from importlib.metadata import version; print(version('agenttrafficcop'))"
87
87
  ```
88
88
 
89
89
  Base dependency: `httpx>=0.27.0,<0.30.0`. Use a virtual environment; optional
90
90
  framework extras have their own requirements.
91
91
 
92
+ ## CLI setup and deployment checks
93
+
94
+ `atc init` interactively generates a small hosted Guard example, an environment
95
+ variable template, and setup notes. Choose `python` or `langgraph`; no secret is
96
+ requested or written. Review the generated files and inject `ATC_API_KEY` from
97
+ your secret manager/environment before running them:
98
+
99
+ ```bash
100
+ atc init
101
+ # Or generate without prompts:
102
+ atc init --framework python --url https://your-atc-host --output ./atc-example
103
+ ```
104
+
105
+ Generated files are not overwritten unless you explicitly pass `--force`.
106
+
107
+ For the optional provider gateway, `atc gateway init` fetches currently priced
108
+ models and generates a secret-safe `.env.example` plus run instructions. It does
109
+ not fetch or write your provider key. After loading `ATC_API_KEY` and the chosen
110
+ provider key from a secret manager or local environment, `atc gateway test`
111
+ asks before making one small real provider request; `atc gateway models` lists
112
+ available model rates. The test sets a per-run USD budget, a 512-token ceiling
113
+ and 400-token warning threshold before sending (override with `--token-limit`,
114
+ `--token-alert-at`, or the generated env vars), and limits output tokens. Provider
115
+ billing and final token usage can still exceed admission estimates. OpenAI BYOK
116
+ keys are sent only with the HTTPS request; Groq/Anthropic keys are stored in the
117
+ ATC encrypted credential vault for that ATC API key before the live test (remove
118
+ with `DELETE /v1/provider-credentials/{provider}` when no longer needed):
119
+
120
+ ```bash
121
+ atc gateway init
122
+ # Review the generated files, then load secrets into your environment.
123
+ atc gateway models --provider openai
124
+ atc gateway test # asks for confirmation; a real provider request may cost money
125
+ ```
126
+
127
+ For Kubernetes installs, `atc doctor` checks the ATC namespace/deployment,
128
+ service/endpoints, health URL, and expected agent egress policy shape. Add
129
+ `--probe-egress` to create a temporary probe pod that tests ATC reachability and
130
+ whether public TCP egress is blocked; this needs pod create/exec/delete access,
131
+ an image pull, and a NetworkPolicy-enforcing CNI. A passing policy-shape check
132
+ alone does not prove runtime enforcement.
133
+
92
134
  ## Route OpenAI calls through ATC with BYOK
93
135
 
94
136
  Install the optional OpenAI integration:
@@ -121,8 +163,9 @@ with openai_gateway_client(
121
163
  For async applications, create the client with `async_openai_gateway_client`
122
164
  and use the returned client in `async with`. Set `provider="groq"` to route compatible OpenAI SDK calls to
123
165
  the fixed Groq gateway route. The gateway currently supports text-only,
124
- non-streaming Chat Completions for configured models; configure exact model
125
- prices and an eligible run budget on ATC first. No prompts or completions are
166
+ non-streaming Chat Completions for supported priced models and requires an
167
+ eligible run budget on ATC. Its public price catalog refreshes while in use;
168
+ operator-provided prices can override it. No prompts or completions are
126
169
  added to trace telemetry.
127
170
 
128
171
  The adapter adds one operation ID to each `create` call before handing it to
@@ -580,8 +623,11 @@ raw-mode checks still transmit payloads for validation and hashing.
580
623
  ## Reported spending and run budgets — Pro/Team
581
624
 
582
625
  ```python
583
- budget = await guard.set_run_budget(session_id=run_id, budget_usd="2.00")
584
- # GuardSync: budget = guard.set_run_budget(...)
626
+ budget = await guard.set_run_budget(
627
+ session_id=run_id, budget_usd="2.00",
628
+ token_limit=100_000, token_alert_at=80_000,
629
+ )
630
+ # GuardSync accepts the same keyword options.
585
631
  ```
586
632
 
587
633
  Setting a budget does not connect provider billing. An authorized backend must
@@ -590,9 +636,14 @@ requests. Use matching key/session attribution and stable unique event IDs;
590
636
  never report cumulative run totals or duplicate spending across integrations.
591
637
 
592
638
  Run budgets are **API key + session** scoped. Rolling thresholds cover a key's
593
- reported costs over 60 seconds. Updating budgets preserves spending; a new run
594
- needs a new session ID. Delayed reports, unguarded actions and in-flight work can
595
- overshoot. These are not provider-side hard caps.
639
+ reported costs over 60 seconds. Optional `token_limit` and `token_alert_at`
640
+ settings apply to actual provider-reported gateway token use for that run. Alert
641
+ crossings are retained in run budget history and shown in the dashboard; new
642
+ gateway reservations are rejected if their input estimate plus maximum output
643
+ would exceed the remaining ceiling. Updating budgets preserves spending; a new
644
+ run needs a new session ID. Byte-based input estimates are not exact token counts,
645
+ already in-flight requests can finish, and direct calls outside the gateway are
646
+ not covered. These are not provider-side hard caps.
596
647
 
597
648
  ## Shared spending reservations — Pro/Team
598
649
 
@@ -674,7 +725,7 @@ sync/async helper. No PyPI version change is required for the HTTP endpoint.
674
725
  Install the versioned SDK and the optional LangGraph extra:
675
726
 
676
727
  ```bash
677
- python -m pip install 'agenttrafficcop[langgraph]==2.2.0'
728
+ python -m pip install 'agenttrafficcop[langgraph]==2.3.0'
678
729
  ```
679
730
 
680
731
  ```python
@@ -708,15 +759,30 @@ graph = builder.compile(checkpointer=durable_saver)
708
759
  When paused, show `__interrupt__[0].value` to the authorized operator and use
709
760
  the dashboard's run-review flow to approve/reject the exact action. Resume with
710
761
  `Command(resume={"review_id": event["review_id"]})`; the resume payload itself
711
- is never authorization. The SDK queries ATC's owner-scoped review status, the
712
- adapter checks that the state/action and review ID did not change, and ATC then
713
- rechecks policy and consumes the one-action approval before the node runs. The
762
+ is never authorization. The SDK asks ATC to validate the grant against the
763
+ current detector state and exact action, then rechecks policy and consumes the
764
+ one-action approval before the node runs. The
714
765
  status API is read-only; only an authenticated dashboard owner can decide a
715
766
  review. A custom `review_approval` callback is optional and must fail closed.
716
767
 
717
- Run `python -I examples/langgraph_checkpointed_review.py` from the repository
718
- after installing `./sdk[langgraph]` for an offline walkthrough; it uses fake ATC
719
- and review services and an in-memory saver, so it is **not** a production setup.
768
+ For a complete live-service walkthrough, install the SQLite checkpointer extra
769
+ and run the safe no-op example. It pauses after repeated identical requests;
770
+ approve that exact review in the dashboard before pressing Enter. No model
771
+ provider or external tool is called:
772
+
773
+ ```bash
774
+ python -m pip install 'agenttrafficcop[langgraph]==2.3.0' 'langgraph-checkpoint-sqlite>=3.1.3,<3.2.0'
775
+ export ATC_URL='https://api.agenttrafficcop.com'
776
+ export ATC_API_KEY='your-server-issued-key'
777
+ python examples/langgraph_native_review.py
778
+ ```
779
+
780
+ The example persists LangGraph checkpoints to `atc-langgraph-checkpoints.sqlite`.
781
+ Keep that file and reuse the printed run ID plus `--resume-review-id` after a
782
+ process restart. For an offline walkthrough, run
783
+ `python -I examples/langgraph_checkpointed_review.py` from the repository; it
784
+ uses fake ATC/review services and an in-memory saver, so it is not a production
785
+ configuration.
720
786
 
721
787
  A trip creates a checkpoint with only a generic review event, session ID,
722
788
  opaque review ID and safe detector error code—never state, prompts, results or
@@ -731,7 +797,7 @@ reservations. Use direct checks for unexposed options.
731
797
  ### Legacy AutoGen
732
798
 
733
799
  ```bash
734
- python -m pip install 'agenttrafficcop[autogen]==2.2.0'
800
+ python -m pip install 'agenttrafficcop[autogen]==2.3.0'
735
801
  ```
736
802
 
737
803
  This legacy adapter supports only `pyautogen==0.2.35`, not AgentChat or AG2.
@@ -1,7 +1,7 @@
1
1
  # Short integration recipes — SDK 2.1
2
2
 
3
3
  Install the SDK and the optional OpenAI adapter with
4
- `python -m pip install 'agenttrafficcop[openai]==2.2.0'`. For editable
4
+ `python -m pip install 'agenttrafficcop[openai]==2.3.0'`. For editable
5
5
  development, clone this repository and run
6
6
  `python -m pip install -e './sdk[openai]'`
7
7
  from its root.
@@ -33,13 +33,55 @@ change. Unknown-cost exceptions retain holds; they are never settled as zero.
33
33
  Python **3.11+**:
34
34
 
35
35
  ```bash
36
- python -m pip install --upgrade 'agenttrafficcop==2.2.0'
36
+ python -m pip install --upgrade 'agenttrafficcop==2.3.0'
37
37
  python -c "from importlib.metadata import version; print(version('agenttrafficcop'))"
38
38
  ```
39
39
 
40
40
  Base dependency: `httpx>=0.27.0,<0.30.0`. Use a virtual environment; optional
41
41
  framework extras have their own requirements.
42
42
 
43
+ ## CLI setup and deployment checks
44
+
45
+ `atc init` interactively generates a small hosted Guard example, an environment
46
+ variable template, and setup notes. Choose `python` or `langgraph`; no secret is
47
+ requested or written. Review the generated files and inject `ATC_API_KEY` from
48
+ your secret manager/environment before running them:
49
+
50
+ ```bash
51
+ atc init
52
+ # Or generate without prompts:
53
+ atc init --framework python --url https://your-atc-host --output ./atc-example
54
+ ```
55
+
56
+ Generated files are not overwritten unless you explicitly pass `--force`.
57
+
58
+ For the optional provider gateway, `atc gateway init` fetches currently priced
59
+ models and generates a secret-safe `.env.example` plus run instructions. It does
60
+ not fetch or write your provider key. After loading `ATC_API_KEY` and the chosen
61
+ provider key from a secret manager or local environment, `atc gateway test`
62
+ asks before making one small real provider request; `atc gateway models` lists
63
+ available model rates. The test sets a per-run USD budget, a 512-token ceiling
64
+ and 400-token warning threshold before sending (override with `--token-limit`,
65
+ `--token-alert-at`, or the generated env vars), and limits output tokens. Provider
66
+ billing and final token usage can still exceed admission estimates. OpenAI BYOK
67
+ keys are sent only with the HTTPS request; Groq/Anthropic keys are stored in the
68
+ ATC encrypted credential vault for that ATC API key before the live test (remove
69
+ with `DELETE /v1/provider-credentials/{provider}` when no longer needed):
70
+
71
+ ```bash
72
+ atc gateway init
73
+ # Review the generated files, then load secrets into your environment.
74
+ atc gateway models --provider openai
75
+ atc gateway test # asks for confirmation; a real provider request may cost money
76
+ ```
77
+
78
+ For Kubernetes installs, `atc doctor` checks the ATC namespace/deployment,
79
+ service/endpoints, health URL, and expected agent egress policy shape. Add
80
+ `--probe-egress` to create a temporary probe pod that tests ATC reachability and
81
+ whether public TCP egress is blocked; this needs pod create/exec/delete access,
82
+ an image pull, and a NetworkPolicy-enforcing CNI. A passing policy-shape check
83
+ alone does not prove runtime enforcement.
84
+
43
85
  ## Route OpenAI calls through ATC with BYOK
44
86
 
45
87
  Install the optional OpenAI integration:
@@ -72,8 +114,9 @@ with openai_gateway_client(
72
114
  For async applications, create the client with `async_openai_gateway_client`
73
115
  and use the returned client in `async with`. Set `provider="groq"` to route compatible OpenAI SDK calls to
74
116
  the fixed Groq gateway route. The gateway currently supports text-only,
75
- non-streaming Chat Completions for configured models; configure exact model
76
- prices and an eligible run budget on ATC first. No prompts or completions are
117
+ non-streaming Chat Completions for supported priced models and requires an
118
+ eligible run budget on ATC. Its public price catalog refreshes while in use;
119
+ operator-provided prices can override it. No prompts or completions are
77
120
  added to trace telemetry.
78
121
 
79
122
  The adapter adds one operation ID to each `create` call before handing it to
@@ -531,8 +574,11 @@ raw-mode checks still transmit payloads for validation and hashing.
531
574
  ## Reported spending and run budgets — Pro/Team
532
575
 
533
576
  ```python
534
- budget = await guard.set_run_budget(session_id=run_id, budget_usd="2.00")
535
- # GuardSync: budget = guard.set_run_budget(...)
577
+ budget = await guard.set_run_budget(
578
+ session_id=run_id, budget_usd="2.00",
579
+ token_limit=100_000, token_alert_at=80_000,
580
+ )
581
+ # GuardSync accepts the same keyword options.
536
582
  ```
537
583
 
538
584
  Setting a budget does not connect provider billing. An authorized backend must
@@ -541,9 +587,14 @@ requests. Use matching key/session attribution and stable unique event IDs;
541
587
  never report cumulative run totals or duplicate spending across integrations.
542
588
 
543
589
  Run budgets are **API key + session** scoped. Rolling thresholds cover a key's
544
- reported costs over 60 seconds. Updating budgets preserves spending; a new run
545
- needs a new session ID. Delayed reports, unguarded actions and in-flight work can
546
- overshoot. These are not provider-side hard caps.
590
+ reported costs over 60 seconds. Optional `token_limit` and `token_alert_at`
591
+ settings apply to actual provider-reported gateway token use for that run. Alert
592
+ crossings are retained in run budget history and shown in the dashboard; new
593
+ gateway reservations are rejected if their input estimate plus maximum output
594
+ would exceed the remaining ceiling. Updating budgets preserves spending; a new
595
+ run needs a new session ID. Byte-based input estimates are not exact token counts,
596
+ already in-flight requests can finish, and direct calls outside the gateway are
597
+ not covered. These are not provider-side hard caps.
547
598
 
548
599
  ## Shared spending reservations — Pro/Team
549
600
 
@@ -625,7 +676,7 @@ sync/async helper. No PyPI version change is required for the HTTP endpoint.
625
676
  Install the versioned SDK and the optional LangGraph extra:
626
677
 
627
678
  ```bash
628
- python -m pip install 'agenttrafficcop[langgraph]==2.2.0'
679
+ python -m pip install 'agenttrafficcop[langgraph]==2.3.0'
629
680
  ```
630
681
 
631
682
  ```python
@@ -659,15 +710,30 @@ graph = builder.compile(checkpointer=durable_saver)
659
710
  When paused, show `__interrupt__[0].value` to the authorized operator and use
660
711
  the dashboard's run-review flow to approve/reject the exact action. Resume with
661
712
  `Command(resume={"review_id": event["review_id"]})`; the resume payload itself
662
- is never authorization. The SDK queries ATC's owner-scoped review status, the
663
- adapter checks that the state/action and review ID did not change, and ATC then
664
- rechecks policy and consumes the one-action approval before the node runs. The
713
+ is never authorization. The SDK asks ATC to validate the grant against the
714
+ current detector state and exact action, then rechecks policy and consumes the
715
+ one-action approval before the node runs. The
665
716
  status API is read-only; only an authenticated dashboard owner can decide a
666
717
  review. A custom `review_approval` callback is optional and must fail closed.
667
718
 
668
- Run `python -I examples/langgraph_checkpointed_review.py` from the repository
669
- after installing `./sdk[langgraph]` for an offline walkthrough; it uses fake ATC
670
- and review services and an in-memory saver, so it is **not** a production setup.
719
+ For a complete live-service walkthrough, install the SQLite checkpointer extra
720
+ and run the safe no-op example. It pauses after repeated identical requests;
721
+ approve that exact review in the dashboard before pressing Enter. No model
722
+ provider or external tool is called:
723
+
724
+ ```bash
725
+ python -m pip install 'agenttrafficcop[langgraph]==2.3.0' 'langgraph-checkpoint-sqlite>=3.1.3,<3.2.0'
726
+ export ATC_URL='https://api.agenttrafficcop.com'
727
+ export ATC_API_KEY='your-server-issued-key'
728
+ python examples/langgraph_native_review.py
729
+ ```
730
+
731
+ The example persists LangGraph checkpoints to `atc-langgraph-checkpoints.sqlite`.
732
+ Keep that file and reuse the printed run ID plus `--resume-review-id` after a
733
+ process restart. For an offline walkthrough, run
734
+ `python -I examples/langgraph_checkpointed_review.py` from the repository; it
735
+ uses fake ATC/review services and an in-memory saver, so it is not a production
736
+ configuration.
671
737
 
672
738
  A trip creates a checkpoint with only a generic review event, session ID,
673
739
  opaque review ID and safe detector error code—never state, prompts, results or
@@ -682,7 +748,7 @@ reservations. Use direct checks for unexposed options.
682
748
  ### Legacy AutoGen
683
749
 
684
750
  ```bash
685
- python -m pip install 'agenttrafficcop[autogen]==2.2.0'
751
+ python -m pip install 'agenttrafficcop[autogen]==2.3.0'
686
752
  ```
687
753
 
688
754
  This legacy adapter supports only `pyautogen==0.2.35`, not AgentChat or AG2.
@@ -33,10 +33,20 @@ operation ID through ATC's `/v2` gateway. OpenAI SDK internal retries reuse the
33
33
  same operation ID; pass a persisted ID explicitly for application retries after
34
34
  process restarts. OpenAI and Groq non-streaming Chat Completions are supported;
35
35
  this helper does not intercept other clients, frameworks, or Anthropic calls.
36
- Install `agenttrafficcop[openai]`. The gateway requires configured model prices
37
- and an eligible run budget. For direct-egress blocking, use the opt-in
38
- self-hosted Compose setup in `../deploy/EGRESS_LOCKED.md`; it does not apply to
39
- hosted Render or arbitrary external workloads.
36
+ Install `agenttrafficcop[openai]`. The gateway uses the refreshable public
37
+ model-price catalog (with operator overrides) and requires an eligible run
38
+ budget. Optional `token_limit` / `token_alert_at` settings on the API-key +
39
+ run budget reject gateway reservations near the cumulative ceiling and record
40
+ threshold events in the run history/dashboard. Admission uses actual provider
41
+ input token counting where supported or a byte-based estimate plus requested
42
+ maximum output tokens; provider-reported usage settles the total. The ceiling is
43
+ not an exact tokenizer or provider-side cap, and in-flight work may overshoot.
44
+ In SDK 2.3.0, `atc gateway init` generates secret-safe setup files,
45
+ `atc gateway models` lists catalog prices, and `atc gateway test` confirms before
46
+ sending one small real provider request. That request may incur charges; the run
47
+ budget is not a guaranteed provider billing cap. For direct-egress blocking,
48
+ use the opt-in self-hosted Compose setup in `../deploy/EGRESS_LOCKED.md`; it
49
+ does not apply to hosted Render or arbitrary external workloads.
40
50
 
41
51
  # Simpler setup — SDK 1.7.0
42
52
 
@@ -39,7 +39,7 @@ except ImportError:
39
39
  AgentTrafficCopCallback = None
40
40
 
41
41
  # Bumped for the new schema hashing, langgraph async fix, and AtcConnectionError rename
42
- __version__ = "2.2.0"
42
+ __version__ = "2.3.0"
43
43
 
44
44
  __all__ = [
45
45
  "__version__",