smolagents integration

Action security for smolagents.

Check generated-code workflows at their execution boundaries.

Get the package and source.

Connect the execution boundary.

Attach the firewall to the agent and use the secure runner. Generated code still needs a constrained executor and destination permissions.

An example to test

A research task produces code that tries to send environment metadata to an external endpoint. Check the action before the executor permits the side effect.

Illustrative workflow, not a customer deployment or a measured result.

Before connecting live policy

  1. Identify the handler that actually performs the side effect.
  2. Provide trusted identity, purpose and final action arguments.
  3. Configure the tenant’s assigned runtime and keep API credentials server-side.
  4. Test allowed, blocked and unavailable paths before production.

Integration example

Adapt this existing SDK pattern to your application. Names such as the agent, handler and session refer to your own objects. Follow the package documentation for compatible versions and complete setup.

# Install Hugging Face smolagents support.
python -m pip install "agenticdome-python-sdk[smolagents]"

from agenticdome_sdk.smolagents import AgenticDomeSmolagentsFirewall

firewall = AgenticDomeSmolagentsFirewall()
firewall.attach_firewall(agent, session_id="sess_prod_01J4X", agent_id="smolagents_agent")
result = firewall.run_agent_securely(agent, task, session_id="sess_prod_01J4X")

# Run the local vulnerable-vs-protected generated-code demo.
agenticdome-demo --framework smolagents --scenario metadata_exfil

Python demo commands evaluate fixed inputs against a bundled local policy; they do not instantiate the selected framework or prove a live integration. The TypeScript client and OpenClaw runtime plugin need their documented tenant configuration.

See the decision before the action.

Try a local scenario, then bring your workflow to a deployment review. Start with one agent and one tool, and see exactly where the action can be stopped.