agentcogs 0.3.0__tar.gz → 0.3.1__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 (36) hide show
  1. {agentcogs-0.3.0 → agentcogs-0.3.1}/.gitignore +2 -0
  2. {agentcogs-0.3.0 → agentcogs-0.3.1}/PKG-INFO +8 -3
  3. {agentcogs-0.3.0 → agentcogs-0.3.1}/PYPI.md +7 -2
  4. agentcogs-0.3.1/src/agentcogs/_version.py +1 -0
  5. agentcogs-0.3.0/src/agentcogs/_version.py +0 -1
  6. {agentcogs-0.3.0 → agentcogs-0.3.1}/LICENSE +0 -0
  7. {agentcogs-0.3.0 → agentcogs-0.3.1}/pyproject.toml +0 -0
  8. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/__init__.py +0 -0
  9. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/__main__.py +0 -0
  10. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/_shekel_compat.py +0 -0
  11. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/assistant.py +0 -0
  12. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/budget.py +0 -0
  13. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/cli.py +0 -0
  14. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/client.py +0 -0
  15. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/config.py +0 -0
  16. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/context.py +0 -0
  17. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/data/price_book_fixture_v1.json +0 -0
  18. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/errors.py +0 -0
  19. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/instrument.py +0 -0
  20. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/integrations/__init__.py +0 -0
  21. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/integrations/fastapi.py +0 -0
  22. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/integrations/langgraph.py +0 -0
  23. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/integrations/litellm_event.py +0 -0
  24. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/kernel/__init__.py +0 -0
  25. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/kernel/attribute.py +0 -0
  26. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/kernel/money.py +0 -0
  27. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/localhttp.py +0 -0
  28. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/localstore.py +0 -0
  29. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/outbox.py +0 -0
  30. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/ping.py +0 -0
  31. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/provenance.py +0 -0
  32. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/provider_watch.py +0 -0
  33. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/reports.py +0 -0
  34. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/shutdown.py +0 -0
  35. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/star.py +0 -0
  36. {agentcogs-0.3.0 → agentcogs-0.3.1}/src/agentcogs/tokens.py +0 -0
@@ -11,6 +11,8 @@ venv/
11
11
  .env.*
12
12
  !.env.example
13
13
  !**/.env.example
14
+ !.env.selfhost.example
15
+ !.env.deploy.local.example
14
16
  .pytest_cache/
15
17
  .mypy_cache/
16
18
  .ruff_cache/
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: agentcogs
3
- Version: 0.3.0
3
+ Version: 0.3.1
4
4
  Summary: Customer-level AI unit economics. Compare each customer's LLM cost with their monthly fee
5
5
  Project-URL: Homepage, https://agentcogs.vercel.app
6
6
  Project-URL: Repository, https://github.com/vaibhav11123/agentcogs
@@ -85,7 +85,9 @@ The SDK does not call a model. Inside the block, an OpenAI or Anthropic call is
85
85
 
86
86
  ## What the budget check does
87
87
 
