Forge Verify tools and guardrails for CrewAI — verify every agent action before execution
Project description
crewai-forge
Forge Verify tools and guardrails for CrewAI. Verify every AI agent action against your policies before execution.
Install
pip install crewai-forge
Quick Start
import os
from crewai import Agent, Task, Crew
from forge_crewai import ForgeVerifyTool, forge_task_guardrail
os.environ["VERITERA_API_KEY"] = "vt_live_..."
# Create a Forge verification tool
verify = ForgeVerifyTool(policy="finance-controls")
# Give it to your agent
analyst = Agent(
role="Financial Analyst",
goal="Process financial transactions safely",
tools=[verify],
)
# Add a task guardrail for output validation
task = Task(
description="Process the refund for order #12345",
agent=analyst,
guardrail=forge_task_guardrail(policy="finance-controls"),
guardrail_max_retries=3,
)
crew = Crew(agents=[analyst], tasks=[task])
result = crew.kickoff()
Three Integration Points
1. Agent Tool — verify before acting
from forge_crewai import ForgeVerifyTool
tool = ForgeVerifyTool(policy="finance-controls")
agent = Agent(role="Analyst", tools=[tool])
The agent calls forge_verify(action="payment.create", params='{"amount": 500}') before executing sensitive actions.
2. Task Guardrail — validate output
from forge_crewai import forge_task_guardrail
task = Task(
description="Draft customer email",
agent=support_agent,
guardrail=forge_task_guardrail(policy="communication-policy"),
guardrail_max_retries=3,
)
If the output violates your policy, CrewAI automatically retries the task.
3. LLM Hooks — intercept at the model level
from forge_crewai import forge_before_llm, forge_after_llm
# Block LLM calls that violate policy
forge_before_llm(policy="safety-controls", max_iterations=10)
# Audit all LLM responses
forge_after_llm(policy="audit-trail")
License
MIT — Veritera AI
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file crewai_forge-0.1.0.tar.gz.
File metadata
- Download URL: crewai_forge-0.1.0.tar.gz
- Upload date:
- Size: 5.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
97b57ce6c982fe05f12db6704faec7e9c5e606bfb31e8b943610e6435ec26090
|
|
| MD5 |
05b3a7d990961c22a04e9f34fa5f0455
|
|
| BLAKE2b-256 |
c79efa4d3ac55fd0a789459e0935f13733620511e018fe9fbc0e5698d8e6b6ba
|
File details
Details for the file crewai_forge-0.1.0-py3-none-any.whl.
File metadata
- Download URL: crewai_forge-0.1.0-py3-none-any.whl
- Upload date:
- Size: 7.2 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.1
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
674714a6864b119d1a6c955d9ff51a5a0fa2138495c2f43ce45b50963db5393c
|
|
| MD5 |
b4b2b0367c898205f576523a4a80b7e2
|
|
| BLAKE2b-256 |
37d3935e17802023c9baa8ca63c76e796e250be387145003e890db5fc4ece948
|