Skip to content

[BUG] llm guard runtime doesnot work as intended #3735

@JINO-ROHIT

Description

@JINO-ROHIT

Required prerequisites

What version of camel are you using?

0.2.84

System information

3.10.18 (main, Jul 11 2025, 22:25:58) [Clang 20.1.4 ] darwin
0.2.84

Problem description

there are two issues here,

  1. run the examples under runtimes/code_execution_with_llm_guard.py, you will see the a log
2026-01-21 22:42:24,841 - camel.runtimes.llm_guard_runtime - ERROR - No tool call found in response.
2026-01-21 22:42:32,518 - camel.runtimes.llm_guard_runtime - ERROR - No tool call found in response.

if you check the agent response info using response.info, all the tool calls param have been disabled result={'error': 'Risk assessment failed. Disabling function.'} and the external_tool_call_requests is None, so one of the checks in the main code breaks.

  1. the tools get overwritten in the example, so replace

runtime = LLMGuardRuntime(verbose=True).add(
    *CodeExecutionToolkit().get_tools()
)

tools = runtime.get_tools()

print("Tools:")
for tool in tools:
    print(tool.get_function_name())

with

toolkit = CodeExecutionToolkit(verbose=False)


runtime = LLMGuardRuntime(verbose=True).add(
    toolkit.get_tools()
)

tools = runtime.get_tools()

print("Tools:")
for tool in tools:
    print(tool.get_function_name())

Reproducible example code

NA

Traceback

Expected behavior

No response

Additional context

No response

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions