Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
49 commits
Select commit Hold shift + click to select a range
3ac6e7a
merge into altk
boazdavid Dec 2, 2025
ec34c8b
continue merge
boazdavid Dec 3, 2025
7e77578
toolguard readme
boazdavid Dec 3, 2025
86d252f
readme
boazdavid Dec 3, 2025
91936c9
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com> I, DAVID …
boazdavid Dec 3, 2025
640ea37
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Dec 3, 2025
6b5c9dc
tg config\n Signed-off-by: DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Dec 4, 2025
f94d016
tg fix. Signed-off-by: DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Dec 4, 2025
d2cd389
tg fix
boazdavid Dec 4, 2025
f043eb6
tg fix
boazdavid Dec 4, 2025
a4df630
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Dec 7, 2025
deaa9a0
Merge branch 'main' into main
boazdavid Dec 7, 2025
ec005bc
toolguard oss
boazdavid Dec 9, 2025
1e663e1
Merge branch 'main' of https://github.com/boazdavid/agent-lifecycle-t…
boazdavid Dec 9, 2025
ce0bd8a
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Dec 9, 2025
62ec802
fix PR comments
boazdavid Dec 14, 2025
c5864af
Merge remote-tracking branch 'upstream/main'
boazdavid Dec 21, 2025
10b325f
fix merge
boazdavid Dec 21, 2025
1a6d9bc
fix merge
boazdavid Dec 21, 2025
b9c6571
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Dec 21, 2025
f4ef5c0
fix test
boazdavid Dec 25, 2025
6738fcb
toolguard extra
boazdavid Dec 25, 2025
f4dc759
Merge remote-tracking branch 'upstream/main'
boazdavid Dec 25, 2025
c54078d
closed models only
boazdavid Dec 25, 2025
c1f6a2e
toolguard dev
boazdavid Dec 29, 2025
ef00372
readme
boazdavid Dec 30, 2025
3f8f9fb
toolguard
boazdavid Dec 30, 2025
4ea9d5f
llm clients
boazdavid Jan 1, 2026
2368f47
revert get_model_id()
boazdavid Jan 8, 2026
6ac6f32
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Jan 8, 2026
5f7e2f9
toolguard runtime
boazdavid Jan 11, 2026
86dbd46
remove mellea old
boazdavid Jan 11, 2026
67b4f77
toolguard formatting
boazdavid Jan 12, 2026
6ecdaed
secrets and uv.lock
boazdavid Jan 12, 2026
5e14de9
readme installation
boazdavid Jan 14, 2026
4e9f315
Merge remote-tracking branch 'upstream/main'
boazdavid Jan 14, 2026
7201b89
fix async runtime
boazdavid Jan 25, 2026
228f8c3
fix reformat, and uv.lock
boazdavid Jan 25, 2026
4b47423
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Jan 25, 2026
e02f4bb
fix toolguard code component
boazdavid Jan 29, 2026
56761e9
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Jan 29, 2026
0f443fa
toolguard version 0.2.7
boazdavid Jan 29, 2026
b57a5ea
add documentation
boazdavid Jan 29, 2026
4a6a085
Merge branch 'main' into toolguard_020
boazdavid Feb 3, 2026
3571771
toolguard comply with py 3.10
boazdavid Feb 8, 2026
3c1f5dd
Merge remote-tracking branch 'upstream/main' into toolguard_020
boazdavid Feb 8, 2026
faefb99
DCO Remediation Commit for DAVID BOAZ <DAVIDBO@il.ibm.com>
boazdavid Feb 8, 2026
5ff6608
update llm
boazdavid Feb 9, 2026
f5ecf53
toolguard long
boazdavid Feb 12, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion altk/pre_tool/toolguard/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ uv pip install "agent-lifecycle-toolkit[toolguard]"
```

## ToolGuardSpecComponent
This component gets a set of tools and a policy document and generates multiple ToolGuard specifications, known as `ToolGuardSpec`s. Each specification is attached to a tool, and it declares a precondition that must apply before invoking the tool. The specification has a `name`, `description`, list of `references` to the original policy document, a set of declarative `compliance_examples`, describing test cases that the toolGuard should allow the tool invocation, and `violation_examples`, where the toolGuard should raise an exception.
This component gets a set of tools and a policy document and generates multiple ToolGuard specifications, known as `ToolGuardSpec`s. Each specification is attached to a tool, and it declares a precondition that must apply before invoking the tool. The specification has a `name`, `description`, list of `references` to the original policy document, a set of declarative `compliance_examples`, describing test cases that the toolGuard should allow the tool invocation, and `violation_examples`, where the toolGuard should raise a PolicyViolationException.

This component supports only a `build` phase. The generated specifications are returned as output, and are also saved to a specified file system directory.
The specifications are aimed to be used as input into our next component - the `ToolGuardCodeComponent` described below.
Expand Down
8 changes: 5 additions & 3 deletions altk/pre_tool/toolguard/llm_client.py
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
from typing import Union, cast
from toolguard.buildtime.llm.tg_litellm import LanguageModelBase
from toolguard.buildtime.llm import LanguageModelBase
from altk.core.llm.types import GenerationArgs
from altk.core.llm import ValidatingLLMClient, LLMClient

MAX_TOKENS = 16000 # min of claude4, oss, gpt 4o, ...


class TG_LLMClient(LanguageModelBase):
def __init__(self, llm_client: Union[LLMClient, ValidatingLLMClient]):
Expand All @@ -14,9 +16,9 @@ async def generate(self, messages: list[dict]) -> str:
return await llm_client.generate_async(
prompt=messages,
schema=str,
generation_args=GenerationArgs(max_tokens=10000),
generation_args=GenerationArgs(max_tokens=MAX_TOKENS),
)

return await self.llm_client.generate_async(
prompt=messages, generation_args=GenerationArgs(max_tokens=10000)
prompt=messages, generation_args=GenerationArgs(max_tokens=MAX_TOKENS)
) # type: ignore
1 change: 0 additions & 1 deletion altk/pre_tool/toolguard/toolguard_spec_component.py
Original file line number Diff line number Diff line change
Expand Up @@ -78,5 +78,4 @@ async def _abuild(self, data: ToolGuardSpecBuildInput) -> ToolGuardSpecs:
tools=to_tools(data.tools),
work_dir=data.out_dir,
llm=llm,
short=True,
)
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -129,7 +129,7 @@ spotlight = [
]

toolguard = [
"toolguard>=0.2.7",
"toolguard>=0.2.9",
]

refraction = [
Expand Down
4 changes: 1 addition & 3 deletions tests/pre_tool/toolguard/inputs/tool_functions.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,13 +3,11 @@ def divide_tool(g: float, h: float) -> float:

Args:
g (float): The dividend.
h (float): The divisor (must not be zero).
h (float): The divisor.

Returns:
float: The result of g divided by h.

Raises:
ZeroDivisionError: If h is zero.
"""
return g / h

Expand Down
Loading
Loading