@handlebar/governance-schema 0.1.1-beta.1 → 0.2.0

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 (3) hide show
  1. package/README.md +86 -16
  2. package/dist/index.js +1 -6
  3. package/package.json +1 -1
package/README.md CHANGED
@@ -1,24 +1,94 @@
1
- # Handlebar Governance Schema
1
+ # Handlebar, Agent Control Layer
2
2
 
3
- Schemas and types for [Handlebar] rules.
3
+ [Handlebar] is a runtime control layer for your AI agents.
4
4
 
5
- ## Getting started
5
+ Enforce deterministic rules on your agents as they act,
6
+ so you can guarantee they don't violate your team's policies.
6
7
 
7
- This package should be used alongside a framework-specific Handlebar SDK,
8
- such as [ai-sdk-v5](https://github.com/gethandlebar/handlebar-js/blob/main/packages/ai-sdk-v5/).
9
- Refer to that package's README for more information.
8
+ This package provides the policy and event types that Handlebar manages.
10
9
 
11
- ## Contributing
10
+ | Without Handlebar | With Handlebar |
11
+ |:------|:------|
12
+ | "Whoops the agent deleted prod DB" | Deterministically block dangerous tool actions. Full auditability into what your agent _tried_ to do. |
13
+ | "Our costs are ballooning with no way to control them" | Track token usage and USD spend, and set hard limits on your agents. When the limit is reached, Handlebar can block the agent from taking further actions. |
14
+ | "Someone convinced the agent to leak another user's emails" | Limit tool permissions to the user. |
15
+ | "The agent is going off-the-rails and spamming heavy APIs" | Set rate limits on tool use and prevent runaway actions |
16
+ | "We can't be sure the agent isn't leaking sensitive data" | Enforce hard data boundaries between tools and your output. Filter PII before it leaks through agent context |
12
17
 
13
- We welcome contributions from the community: bug reports, feedback, feature requests
14
- Please refer to [CONTRIBUTING.md][root_contributing]
15
- for ways you can help,
16
- and guidelines.
18
+ ## Features
17
19
 
18
- ## About Handlebar
20
+ - Collects auditable event logs of your agent's actions
21
+ - Block dangerous tools use (e.g. `send_email(internalAddress) -> PASS | send_email(unknownperson@randomaddress.ru) -> BLOCK`)
22
+ - Block dangerous tool chaining (e.g. `get_pii` -> `send_slack_message -> BLOCK: risk of data exfil`)
23
+ - Require human reviews on dangerous actions
24
+ - Enforce hard cost budgets and token usage limits for your agents
25
+ - Track usage from each enduser and enforce per-user budgets
26
+ - Rate limit agent actions
19
27
 
20
- Find out more at [https://gethandlebar.com][handlebar]
28
+ ## How it works
21
29
 
22
- [handlebar]: https://gethandlebar.com
23
- [root_contributing]: https://github.com/gethandlebar/handlebar-js/blob/main/CONTRIBUTING.md
24
- [discord_invite]: https://discord.gg/Q6xwvccg
30
+ 1. Wrap a Handlebar client (this codebase) around your agent
31
+ 1. The client sends event logs of your agent's actions to the [Handlebar platform][platform], where you can analyse them
32
+ 1. As your agent receives an action from the LLM, Handlebar intercepts and evaluates the proposed action against your configured policies
33
+ 1. If there are violations, Handlebar either permits the action, blocks it, or exits the run
34
+
35
+ ## Get started
36
+
37
+ You will need:
38
+
39
+ - an agent...
40
+ - Wrap your agent with a Handlebar client
41
+ - Connect to the [Handlebar platform][platform]
42
+ - Configure policies to enforce on your agent
43
+
44
+ ### Wrap your agent with Handlebar
45
+
46
+ This repository is a monorepo containing installable packages
47
+ for different JS/TS agent building frameworks. We provide some pre-built wrappers for agent frameworks,
48
+ with more on the way soon. If your agent is not directly supported, you can still easily plug Handlebar into your agent.
49
+
50
+ | Framework | Install command | Where to read more |
51
+ |:---:|:---:|:---:|
52
+ | Vercel ai **Version 5** | `bun i @handlebar/ai-sdk-v5` | [Vercel AI integration guide](../docs/integrations/vercel-ai-sdk.md) |
53
+ | Vercel ai **Version >=6** | Soon... | |
54
+ | Langchain | Soon... it's still being tested 😕 | See the [langchain integration guide](../docs/integrations/langchain.md) |
55
+ | Openai agents | `bun i @handlebar/core` | See the [OpenAI integration guide](../docs/integrations/openai-agents.md)
56
+ | Other JS/TS, and custom agents | `bun i @handlebar/core` | [`packages/core`](../packages/core) |
57
+ | Python agents | Soon... | |
58
+
59
+ ### Connect your agent to the Handlebar platform
60
+
61
+ The client SDKs interact with the Handlebar API to emit agent telemetry and event data it collects,
62
+ and to evaluate your configured policies.
63
+
64
+ Sign up at [`https://app.gethandlebar.com`][platform].\
65
+ If you are waitlisted, [get in touch](#get-in-touch) with us to get access.
66
+
67
+ Once on the platform, create an API key and activate your agent by setting the `HANDLEBAR_API_KEY` environment variable.
68
+
69
+ ### Configure policies to enforce on your agent
70
+
71
+ On the [platform] you can create policies from simple templates: usage limits, dangerous tool use, GDPR, finance agents, and more.
72
+
73
+ Alternatively, run the Handlebar claude code skill to generate rules custom to your agent, by running:
74
+
75
+ ```bash
76
+ npx skills add gethandlebar/agent-skills
77
+ ```
78
+
79
+ Go to the [skill repository](https://github.com/gethandlebar/agent-skills)
80
+ for full instructions.
81
+
82
+ ## Get in touch
83
+
84
+ Please [open an issue](https://github.com/gethandlebar/handlebar-js/issues/new) if you have any feedback, suggestions, or requests for framework support.
85
+ Alternatively, [book a call][calendar] to talk to us about how Handlebar could help to protect your team's agents.
86
+
87
+ ## License
88
+
89
+ Apache 2.0 [`LICENSE`](../LICENSE).
90
+
91
+ [handlebar]: https://www.gethandlebar.com
92
+ [platform]: https://app.gethandlebar.com
93
+ [calendar]: https://calendly.com/arjun-handlebar/30min
94
+ [docs]: https://handlebar.mintlify.app
package/dist/index.js CHANGED
@@ -13785,12 +13785,7 @@ var RunStartedEventSchema = AuditEnvelopeSchema.extend({
13785
13785
  var RunEndedEventSchema = AuditEnvelopeSchema.extend({
13786
13786
  kind: exports_external.literal("run.ended"),
13787
13787
  data: exports_external.object({
13788
- status: exports_external.enum([
13789
- "error",
13790
- "success",
13791
- "timeout",
13792
- "interrupted"
13793
- ]),
13788
+ status: exports_external.enum(["error", "success", "timeout", "interrupted"]),
13794
13789
  totalSteps: exports_external.number().min(0),
13795
13790
  summary: exports_external.string().optional()
13796
13791
  })
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@handlebar/governance-schema",
3
- "version": "0.1.1-beta.1",
3
+ "version": "0.2.0",
4
4
  "private": false,
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",