88
- Enforcement stays off until the workspace turns it on. While it is off, an exceeded `monthly_budget_usd` does not stop the next `run()`. When the workspace turns enforcement on, an exceeded budget raises `CustomerBudgetExceededError` and does not enter the block. Two calls already in flight can both pass. It is not an atomic reservation. A LiteLLM callback records cost after the provider has already answered, so it cannot stop that call.
88
+ Enforcement stays off until the workspace turns it on. While it is off, an exceeded `monthly_budget_usd` does not stop the next `run()`. When the workspace turns enforcement on, an exceeded budget raises `CustomerBudgetExceededError` and does not enter the block. A LiteLLM callback records cost after the provider has already answered, so it cannot stop that call.
89
+
90
+ On the self-hosted API, `POST /v1/admissions` reserves under `run_id` so concurrent estimates past the cap cannot both return `ok`. `GET /v1/budget` only reads. After a Redis restart, enforcing admission waits until holds rebuild from Postgres. `agentcogs compare` checks cost per successful task against a baseline. See [budget-semantics](https://github.com/vaibhav11123/agentcogs/blob/main/docs/budget-semantics.md) and the [walkthrough](https://github.com/vaibhav11123/agentcogs/blob/main/WALKTHROUGH.md).
89
91
 
90
92
  LiteLLM does not ship the callback. You copy it from the repository. The FastAPI middleware is a separate extra: `pip install "agentcogs[integrations]"`.
91
93
 
@@ -108,8 +110,11 @@ LiteLLM does not ship the callback. You copy it from the repository. The FastAPI
108
110
 
109
111
  ## Documentation
110
112
 
113
+ - [Walkthrough](https://github.com/vaibhav11123/agentcogs/blob/main/WALKTHROUGH.md)
114
+ - [Architecture](https://github.com/vaibhav11123/agentcogs/blob/main/ARCHITECTURE.md)
111
115
  - [Quickstart](https://github.com/vaibhav11123/agentcogs/blob/main/docs/quickstart.md)
112
116
  - [Self-host](https://github.com/vaibhav11123/agentcogs/blob/main/docs/DEPLOY.md)
117
+ - [Budget semantics](https://github.com/vaibhav11123/agentcogs/blob/main/docs/budget-semantics.md)
113
118
  - [Customer id](https://github.com/vaibhav11123/agentcogs/blob/main/docs/concepts/customer-id.md)
114
119
  - [Docs index](https://github.com/vaibhav11123/agentcogs/blob/main/docs/README.md)
115
120
  - [Repository README](https://github.com/vaibhav11123/agentcogs/blob/main/README.md)
@@ -118,5 +123,5 @@ LiteLLM does not ship the callback. You copy it from the repository. The FastAPI
118
123
 
119
124
  ## What is not guaranteed
120
125
 
121
- A match against the provider invoice, refunds, credits, discounts, currency conversion, and a hard stop when two calls pass the pre-check together. Development status is Beta: the SDK surface is `init`, `set_customer`, `run`, `ping`, and `shutdown`, and a hosted API is not part of this release.
126
+ A match against the provider invoice, refunds, credits, discounts, currency conversion, linearizability, exactly-once delivery, or a hard spend cap unless the estimate is an upper bound and holds survived Redis loss. Two callers that only use the old pre-check can both pass; use admissions for a concurrent reserve. Development status is Beta: the SDK surface is `init`, `set_customer`, `run`, `ping`, `shutdown`, and `compare`, and a hosted API is not part of this release.
122
127
 
@@ -54,7 +54,9 @@ The SDK does not call a model. Inside the block, an OpenAI or Anthropic call is
54
54
 
55
55
  ## What the budget check does
56
56
 
57
- Enforcement stays off until the workspace turns it on. While it is off, an exceeded `monthly_budget_usd` does not stop the next `run()`. When the workspace turns enforcement on, an exceeded budget raises `CustomerBudgetExceededError` and does not enter the block. Two calls already in flight can both pass. It is not an atomic reservation. A LiteLLM callback records cost after the provider has already answered, so it cannot stop that call.
57
+ Enforcement stays off until the workspace turns it on. While it is off, an exceeded `monthly_budget_usd` does not stop the next `run()`. When the workspace turns enforcement on, an exceeded budget raises `CustomerBudgetExceededError` and does not enter the block. A LiteLLM callback records cost after the provider has already answered, so it cannot stop that call.
58
+
59
+ On the self-hosted API, `POST /v1/admissions` reserves under `run_id` so concurrent estimates past the cap cannot both return `ok`. `GET /v1/budget` only reads. After a Redis restart, enforcing admission waits until holds rebuild from Postgres. `agentcogs compare` checks cost per successful task against a baseline. See [budget-semantics](https://github.com/vaibhav11123/agentcogs/blob/main/docs/budget-semantics.md) and the [walkthrough](https://github.com/vaibhav11123/agentcogs/blob/main/WALKTHROUGH.md).
58
60
 
59
61
  LiteLLM does not ship the callback. You copy it from the repository. The FastAPI middleware is a separate extra: `pip install "agentcogs[integrations]"`.
60
62
 
@@ -77,8 +79,11 @@ LiteLLM does not ship the callback. You copy it from the repository. The FastAPI
77
79
 
78
80
  ## Documentation
79
81
 
82
+ - [Walkthrough](https://github.com/vaibhav11123/agentcogs/blob/main/WALKTHROUGH.md)
83
+ - [Architecture](https://github.com/vaibhav11123/agentcogs/blob/main/ARCHITECTURE.md)
80
84
  - [Quickstart](https://github.com/vaibhav11123/agentcogs/blob/main/docs/quickstart.md)
81
85
  - [Self-host](https://github.com/vaibhav11123/agentcogs/blob/main/docs/DEPLOY.md)
86
+ - [Budget semantics](https://github.com/vaibhav11123/agentcogs/blob/main/docs/budget-semantics.md)
82
87
  - [Customer id](https://github.com/vaibhav11123/agentcogs/blob/main/docs/concepts/customer-id.md)
83
88
  - [Docs index](https://github.com/vaibhav11123/agentcogs/blob/main/docs/README.md)
84
89
  - [Repository README](https://github.com/vaibhav11123/agentcogs/blob/main/README.md)
@@ -87,5 +92,5 @@ LiteLLM does not ship the callback. You copy it from the repository. The FastAPI
87
92
 
88
93
  ## What is not guaranteed
89
94
 
90
- A match against the provider invoice, refunds, credits, discounts, currency conversion, and a hard stop when two calls pass the pre-check together. Development status is Beta: the SDK surface is `init`, `set_customer`, `run`, `ping`, and `shutdown`, and a hosted API is not part of this release.
95
+ A match against the provider invoice, refunds, credits, discounts, currency conversion, linearizability, exactly-once delivery, or a hard spend cap unless the estimate is an upper bound and holds survived Redis loss. Two callers that only use the old pre-check can both pass; use admissions for a concurrent reserve. Development status is Beta: the SDK surface is `init`, `set_customer`, `run`, `ping`, `shutdown`, and `compare`, and a hosted API is not part of this release.
91
96
 
@@ -0,0 +1 @@
1
+ __version__ = "0.3.1"
@@ -1 +0,0 @@
1
- __version__ = "0.3.0"
File without changes
File without changes