Measure AI-to-AI influence in multi-agent systems
Project description
TraceIQ
Measure AI-to-AI influence in multi-agent systems.
Quickstart
from traceiq import InfluenceTracker
tracker = InfluenceTracker(use_mock_embedder=True)
result = tracker.track_event(
sender_id="agent_a",
receiver_id="agent_b",
sender_content="We should switch to renewable energy.",
receiver_content="Good point. Renewables are the future.",
)
print(f"Drift: {result['drift_l2_state']}")
print(f"IQx: {result['IQx']}")
print(f"Alert: {result['alert']}")
tracker.close()
What TraceIQ Is
- Tracks how AI agent outputs change after receiving messages from other agents
- Computes influence metrics based on semantic embedding similarity
- Provides anomaly detection via Z-score thresholds
- Builds influence graphs for network-level analysis
- Includes reproducible research experiments
What TraceIQ Is NOT
- Not causal inference: Metrics show correlation, not proven causation
- Not intent detection: Cannot determine if influence is intentional
- Not content analysis: Measures embedding similarity, not semantic meaning
- Not internal state tracking: Only observes agent outputs, not cognition
- Not a security solution: Research tool, not production security system
- Thresholds require calibration: Default values need tuning per environment
Installation
# Core (lightweight, no ML dependencies)
pip install traceiq
# With sentence-transformers for real embeddings
pip install "traceiq[embedding]"
# With pandas/scipy/matplotlib for research
pip install "traceiq[research]"
Example Results
These plots are generated by the included experiments (experiments/plot_all.py):
Experiment 1: Wrong Hint Detection
Compares solver accuracy and TraceIQ alerts across baseline, correct hint, and wrong hint conditions.
Experiment 2: Propagation Risk Over Time
Tracks spectral radius as influence spreads through a chain of agents.
Experiment 3: Mitigation Effectiveness
Compares accuracy with and without a mitigation guard that quarantines suspicious interactions.
Integration Patterns
TraceIQ works with various agent architectures. See docs/integration.md for templates:
| Pattern | Description |
|---|---|
| LLM-only | Basic tracking of message/response pairs |
| RAG | Include retrieved chunks in receiver_input_view |
| Tool-using | Log tool outputs for context |
| Memory agents | Track before/after memory state |
| Multi-agent orchestrator | Full conversation flow tracking |
Research Context
TraceIQ is developed for research on AI-to-AI influence in multi-agent systems. The metrics (IQx, RWI, Z-score, Propagation Risk) are project-defined research metrics documented in this repository. They are not externally standardized. Mathematical foundations and proofs are in docs/THEORY.md.
Documentation
| Document | Description |
|---|---|
| docs/metrics.md | Metric definitions and formulas |
| docs/integration.md | Integration patterns |
| docs/cli.md | CLI reference |
| docs/configuration.md | TrackerConfig options |
| docs/architecture.md | System architecture |
| docs/THEORY.md | Mathematical foundations |
| experiments/README.md | Research testbed |
CLI help: traceiq --help
PyPI: pypi.org/project/traceiq
Usage Assumptions
For reliable metrics:
- Log receiver context: For RAG/tools, provide
receiver_input_view - Check validity before alerting: Use
result["valid"]to avoid cold-start noise - Calibrate thresholds: Default values (Z > 2.0, etc.) need tuning per environment
- Interpret PR carefully: Propagation Risk is a relative indicator; establish baseline values for your system
Releasing TraceIQ
To release a new version:
- Update version in
pyproject.toml - Commit the change:
git add pyproject.toml git commit -m "chore: bump version to X.Y.Z"
- Create and push the tag:
git tag vX.Y.Z git push origin vX.Y.Z
- GitHub Actions automatically:
- Runs full test suite
- Builds the package
- Publishes to PyPI
- Creates GitHub Release
For release candidates, use tags like v0.4.0rc1 (published to TestPyPI).
License
MIT License - see LICENSE for details.
Contributing
Contributions welcome. See CONTRIBUTING.md or:
- Fork the repository
- Create a feature branch
- Run tests (
pytest) and linter (ruff check src/ tests/) - Submit a Pull Request
Citation
@software{traceiq,
title = {TraceIQ: Measure AI-to-AI Influence in Multi-Agent Systems},
year = {2026},
url = {https://github.com/Anarv2104/TraceIQ}
}
Project details
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 traceiq-0.5.1.tar.gz.
File metadata
- Download URL: traceiq-0.5.1.tar.gz
- Upload date:
- Size: 211.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
9198ef6905fe6fc2256437734f069a4ac1fc61f1ddac93b695bbe9ed8b9c417a
|
|
| MD5 |
87d80357b063a8a97ae01ce7ff687aac
|
|
| BLAKE2b-256 |
97d84ce17c20bf7ee16eebb481bf301112dd5857dc25bf6265cee415a31fae98
|
Provenance
The following attestation bundles were made for traceiq-0.5.1.tar.gz:
Publisher:
publish.yml on Anarv2104/TraceIQ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
traceiq-0.5.1.tar.gz -
Subject digest:
9198ef6905fe6fc2256437734f069a4ac1fc61f1ddac93b695bbe9ed8b9c417a - Sigstore transparency entry: 1003442497
- Sigstore integration time:
-
Permalink:
Anarv2104/TraceIQ@4de2fe38828c4f314e8d51e1c53881a3aaa06d24 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/Anarv2104
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4de2fe38828c4f314e8d51e1c53881a3aaa06d24 -
Trigger Event:
push
-
Statement type:
File details
Details for the file traceiq-0.5.1-py3-none-any.whl.
File metadata
- Download URL: traceiq-0.5.1-py3-none-any.whl
- Upload date:
- Size: 63.0 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 |
60351aefdc74474d09db9f891f1c52654016679745316d1fc5a19f5004ea9bc8
|
|
| MD5 |
0f6718b041d79a5aee6fcb7af311f74a
|
|
| BLAKE2b-256 |
9eb7094c2e73a45249f3dbc2afe7a9d3d7c655fd1474ef86e5214f97dc7f9774
|
Provenance
The following attestation bundles were made for traceiq-0.5.1-py3-none-any.whl:
Publisher:
publish.yml on Anarv2104/TraceIQ
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
traceiq-0.5.1-py3-none-any.whl -
Subject digest:
60351aefdc74474d09db9f891f1c52654016679745316d1fc5a19f5004ea9bc8 - Sigstore transparency entry: 1003442506
- Sigstore integration time:
-
Permalink:
Anarv2104/TraceIQ@4de2fe38828c4f314e8d51e1c53881a3aaa06d24 -
Branch / Tag:
refs/tags/v0.5.1 - Owner: https://github.com/Anarv2104
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@4de2fe38828c4f314e8d51e1c53881a3aaa06d24 -
Trigger Event:
push
-
Statement type: