Skip to content

Commit 9c877bb

Browse files
readme update (#27)
Update README to fix broken URLs and clarify examples.
1 parent 467aa88 commit 9c877bb

3 files changed

Lines changed: 21 additions & 23 deletions

File tree

CHANGELOG.md

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,8 @@
11
# Changelog
22

3+
## 0.2.1 (2026-07-01)
4+
Update to README
5+
36
## [0.2.0](https://github.com/circlefin/circle-ooak/compare/v0.1.0...v0.2.0) (2026-07-01)
47

58

@@ -31,10 +34,3 @@
3134
* **TECHOPS-19100:** fix ci ([#10](https://github.com/circlefin/circle-ooak/issues/10)) ([552bde8](https://github.com/circlefin/circle-ooak/commit/552bde8416413efe214eb20562e55d70a3fbe1a9))
3235
* **TECHOPS-19100:** switch to public worfklow tokens ([#11](https://github.com/circlefin/circle-ooak/issues/11)) ([d0ac119](https://github.com/circlefin/circle-ooak/commit/d0ac119acd17584b1cac9c0f58e08c524be01385))
3336

34-
## 0.2.0 (2026-06-30)
35-
This API breaking change closes a security vulnerability by adding intent verification during execution.
36-
37-
* **API breaking change** Tools no longer need to take `wfid` as an argument.
38-
* **Security fix** Fixed vulnerability that allowed LLM to mix-and-match `wfid` and `intent`. This is now checked and enforced by OOAK framework.
39-
* **Tool failure support** The SecurityContext can supply an optional `on_invoke_tool_failure` hook that runs when a tool raises an exception.
40-
* **Added `bind_to_instance` on `InstanceAgent`** — optional runtime object id for instance identity to avoid name collisions across agents.

README.md

Lines changed: 17 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -13,26 +13,27 @@ This project creates an extension to the OpenAI Agents SDK.
1313

1414
- The `@agent_tool` decorator can be used with object instance methods instead of `@function_tool` which only
1515
supports static functions.
16-
- The `@secure_tool` decorator can be used instead of the `@agent_tool` decorator
16+
- The `@secure_tool` decorator can be used instead of the `@agent_tool` decorator
1717
to add before/after hooks to your tool code.
18-
- An `InstanceAgent` that can use `@agent_tool` and `@secure_tool`. An `InstanceAgent` is a subclass of
18+
- An `InstanceAgent` subclass that can use `@agent_tool` and `@secure_tool`. An `InstanceAgent` is a subclass of
1919
a regular OpenAI Agents SDK `Agent` and can interact with other agents via handoffs and guardrails.
2020

2121

2222
This package includes a `WorkflowManager` that implements the abstract `SecureContext`,
2323
that checks that intended actions have been approved.
2424

2525
1. Create intent. The agent calls the @secure_tool function with `wfid=None` argument. Instead of
26-
executing the function, it returns an intent: a json representation of the function call.
27-
2. Get Approval. The agent calls the WorkflowManager with a list of intents. The manager invokes `get_approval()` (which you override to connect your UX or policy) and, if approved, returns a WorkflowId.
28-
3. Execute. The agent now calls the @secure_tools in the correct order with the WorkflowId. The
26+
executing the function, it returns an intent: a JSON representation of the function call.
27+
2. Get approval. The agent calls the WorkflowManager with a list of intents. The manager invokes `get_approval()` (which you override to connect your UX or policy) and, if approved, returns a `wfid`.
28+
3. Execute. The agent now calls the @secure_tools in the correct order with the `wfid`. The
2929
WorkflowManager ensures that each subsequent function call matches the approved workflow.
3030

31-
Sample code can be found at `https://github.com/circlefin/circle-ooak/example`
31+
Sample code can be found at https://github.com/circlefin/circle-ooak/tree/master/example
3232

3333
Below is an example of a `WalletWorkflowAgent`.
3434

3535
```python
36+
from agents import function_tool, RunContextWrapper, OpenAIChatCompletionsModel
3637
from circle_ooak.instance_agent import InstanceAgent
3738
from circle_ooak.secure_tool import secure_tool
3839
from circle_ooak.workflow_manager import WorkflowManager
@@ -41,11 +42,11 @@ class WalletWorkflowAgent(InstanceAgent):
4142
instructions = """
4243
You help users execute Ethereum transactions. Do the following steps to help the user:
4344
1. Create a workflow of intents by calling each secure tool with wfid=None to get the intents
44-
2. Call approve_workflow with the list of intents to get a workflow id
45-
3. Execute the workflow by calling each secure tool again. You MUST include the wfid parameter with the workflow id you got in step 2.
45+
2. Call approve_workflow with the list of intents to get a wfid
46+
3. Execute the workflow by calling each secure tool again. You MUST include the wfid parameter with the wfid you got in step 2.
4647
4. Print the final tx hash for every transaction.
4748
48-
You do not need approval from the user to execute a workflow if you have the workflow id.
49+
You do not need approval from the user to execute a workflow if you have the wfid.
4950
"""
5051
def __init__(self, name: str, model: OpenAIChatCompletionsModel, wallets: dict[str, Wallet]):
5152
self.wallets = wallets
@@ -56,8 +57,8 @@ class WalletWorkflowAgent(InstanceAgent):
5657
@function_tool
5758
def approve_workflow(ctxt: RunContextWrapper[WorkflowManager], workflow: list[str]):
5859
"""Approve a workflow of secure tool calls.
59-
workflow: a list of intents (json strings).
60-
returns: a string with the workflow id
60+
workflow: a list of intents (JSON strings).
61+
returns: a string with the wfid
6162
"""
6263
manager = ctxt.context
6364
response = manager.approve(workflow)
@@ -131,7 +132,7 @@ Install the `circle-ooak` package and other dependencies:
131132

132133
```shell
133134
pip install circle-ooak
134-
pip install dotenv openai openai-agents
135+
pip install python-dotenv openai openai-agents
135136
```
136137

137138
Alternatively, you can clone the GitHub Repo and install using
@@ -151,7 +152,7 @@ python -m venv .venv
151152
# activate the environment
152153
source .venv/bin/activate
153154

154-
# de-activate the environment
155+
# deactivate the environment
155156
deactivate
156157
```
157158

@@ -163,7 +164,7 @@ Create an `.env` file. You must obtain an OpenAI API key.
163164
OPENAI_API_KEY=api_key_goes_here
164165

165166
# URL to connect to OpenAI
166-
OPENAI_URL=https://api.openai.com/v1/models
167+
OPENAI_URL=https://api.openai.com/v1
167168

168169
# OpenAI model to use
169170
OPENAI_MODEL=gpt-4o
@@ -177,6 +178,7 @@ You must setup your LLM using the `.env` file to run the demo.
177178
git clone http://github.com/circlefin/circle-ooak
178179
cd circle-ooak
179180
pip install -r requirements.txt
181+
pip install circle-ooak
180182

181183
# To run a Wallet Workflow Agent
182184
python example/run_agent.py
@@ -238,7 +240,7 @@ Each `@secure_tool` execution with a `wfid` uses three hooks:
238240
### Instance identity in intents
239241
OOAK needs a way to uniquely identify agents for approval. There are two choices:
240242
- **by name**. When an `InstanceAgent` is initialized with `bind_to_instance=False`, then OOAK identifies the agent using the `name` supplied during object creation. This creates a stable name across restarts.
241-
- ** by object reference**. When an `InstanceAgent` is initialized with `bind_to_instance=True`, then OOAK identifies the agent
243+
- **by object reference**. When an `InstanceAgent` is initialized with `bind_to_instance=True`, then OOAK identifies the agent
242244
using the run-time object identifier. This prevents any naming collisions. Agents have new ids after every restart.
243245

244246
### Side effects and workflow state

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[project]
22
name = "circle-ooak"
3-
version = "0.2.0"
3+
version = "0.2.1"
44
authors = [
55
{ name="Mira Belenkiy", email="mira.belenkiy@circle.com" },
66
]

0 commit comments

Comments
 (0)