SemFire (Semantic Firewall): detect advanced AI deception, including in-context scheming and multi-turn manipulative attacks.
Project description
SemFire
AI Deception Detection Toolkit
SemFire (Semantic Firewall) is an open-source toolkit for detecting advanced AI deception, with a primary focus on "in-context scheming" and multi-turn manipulative attacks. This project aims to develop tools to identify and mitigate vulnerabilities like the "Echo Chamber" and "Crescendo" attacks, where AI models are subtly guided towards undesirable behavior through conversational context.
Project Vision: A Toolkit for AI Deception Detection
SemFire aims to be a versatile, open-source toolkit providing:
- A Python library for direct integration into applications and research.
- A Command Line Interface (CLI) for quick analysis and scripting.
- A REST API service (via FastAPI) for broader accessibility and enterprise use cases.
- Core components that can be integrated into broader semantic-firewall-like systems to monitor and analyze AI interactions in real-time.
Features
- Rule-based detector (
EchoChamberDetector) for identifying cues related to "in-context scheming," context poisoning, semantic steering, and other multi-turn manipulative attack patterns (e.g., "Echo Chamber", "Crescendo"). - Analyzes both current text input and conversation history to detect evolving deceptive narratives.
- Heuristic-based detector (
HeuristicDetector) for signals like text complexity and keyword usage. - ML-based classifiers to enhance detection of complex scheming behaviors over extended dialogues (Future Work).
API Instructions forthcoming.
Python API for programmatic access.REST service (FastAPI) for network-based access.
Installation
The project can be installed from PyPI:
pip install semfire
- Quickstart :/docs/quickstart.md
- Containerized CLI : /docs/docker-cli.md
- Usage : /docs/usage.md
- LLM Providers for ai-as-judge features : /docs/providers.md
Terminal Demos (GIFs)
The following terminal demo GIFs are available under assets/demos/asciinema/:
Quick Start
Individual Detectors
Python API
Complete Workflow
API: Health/Ready/Zip Analyze
Contributing
Contributions are welcome! Please open an issue or submit a pull request.
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 semfire-0.2.6.tar.gz.
File metadata
- Download URL: semfire-0.2.6.tar.gz
- Upload date:
- Size: 10.4 MB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd20e54a12f0af9f1f20d7c37707cfac1cebb74a394293fc6f374316541016da
|
|
| MD5 |
ed074eb652ba50be2a352fdd298e54bd
|
|
| BLAKE2b-256 |
65257ed2719dd9c62878cd2604881360cb7e25da55cf73c10a740159c07b2b61
|
Provenance
The following attestation bundles were made for semfire-0.2.6.tar.gz:
Publisher:
release.yml on josephedward/SemFire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semfire-0.2.6.tar.gz -
Subject digest:
bd20e54a12f0af9f1f20d7c37707cfac1cebb74a394293fc6f374316541016da - Sigstore transparency entry: 626667527
- Sigstore integration time:
-
Permalink:
josephedward/SemFire@5e3c90a46c3ece2c8167b2ad13eb6ea046a25318 -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/josephedward
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5e3c90a46c3ece2c8167b2ad13eb6ea046a25318 -
Trigger Event:
push
-
Statement type:
File details
Details for the file semfire-0.2.6-py3-none-any.whl.
File metadata
- Download URL: semfire-0.2.6-py3-none-any.whl
- Upload date:
- Size: 33.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca664baca00e45f7832e57606aa587da69b3c635e96162ac57e937d4d10ed045
|
|
| MD5 |
dcfd4b39ae2c2a4636b68674b1420a56
|
|
| BLAKE2b-256 |
3d09275e0d1096868c278f89833f9526c02d1ac47b1802bdaa0135c09f490523
|
Provenance
The following attestation bundles were made for semfire-0.2.6-py3-none-any.whl:
Publisher:
release.yml on josephedward/SemFire
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
semfire-0.2.6-py3-none-any.whl -
Subject digest:
ca664baca00e45f7832e57606aa587da69b3c635e96162ac57e937d4d10ed045 - Sigstore transparency entry: 626667530
- Sigstore integration time:
-
Permalink:
josephedward/SemFire@5e3c90a46c3ece2c8167b2ad13eb6ea046a25318 -
Branch / Tag:
refs/tags/v0.2.6 - Owner: https://github.com/josephedward
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
release.yml@5e3c90a46c3ece2c8167b2ad13eb6ea046a25318 -
Trigger Event:
push
-
Statement type: