budget-agent 0.4.3 → 0.4.4
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.
- package/README.md +5 -5
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
#
|
|
1
|
+
# agent-budget
|
|
2
2
|
|
|
3
|
-
Budget-aware enforcement layer for LLM agents. Track token, cost, and step usage in real time
|
|
3
|
+
Budget-aware enforcement layer for LLM agents. Track token, cost, and step usage in real time. Enforce limits before and after every LLM call. Works with any provider.
|
|
4
4
|
|
|
5
5
|
```
|
|
6
|
-
npm install
|
|
6
|
+
npm install budget-agent
|
|
7
7
|
```
|
|
8
8
|
|
|
9
9
|
## Quick start
|
|
@@ -11,7 +11,7 @@ npm install @painitehq/agent-budget
|
|
|
11
11
|
You bring your own API key and model. The SDK calls your provider.
|
|
12
12
|
|
|
13
13
|
```ts
|
|
14
|
-
import { AgentBudget } from '
|
|
14
|
+
import { AgentBudget } from 'budget-agent';
|
|
15
15
|
|
|
16
16
|
const agent = new AgentBudget({
|
|
17
17
|
apiKey: process.env.OPENROUTER_API_KEY,
|
|
@@ -138,7 +138,7 @@ The router downgrades the model tier as the budget depletes. Each `step()` check
|
|
|
138
138
|
Use any LLM provider — OpenAI, Anthropic, Ollama, local models, or the OpenRouter Agent SDK:
|
|
139
139
|
|
|
140
140
|
```ts
|
|
141
|
-
import { AgentBudget } from '
|
|
141
|
+
import { AgentBudget } from 'budget-agent';
|
|
142
142
|
import OpenAI from 'openai';
|
|
143
143
|
|
|
144
144
|
const openai = new OpenAI({ apiKey: process.env.OPENAI_API_KEY });
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "budget-agent",
|
|
3
|
-
"version": "0.4.
|
|
3
|
+
"version": "0.4.4",
|
|
4
4
|
"description": "Provider-agnostic budget enforcement SDK for LLM agents. Track token/cost/step usage, enforce limits, auto-compress, circuit-breaker, checkpoints, adaptive routing, and more.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.js",
|