agentiva 0.1.0__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- agentiva-0.1.0/LICENSE +107 -0
- agentiva-0.1.0/PKG-INFO +300 -0
- agentiva-0.1.0/README.md +209 -0
- agentiva-0.1.0/agentiva/__init__.py +9 -0
- agentiva-0.1.0/agentiva/alerts/__init__.py +1 -0
- agentiva-0.1.0/agentiva/alerts/alerter.py +39 -0
- agentiva-0.1.0/agentiva/api/__init__.py +1 -0
- agentiva-0.1.0/agentiva/api/basic_chat_responses.py +49 -0
- agentiva-0.1.0/agentiva/api/chat.py +1852 -0
- agentiva-0.1.0/agentiva/api/chat_router.py +1169 -0
- agentiva-0.1.0/agentiva/api/server.py +1423 -0
- agentiva-0.1.0/agentiva/auth/__init__.py +1 -0
- agentiva-0.1.0/agentiva/auth/jwt_auth.py +46 -0
- agentiva-0.1.0/agentiva/auth/tenancy.py +33 -0
- agentiva-0.1.0/agentiva/cli.py +328 -0
- agentiva-0.1.0/agentiva/compliance/__init__.py +19 -0
- agentiva-0.1.0/agentiva/compliance/audit_grounding.py +134 -0
- agentiva-0.1.0/agentiva/compliance/hipaa_report.py +192 -0
- agentiva-0.1.0/agentiva/compliance/knowledge_base.py +297 -0
- agentiva-0.1.0/agentiva/compliance/pci_report.py +139 -0
- agentiva-0.1.0/agentiva/compliance/phi_detector.py +147 -0
- agentiva-0.1.0/agentiva/compliance/report_pdf.py +95 -0
- agentiva-0.1.0/agentiva/compliance/soc2_report.py +173 -0
- agentiva-0.1.0/agentiva/db/__init__.py +1 -0
- agentiva-0.1.0/agentiva/db/database.py +396 -0
- agentiva-0.1.0/agentiva/db/models.py +109 -0
- agentiva-0.1.0/agentiva/interceptor/__init__.py +1 -0
- agentiva-0.1.0/agentiva/interceptor/browser_agent_hook.py +47 -0
- agentiva-0.1.0/agentiva/interceptor/code_agent_hook.py +59 -0
- agentiva-0.1.0/agentiva/interceptor/core.py +507 -0
- agentiva-0.1.0/agentiva/interceptor/crewai_hook.py +34 -0
- agentiva-0.1.0/agentiva/interceptor/langchain_hook.py +60 -0
- agentiva-0.1.0/agentiva/interceptor/mcp_proxy.py +69 -0
- agentiva-0.1.0/agentiva/interceptor/multi_agent_hook.py +58 -0
- agentiva-0.1.0/agentiva/interceptor/openai_hook.py +32 -0
- agentiva-0.1.0/agentiva/modes/__init__.py +1 -0
- agentiva-0.1.0/agentiva/modes/negotiator.py +214 -0
- agentiva-0.1.0/agentiva/modes/rollback.py +145 -0
- agentiva-0.1.0/agentiva/modes/simulator.py +177 -0
- agentiva-0.1.0/agentiva/policy/__init__.py +1 -0
- agentiva-0.1.0/agentiva/policy/anomaly_detector.py +86 -0
- agentiva-0.1.0/agentiva/policy/behavior_tracker.py +224 -0
- agentiva-0.1.0/agentiva/policy/engine.py +302 -0
- agentiva-0.1.0/agentiva/policy/smart_scorer.py +497 -0
- agentiva-0.1.0/agentiva/registry/__init__.py +1 -0
- agentiva-0.1.0/agentiva/registry/agent_registry.py +143 -0
- agentiva-0.1.0/agentiva.egg-info/PKG-INFO +300 -0
- agentiva-0.1.0/agentiva.egg-info/SOURCES.txt +114 -0
- agentiva-0.1.0/agentiva.egg-info/dependency_links.txt +1 -0
- agentiva-0.1.0/agentiva.egg-info/entry_points.txt +3 -0
- agentiva-0.1.0/agentiva.egg-info/requires.txt +71 -0
- agentiva-0.1.0/agentiva.egg-info/top_level.txt +4 -0
- agentiva-0.1.0/benchmarks/__init__.py +1 -0
- agentiva-0.1.0/benchmarks/deepteam_benchmark.py +142 -0
- agentiva-0.1.0/benchmarks/garak_benchmark.py +335 -0
- agentiva-0.1.0/benchmarks/pyrit_agentiva_target.py +43 -0
- agentiva-0.1.0/benchmarks/pyrit_benchmark.py +204 -0
- agentiva-0.1.0/benchmarks/run_all_benchmarks.py +193 -0
- agentiva-0.1.0/benchmarks/run_benchmark.py +533 -0
- agentiva-0.1.0/demo/__init__.py +1 -0
- agentiva-0.1.0/demo/attacks/__init__.py +1 -0
- agentiva-0.1.0/demo/attacks/edge_cases.py +445 -0
- agentiva-0.1.0/demo/paybot_demo.py +501 -0
- agentiva-0.1.0/demo/proof_demo.py +388 -0
- agentiva-0.1.0/demo/real_agent.py +528 -0
- agentiva-0.1.0/demo/real_incidents_demo.py +620 -0
- agentiva-0.1.0/demo/setup_demo_environment.py +145 -0
- agentiva-0.1.0/policies/default.yaml +433 -0
- agentiva-0.1.0/pyproject.toml +40 -0
- agentiva-0.1.0/requirements.txt +76 -0
- agentiva-0.1.0/setup.cfg +4 -0
- agentiva-0.1.0/setup.py +37 -0
- agentiva-0.1.0/tests/__init__.py +1 -0
- agentiva-0.1.0/tests/test_advanced_context_role_baseline_whitelist_drift.py +528 -0
- agentiva-0.1.0/tests/test_agent_registry.py +33 -0
- agentiva-0.1.0/tests/test_alerting.py +78 -0
- agentiva-0.1.0/tests/test_anomaly_detector.py +37 -0
- agentiva-0.1.0/tests/test_api.py +266 -0
- agentiva-0.1.0/tests/test_browser_agent.py +19 -0
- agentiva-0.1.0/tests/test_chat.py +38 -0
- agentiva-0.1.0/tests/test_chat_grounding.py +132 -0
- agentiva-0.1.0/tests/test_chat_help_unblock.py +191 -0
- agentiva-0.1.0/tests/test_code_agent.py +26 -0
- agentiva-0.1.0/tests/test_compliance_exports.py +47 -0
- agentiva-0.1.0/tests/test_compliance_knowledge_base.py +59 -0
- agentiva-0.1.0/tests/test_compliance_pdf_exports.py +40 -0
- agentiva-0.1.0/tests/test_compliance_rag.py +30 -0
- agentiva-0.1.0/tests/test_core.py +22 -0
- agentiva-0.1.0/tests/test_crewai_hook.py +45 -0
- agentiva-0.1.0/tests/test_database.py +139 -0
- agentiva-0.1.0/tests/test_demo_environment.py +20 -0
- agentiva-0.1.0/tests/test_edge_cases.py +367 -0
- agentiva-0.1.0/tests/test_enterprise_approvals_mandatory_geo.py +300 -0
- agentiva-0.1.0/tests/test_industry_templates.py +34 -0
- agentiva-0.1.0/tests/test_integration_negotiation_flow.py +94 -0
- agentiva-0.1.0/tests/test_jwt_auth.py +48 -0
- agentiva-0.1.0/tests/test_langchain.py +34 -0
- agentiva-0.1.0/tests/test_mcp_proxy.py +66 -0
- agentiva-0.1.0/tests/test_multi_agent.py +24 -0
- agentiva-0.1.0/tests/test_multi_tenant.py +42 -0
- agentiva-0.1.0/tests/test_negotiation.py +143 -0
- agentiva-0.1.0/tests/test_openai_hook.py +39 -0
- agentiva-0.1.0/tests/test_param_attack_vectors.py +68 -0
- agentiva-0.1.0/tests/test_param_concurrent.py +34 -0
- agentiva-0.1.0/tests/test_param_fuzzing.py +61 -0
- agentiva-0.1.0/tests/test_param_industry_compliance.py +84 -0
- agentiva-0.1.0/tests/test_param_policy_rules.py +115 -0
- agentiva-0.1.0/tests/test_param_real_incidents.py +92 -0
- agentiva-0.1.0/tests/test_param_risk_scoring.py +88 -0
- agentiva-0.1.0/tests/test_phi_detector.py +57 -0
- agentiva-0.1.0/tests/test_policy.py +33 -0
- agentiva-0.1.0/tests/test_real_demo.py +89 -0
- agentiva-0.1.0/tests/test_rollback.py +86 -0
- agentiva-0.1.0/tests/test_sdk_interface.py +33 -0
- agentiva-0.1.0/tests/test_simulator.py +85 -0
- agentiva-0.1.0/tests/test_smart_scorer.py +90 -0
agentiva-0.1.0/LICENSE
ADDED
|
@@ -0,0 +1,107 @@
|
|
|
1
|
+
Apache License
|
|
2
|
+
Version 2.0, January 2004
|
|
3
|
+
http://www.apache.org/licenses/
|
|
4
|
+
|
|
5
|
+
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
|
|
6
|
+
|
|
7
|
+
1. Definitions.
|
|
8
|
+
|
|
9
|
+
"License" shall mean the terms and conditions for use, reproduction, and
|
|
10
|
+
distribution as defined by Sections 1 through 9 of this document.
|
|
11
|
+
|
|
12
|
+
"Licensor" shall mean the copyright owner or entity authorized by
|
|
13
|
+
the copyright owner that is granting the License.
|
|
14
|
+
|
|
15
|
+
"Legal Entity" shall mean the union of the acting entity and all
|
|
16
|
+
other entities that control, are controlled by, or are under common
|
|
17
|
+
control with that entity. For the purposes of this definition,
|
|
18
|
+
"control" means (i) the power, direct or indirect, to cause the
|
|
19
|
+
direction or management of such entity, whether by contract or
|
|
20
|
+
otherwise, or (ii) ownership of fifty percent (50%) or more of the
|
|
21
|
+
outstanding shares, or (iii) beneficial ownership of such entity.
|
|
22
|
+
|
|
23
|
+
"You" (or "Your") shall mean an individual or Legal Entity
|
|
24
|
+
exercising permissions granted by this License.
|
|
25
|
+
|
|
26
|
+
"Source" form shall mean the preferred form for making modifications,
|
|
27
|
+
including but not limited to software source code, documentation
|
|
28
|
+
source, and configuration files.
|
|
29
|
+
|
|
30
|
+
"Object" form shall mean any form resulting from mechanical
|
|
31
|
+
transformation or translation of a Source form, including but
|
|
32
|
+
not limited to compiled object code, generated documentation,
|
|
33
|
+
and conversions to other media types.
|
|
34
|
+
|
|
35
|
+
"Work" shall mean the work of authorship, whether in Source or
|
|
36
|
+
Object form, made available under the License, as indicated by a
|
|
37
|
+
copyright notice that is included in or attached to the work.
|
|
38
|
+
|
|
39
|
+
"Derivative Works" shall mean any work, whether in Source or Object
|
|
40
|
+
form, that is based on (or derived from) the Work and for which the
|
|
41
|
+
editorial revisions, annotations, elaborations, or other modifications
|
|
42
|
+
represent, as a whole, an original work of authorship.
|
|
43
|
+
|
|
44
|
+
"Contribution" shall mean any work of authorship, including
|
|
45
|
+
the original version of the Work and any modifications or additions
|
|
46
|
+
to that Work or Derivative Works thereof, that is intentionally
|
|
47
|
+
submitted to Licensor for inclusion in the Work by the copyright owner
|
|
48
|
+
or by an individual or Legal Entity authorized to submit on behalf of
|
|
49
|
+
the copyright owner.
|
|
50
|
+
|
|
51
|
+
"Contributor" shall mean Licensor and any individual or Legal Entity
|
|
52
|
+
on behalf of whom a Contribution has been received by Licensor and
|
|
53
|
+
subsequently incorporated within the Work.
|
|
54
|
+
|
|
55
|
+
2. Grant of Copyright License. Subject to the terms and conditions of
|
|
56
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
57
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
58
|
+
copyright license to reproduce, prepare Derivative Works of,
|
|
59
|
+
publicly display, publicly perform, sublicense, and distribute the
|
|
60
|
+
Work and such Derivative Works in Source or Object form.
|
|
61
|
+
|
|
62
|
+
3. Grant of Patent License. Subject to the terms and conditions of
|
|
63
|
+
this License, each Contributor hereby grants to You a perpetual,
|
|
64
|
+
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
|
|
65
|
+
(except as stated in this section) patent license to make, have made,
|
|
66
|
+
use, offer to sell, sell, import, and otherwise transfer the Work.
|
|
67
|
+
|
|
68
|
+
4. Redistribution. You may reproduce and distribute copies of the
|
|
69
|
+
Work or Derivative Works thereof in any medium, with or without
|
|
70
|
+
modifications, and in Source or Object form, provided that You meet
|
|
71
|
+
the following conditions:
|
|
72
|
+
|
|
73
|
+
(a) You must give any other recipients of the Work or
|
|
74
|
+
Derivative Works a copy of this License; and
|
|
75
|
+
|
|
76
|
+
(b) You must cause any modified files to carry prominent notices
|
|
77
|
+
stating that You changed the files; and
|
|
78
|
+
|
|
79
|
+
(c) You must retain, in the Source form of any Derivative Works
|
|
80
|
+
that You distribute, all copyright, patent, trademark, and
|
|
81
|
+
attribution notices from the Source form of the Work; and
|
|
82
|
+
|
|
83
|
+
(d) If the Work includes a "NOTICE" text file as part of its
|
|
84
|
+
distribution, then any Derivative Works that You distribute must
|
|
85
|
+
include a readable copy of the attribution notices contained
|
|
86
|
+
within such NOTICE file.
|
|
87
|
+
|
|
88
|
+
5. Submission of Contributions. Unless You explicitly state otherwise,
|
|
89
|
+
any Contribution intentionally submitted for inclusion in the Work
|
|
90
|
+
shall be under the terms and conditions of this License.
|
|
91
|
+
|
|
92
|
+
6. Trademarks. This License does not grant permission to use the trade
|
|
93
|
+
names, trademarks, service marks, or product names of the Licensor.
|
|
94
|
+
|
|
95
|
+
7. Disclaimer of Warranty. Unless required by applicable law or
|
|
96
|
+
agreed to in writing, Licensor provides the Work on an "AS IS" BASIS,
|
|
97
|
+
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
98
|
+
|
|
99
|
+
8. Limitation of Liability. In no event and under no legal theory,
|
|
100
|
+
whether in tort (including negligence), contract, or otherwise, unless
|
|
101
|
+
required by applicable law, shall any Contributor be liable to You for damages.
|
|
102
|
+
|
|
103
|
+
9. Accepting Warranty or Additional Liability. While redistributing
|
|
104
|
+
the Work or Derivative Works thereof, You may choose to offer support,
|
|
105
|
+
warranty, indemnity, or other liability obligations.
|
|
106
|
+
|
|
107
|
+
END OF TERMS AND CONDITIONS
|
agentiva-0.1.0/PKG-INFO
ADDED
|
@@ -0,0 +1,300 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentiva
|
|
3
|
+
Version: 0.1.0
|
|
4
|
+
Summary: Agentiva — open-source runtime for AI agent safety
|
|
5
|
+
License: Apache-2.0
|
|
6
|
+
Keywords: ai,agent,safety,langchain,fastapi,guardrails
|
|
7
|
+
Classifier: Development Status :: 3 - Alpha
|
|
8
|
+
Classifier: Intended Audience :: Developers
|
|
9
|
+
Classifier: License :: OSI Approved :: Apache Software License
|
|
10
|
+
Classifier: Programming Language :: Python :: 3
|
|
11
|
+
Classifier: Programming Language :: Python :: 3.10
|
|
12
|
+
Classifier: Programming Language :: Python :: 3.11
|
|
13
|
+
Classifier: Programming Language :: Python :: 3.12
|
|
14
|
+
Classifier: Programming Language :: Python :: 3.13
|
|
15
|
+
Requires-Python: >=3.10
|
|
16
|
+
Description-Content-Type: text/markdown
|
|
17
|
+
License-File: LICENSE
|
|
18
|
+
Requires-Dist: aiofiles==25.1.0
|
|
19
|
+
Requires-Dist: aiosqlite==0.21.0
|
|
20
|
+
Requires-Dist: aiohappyeyeballs==2.6.1
|
|
21
|
+
Requires-Dist: alembic==1.16.5
|
|
22
|
+
Requires-Dist: asyncpg==0.30.0
|
|
23
|
+
Requires-Dist: aiohttp==3.13.3
|
|
24
|
+
Requires-Dist: aiosignal==1.4.0
|
|
25
|
+
Requires-Dist: annotated-doc==0.0.4
|
|
26
|
+
Requires-Dist: annotated-types==0.7.0
|
|
27
|
+
Requires-Dist: anyio==4.12.1
|
|
28
|
+
Requires-Dist: attrs==26.1.0
|
|
29
|
+
Requires-Dist: certifi==2026.2.25
|
|
30
|
+
Requires-Dist: charset-normalizer==3.4.6
|
|
31
|
+
Requires-Dist: click==8.3.1
|
|
32
|
+
Requires-Dist: dataclasses-json==0.6.7
|
|
33
|
+
Requires-Dist: Faker==37.0.0
|
|
34
|
+
Requires-Dist: fastapi==0.135.1
|
|
35
|
+
Requires-Dist: frozenlist==1.8.0
|
|
36
|
+
Requires-Dist: greenlet==3.3.2
|
|
37
|
+
Requires-Dist: h11==0.16.0
|
|
38
|
+
Requires-Dist: httpcore==1.0.9
|
|
39
|
+
Requires-Dist: httpx==0.28.1
|
|
40
|
+
Requires-Dist: httpx-sse==0.4.3
|
|
41
|
+
Requires-Dist: idna==3.11
|
|
42
|
+
Requires-Dist: iniconfig==2.3.0
|
|
43
|
+
Requires-Dist: jsonpatch==1.33
|
|
44
|
+
Requires-Dist: jsonpointer==3.0.0
|
|
45
|
+
Requires-Dist: langchain==1.2.13
|
|
46
|
+
Requires-Dist: langchain-classic==1.0.3
|
|
47
|
+
Requires-Dist: langchain-community==0.4.1
|
|
48
|
+
Requires-Dist: langchain-core==1.2.20
|
|
49
|
+
Requires-Dist: langchain-text-splitters==1.1.1
|
|
50
|
+
Requires-Dist: langgraph==1.1.3
|
|
51
|
+
Requires-Dist: langgraph-checkpoint==4.0.1
|
|
52
|
+
Requires-Dist: langgraph-prebuilt==1.0.8
|
|
53
|
+
Requires-Dist: langgraph-sdk==0.3.12
|
|
54
|
+
Requires-Dist: langsmith==0.7.21
|
|
55
|
+
Requires-Dist: marshmallow==3.26.2
|
|
56
|
+
Requires-Dist: multidict==6.7.1
|
|
57
|
+
Requires-Dist: mypy_extensions==1.1.0
|
|
58
|
+
Requires-Dist: numpy==2.4.3
|
|
59
|
+
Requires-Dist: orjson==3.11.7
|
|
60
|
+
Requires-Dist: ormsgpack==1.12.2
|
|
61
|
+
Requires-Dist: packaging==26.0
|
|
62
|
+
Requires-Dist: pluggy==1.6.0
|
|
63
|
+
Requires-Dist: propcache==0.4.1
|
|
64
|
+
Requires-Dist: pydantic==2.12.5
|
|
65
|
+
Requires-Dist: pydantic-settings==2.13.1
|
|
66
|
+
Requires-Dist: pydantic_core==2.41.5
|
|
67
|
+
Requires-Dist: Pygments==2.19.2
|
|
68
|
+
Requires-Dist: PyJWT==2.10.1
|
|
69
|
+
Requires-Dist: pytest==9.0.2
|
|
70
|
+
Requires-Dist: reportlab==4.4.2
|
|
71
|
+
Requires-Dist: python-dotenv==1.2.2
|
|
72
|
+
Requires-Dist: PyYAML==6.0.3
|
|
73
|
+
Requires-Dist: redis==7.3.0
|
|
74
|
+
Requires-Dist: requests==2.32.5
|
|
75
|
+
Requires-Dist: requests-toolbelt==1.0.0
|
|
76
|
+
Requires-Dist: SQLAlchemy==2.0.48
|
|
77
|
+
Requires-Dist: starlette==0.52.1
|
|
78
|
+
Requires-Dist: tenacity==9.1.4
|
|
79
|
+
Requires-Dist: typing-inspect==0.9.0
|
|
80
|
+
Requires-Dist: typing-inspection==0.4.2
|
|
81
|
+
Requires-Dist: typing_extensions==4.15.0
|
|
82
|
+
Requires-Dist: urllib3==2.6.3
|
|
83
|
+
Requires-Dist: uuid_utils==0.14.1
|
|
84
|
+
Requires-Dist: uvicorn==0.42.0
|
|
85
|
+
Requires-Dist: websockets==16.0
|
|
86
|
+
Requires-Dist: xxhash==3.6.0
|
|
87
|
+
Requires-Dist: yarl==1.23.0
|
|
88
|
+
Requires-Dist: zstandard==0.25.0
|
|
89
|
+
Dynamic: license-file
|
|
90
|
+
Dynamic: requires-python
|
|
91
|
+
|
|
92
|
+
# Agentiva
|
|
93
|
+
|
|
94
|
+
**Preview deployments for AI agents.**
|
|
95
|
+
|
|
96
|
+
See what your AI agent would do before it does it.
|
|
97
|
+
|
|
98
|
+
[]()
|
|
99
|
+
[]()
|
|
100
|
+
[]()
|
|
101
|
+
[]()
|
|
102
|
+
|
|
103
|
+
> litellm was compromised March 24, 2026 — SSH keys, AWS credentials, and database passwords stolen from 97M monthly downloads.
|
|
104
|
+
> Agentiva catches this class of attack at the action layer.
|
|
105
|
+
|
|
106
|
+
## Quick start (2 minutes)
|
|
107
|
+
|
|
108
|
+
```bash
|
|
109
|
+
pip install agentiva
|
|
110
|
+
agentiva serve --port 8000
|
|
111
|
+
# Open localhost:3000 for the dashboard (from repo: cd dashboard && npm run dev)
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
## Protect your agent (3 lines)
|
|
115
|
+
|
|
116
|
+
```python
|
|
117
|
+
from agentiva import Agentiva
|
|
118
|
+
|
|
119
|
+
shield = Agentiva(mode="shadow")
|
|
120
|
+
tools = shield.protect([your_existing_tools])
|
|
121
|
+
|
|
122
|
+
# Your agent works exactly the same.
|
|
123
|
+
# Every action is intercepted, scored, and logged.
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Run the demo
|
|
127
|
+
|
|
128
|
+
```bash
|
|
129
|
+
# See 4 real incident recreations
|
|
130
|
+
python demo/real_incidents_demo.py
|
|
131
|
+
|
|
132
|
+
# See PayBot (fintech startup) demo
|
|
133
|
+
python demo/paybot_demo.py
|
|
134
|
+
|
|
135
|
+
# See proof: before vs after comparison
|
|
136
|
+
python demo/proof_demo.py
|
|
137
|
+
```
|
|
138
|
+
|
|
139
|
+
Or use the project venv so dependencies resolve: `source .venv/bin/activate` then the commands above.
|
|
140
|
+
|
|
141
|
+
## What it catches
|
|
142
|
+
|
|
143
|
+
Tested against real-world incidents:
|
|
144
|
+
|
|
145
|
+
- **litellm supply chain attack** (March 2026) — credential exfiltration blocked
|
|
146
|
+
- **Amazon Kiro** (December 2025) — infrastructure destruction blocked
|
|
147
|
+
- **Microsoft Copilot** (January 2026) — zero-click data theft blocked
|
|
148
|
+
- **Replit agent** (2026) — mass record deletion blocked
|
|
149
|
+
|
|
150
|
+
## Verified results
|
|
151
|
+
|
|
152
|
+
| Benchmark | Result |
|
|
153
|
+
|-----------|--------|
|
|
154
|
+
| Agentiva test suite | 24,599 tests passing |
|
|
155
|
+
| OWASP LLM Top 10 | 21/21 (100%) |
|
|
156
|
+
| DeepTeam (Confident AI) | 38/47 (80.85%) |
|
|
157
|
+
| Garak (NVIDIA) | 2,500 probes scanned |
|
|
158
|
+
| PyRIT (Microsoft) | 9/9 scenarios completed |
|
|
159
|
+
|
|
160
|
+
Run benchmarks yourself:
|
|
161
|
+
|
|
162
|
+
```bash
|
|
163
|
+
python -m pytest tests/ -m "slow or not slow" # Full test suite
|
|
164
|
+
python benchmarks/run_benchmark.py # OWASP + incidents
|
|
165
|
+
python benchmarks/run_all_benchmarks.py # All frameworks
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
## Five operating modes
|
|
169
|
+
|
|
170
|
+
| Mode | What it does |
|
|
171
|
+
|------|--------------|
|
|
172
|
+
| Shadow | Observe without executing |
|
|
173
|
+
| Simulation | Preview impact before acting |
|
|
174
|
+
| Approval | Human-in-the-loop for risky actions |
|
|
175
|
+
| Negotiation | Agent learns to self-correct |
|
|
176
|
+
| Rollback | Undo what the agent did |
|
|
177
|
+
|
|
178
|
+
## Dashboard
|
|
179
|
+
|
|
180
|
+
Real-time monitoring at localhost:3000:
|
|
181
|
+
|
|
182
|
+
- **Overview** — stats, charts, recent activity
|
|
183
|
+
- **Live Feed** — actions streaming via WebSocket
|
|
184
|
+
- **Audit Log** — searchable history with compliance exports
|
|
185
|
+
- **Agents** — registry with reputation and kill switch
|
|
186
|
+
- **Policies** — YAML rule editor
|
|
187
|
+
- **Security Co-pilot** — ask questions about your agent's behavior
|
|
188
|
+
|
|
189
|
+
## Security co-pilot
|
|
190
|
+
|
|
191
|
+
Ask naturally:
|
|
192
|
+
|
|
193
|
+
- "What was blocked?" → real data from your audit log
|
|
194
|
+
- "Why was send_email blocked?" → specific tool analysis
|
|
195
|
+
- "Is this HIPAA compliant?" → compliance check with regulation citations
|
|
196
|
+
- "Is my agent safe for production?" → honest assessment
|
|
197
|
+
|
|
198
|
+
Basic mode works without any API key. Add `OPENROUTER_API_KEY` for Claude-powered deep analysis via OpenRouter.
|
|
199
|
+
|
|
200
|
+
## Works with
|
|
201
|
+
|
|
202
|
+
LangChain, CrewAI, OpenAI Agents SDK, Anthropic, MCP Protocol, or any custom agent via REST API.
|
|
203
|
+
|
|
204
|
+
## Compliance-ready evidence
|
|
205
|
+
|
|
206
|
+
Generates audit trails aligned with:
|
|
207
|
+
|
|
208
|
+
- **HIPAA** — PHI access logs per 45 CFR § 164.312
|
|
209
|
+
- **SOC2** — Evidence for CC6-CC8 controls
|
|
210
|
+
- **PCI-DSS** — Cardholder data monitoring per Req 3, 7, 10
|
|
211
|
+
|
|
212
|
+
Note: Agentiva helps prepare for compliance audits. Certification requires a third-party assessor.
|
|
213
|
+
|
|
214
|
+
## Pricing
|
|
215
|
+
|
|
216
|
+
| Tier | Price | Agents |
|
|
217
|
+
|------|-------|--------|
|
|
218
|
+
| Free | $0/forever | 1 agent |
|
|
219
|
+
| Pro | $18/month | Up to 3 |
|
|
220
|
+
| Team | $54/month | Unlimited |
|
|
221
|
+
| Enterprise | Custom | Custom |
|
|
222
|
+
|
|
223
|
+
Self-hosted is free forever. Cloud dashboard on waitlist.
|
|
224
|
+
|
|
225
|
+
## Architecture
|
|
226
|
+
|
|
227
|
+
```
|
|
228
|
+
┌────────────────────┐
|
|
229
|
+
│ AI Agent │ LangChain · CrewAI · OpenAI · MCP · custom tools
|
|
230
|
+
└─────────┬──────────┘
|
|
231
|
+
│ tool_call
|
|
232
|
+
▼
|
|
233
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
234
|
+
│ AGENTIVA API (FastAPI) │
|
|
235
|
+
│ /api/v1/intercept · /api/v1/audit · /api/v1/chat · WebSocket feed │
|
|
236
|
+
└───────────────────────────────┬─────────────────────────────────────┘
|
|
237
|
+
│
|
|
238
|
+
┌─────────────────────┴─────────────────────┐
|
|
239
|
+
▼ ▼
|
|
240
|
+
┌──────────────────────┐ ┌──────────────────────┐
|
|
241
|
+
│ Interceptor │ │ Shield Chat │
|
|
242
|
+
│ PolicyEngine (YAML) │ │ Sessions + messages │
|
|
243
|
+
│ SmartRiskScorer │ │ (SQLite persistence) │
|
|
244
|
+
│ PHI detector │ │ + optional LLM layer │
|
|
245
|
+
│ Behavior / drift │ └──────────┬────────────┘
|
|
246
|
+
└──────────┬───────────┘ │
|
|
247
|
+
│ │
|
|
248
|
+
▼ ▼
|
|
249
|
+
┌──────────────────────┐ ┌──────────────────────┐
|
|
250
|
+
│ Modes │ │ Compliance KB │
|
|
251
|
+
│ Shadow · Approve · │ │ HIPAA · SOC 2 · │
|
|
252
|
+
│ Live · Negotiation │ │ PCI-DSS citations + │
|
|
253
|
+
│ Simulator · Rollback│ │ evidence SQL hooks │
|
|
254
|
+
└──────────┬───────────┘ └──────────────────────┘
|
|
255
|
+
│
|
|
256
|
+
▼
|
|
257
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
258
|
+
│ Persistence: action_logs (audit) · agent registry · approvals · │
|
|
259
|
+
│ chat_sessions / chat_messages │
|
|
260
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
261
|
+
│
|
|
262
|
+
▼
|
|
263
|
+
┌──────────────────────┐
|
|
264
|
+
│ Tools / APIs │ Email · DB · Slack · shell · payments…
|
|
265
|
+
└──────────────────────┘
|
|
266
|
+
```
|
|
267
|
+
|
|
268
|
+
## API reference (short)
|
|
269
|
+
|
|
270
|
+
| Endpoint | Method | Description |
|
|
271
|
+
|----------|--------|-------------|
|
|
272
|
+
| `/health` | GET | Health check + mode + risk threshold |
|
|
273
|
+
| `/api/v1/intercept` | POST | Intercept an agent action |
|
|
274
|
+
| `/api/v1/audit` | GET | Query audit log |
|
|
275
|
+
| `/api/v1/report` | GET | Summary report |
|
|
276
|
+
| `/api/v1/settings` | PUT | Runtime mode + risk threshold |
|
|
277
|
+
| `/ws/actions` | WebSocket | Real-time action stream |
|
|
278
|
+
|
|
279
|
+
Full OpenAPI at `http://localhost:8000/docs`.
|
|
280
|
+
|
|
281
|
+
## Testing
|
|
282
|
+
|
|
283
|
+
```bash
|
|
284
|
+
python -m pytest tests/ -q
|
|
285
|
+
python -m pytest tests/ -m "slow or not slow" -q
|
|
286
|
+
```
|
|
287
|
+
|
|
288
|
+
## Contributing
|
|
289
|
+
|
|
290
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
291
|
+
|
|
292
|
+
## License
|
|
293
|
+
|
|
294
|
+
Apache 2.0 — see [LICENSE](LICENSE).
|
|
295
|
+
|
|
296
|
+
## Built by
|
|
297
|
+
|
|
298
|
+
**[Rishav Aryan](https://rishavar.github.io)** — ML Engineer, George Mason University
|
|
299
|
+
|
|
300
|
+
[GitHub](https://github.com/RishavAr) · [Twitter](https://twitter.com/RishavAr)
|
agentiva-0.1.0/README.md
ADDED
|
@@ -0,0 +1,209 @@
|
|
|
1
|
+
# Agentiva
|
|
2
|
+
|
|
3
|
+
**Preview deployments for AI agents.**
|
|
4
|
+
|
|
5
|
+
See what your AI agent would do before it does it.
|
|
6
|
+
|
|
7
|
+
[]()
|
|
8
|
+
[]()
|
|
9
|
+
[]()
|
|
10
|
+
[]()
|
|
11
|
+
|
|
12
|
+
> litellm was compromised March 24, 2026 — SSH keys, AWS credentials, and database passwords stolen from 97M monthly downloads.
|
|
13
|
+
> Agentiva catches this class of attack at the action layer.
|
|
14
|
+
|
|
15
|
+
## Quick start (2 minutes)
|
|
16
|
+
|
|
17
|
+
```bash
|
|
18
|
+
pip install agentiva
|
|
19
|
+
agentiva serve --port 8000
|
|
20
|
+
# Open localhost:3000 for the dashboard (from repo: cd dashboard && npm run dev)
|
|
21
|
+
```
|
|
22
|
+
|
|
23
|
+
## Protect your agent (3 lines)
|
|
24
|
+
|
|
25
|
+
```python
|
|
26
|
+
from agentiva import Agentiva
|
|
27
|
+
|
|
28
|
+
shield = Agentiva(mode="shadow")
|
|
29
|
+
tools = shield.protect([your_existing_tools])
|
|
30
|
+
|
|
31
|
+
# Your agent works exactly the same.
|
|
32
|
+
# Every action is intercepted, scored, and logged.
|
|
33
|
+
```
|
|
34
|
+
|
|
35
|
+
## Run the demo
|
|
36
|
+
|
|
37
|
+
```bash
|
|
38
|
+
# See 4 real incident recreations
|
|
39
|
+
python demo/real_incidents_demo.py
|
|
40
|
+
|
|
41
|
+
# See PayBot (fintech startup) demo
|
|
42
|
+
python demo/paybot_demo.py
|
|
43
|
+
|
|
44
|
+
# See proof: before vs after comparison
|
|
45
|
+
python demo/proof_demo.py
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
Or use the project venv so dependencies resolve: `source .venv/bin/activate` then the commands above.
|
|
49
|
+
|
|
50
|
+
## What it catches
|
|
51
|
+
|
|
52
|
+
Tested against real-world incidents:
|
|
53
|
+
|
|
54
|
+
- **litellm supply chain attack** (March 2026) — credential exfiltration blocked
|
|
55
|
+
- **Amazon Kiro** (December 2025) — infrastructure destruction blocked
|
|
56
|
+
- **Microsoft Copilot** (January 2026) — zero-click data theft blocked
|
|
57
|
+
- **Replit agent** (2026) — mass record deletion blocked
|
|
58
|
+
|
|
59
|
+
## Verified results
|
|
60
|
+
|
|
61
|
+
| Benchmark | Result |
|
|
62
|
+
|-----------|--------|
|
|
63
|
+
| Agentiva test suite | 24,599 tests passing |
|
|
64
|
+
| OWASP LLM Top 10 | 21/21 (100%) |
|
|
65
|
+
| DeepTeam (Confident AI) | 38/47 (80.85%) |
|
|
66
|
+
| Garak (NVIDIA) | 2,500 probes scanned |
|
|
67
|
+
| PyRIT (Microsoft) | 9/9 scenarios completed |
|
|
68
|
+
|
|
69
|
+
Run benchmarks yourself:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
python -m pytest tests/ -m "slow or not slow" # Full test suite
|
|
73
|
+
python benchmarks/run_benchmark.py # OWASP + incidents
|
|
74
|
+
python benchmarks/run_all_benchmarks.py # All frameworks
|
|
75
|
+
```
|
|
76
|
+
|
|
77
|
+
## Five operating modes
|
|
78
|
+
|
|
79
|
+
| Mode | What it does |
|
|
80
|
+
|------|--------------|
|
|
81
|
+
| Shadow | Observe without executing |
|
|
82
|
+
| Simulation | Preview impact before acting |
|
|
83
|
+
| Approval | Human-in-the-loop for risky actions |
|
|
84
|
+
| Negotiation | Agent learns to self-correct |
|
|
85
|
+
| Rollback | Undo what the agent did |
|
|
86
|
+
|
|
87
|
+
## Dashboard
|
|
88
|
+
|
|
89
|
+
Real-time monitoring at localhost:3000:
|
|
90
|
+
|
|
91
|
+
- **Overview** — stats, charts, recent activity
|
|
92
|
+
- **Live Feed** — actions streaming via WebSocket
|
|
93
|
+
- **Audit Log** — searchable history with compliance exports
|
|
94
|
+
- **Agents** — registry with reputation and kill switch
|
|
95
|
+
- **Policies** — YAML rule editor
|
|
96
|
+
- **Security Co-pilot** — ask questions about your agent's behavior
|
|
97
|
+
|
|
98
|
+
## Security co-pilot
|
|
99
|
+
|
|
100
|
+
Ask naturally:
|
|
101
|
+
|
|
102
|
+
- "What was blocked?" → real data from your audit log
|
|
103
|
+
- "Why was send_email blocked?" → specific tool analysis
|
|
104
|
+
- "Is this HIPAA compliant?" → compliance check with regulation citations
|
|
105
|
+
- "Is my agent safe for production?" → honest assessment
|
|
106
|
+
|
|
107
|
+
Basic mode works without any API key. Add `OPENROUTER_API_KEY` for Claude-powered deep analysis via OpenRouter.
|
|
108
|
+
|
|
109
|
+
## Works with
|
|
110
|
+
|
|
111
|
+
LangChain, CrewAI, OpenAI Agents SDK, Anthropic, MCP Protocol, or any custom agent via REST API.
|
|
112
|
+
|
|
113
|
+
## Compliance-ready evidence
|
|
114
|
+
|
|
115
|
+
Generates audit trails aligned with:
|
|
116
|
+
|
|
117
|
+
- **HIPAA** — PHI access logs per 45 CFR § 164.312
|
|
118
|
+
- **SOC2** — Evidence for CC6-CC8 controls
|
|
119
|
+
- **PCI-DSS** — Cardholder data monitoring per Req 3, 7, 10
|
|
120
|
+
|
|
121
|
+
Note: Agentiva helps prepare for compliance audits. Certification requires a third-party assessor.
|
|
122
|
+
|
|
123
|
+
## Pricing
|
|
124
|
+
|
|
125
|
+
| Tier | Price | Agents |
|
|
126
|
+
|------|-------|--------|
|
|
127
|
+
| Free | $0/forever | 1 agent |
|
|
128
|
+
| Pro | $18/month | Up to 3 |
|
|
129
|
+
| Team | $54/month | Unlimited |
|
|
130
|
+
| Enterprise | Custom | Custom |
|
|
131
|
+
|
|
132
|
+
Self-hosted is free forever. Cloud dashboard on waitlist.
|
|
133
|
+
|
|
134
|
+
## Architecture
|
|
135
|
+
|
|
136
|
+
```
|
|
137
|
+
┌────────────────────┐
|
|
138
|
+
│ AI Agent │ LangChain · CrewAI · OpenAI · MCP · custom tools
|
|
139
|
+
└─────────┬──────────┘
|
|
140
|
+
│ tool_call
|
|
141
|
+
▼
|
|
142
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
143
|
+
│ AGENTIVA API (FastAPI) │
|
|
144
|
+
│ /api/v1/intercept · /api/v1/audit · /api/v1/chat · WebSocket feed │
|
|
145
|
+
└───────────────────────────────┬─────────────────────────────────────┘
|
|
146
|
+
│
|
|
147
|
+
┌─────────────────────┴─────────────────────┐
|
|
148
|
+
▼ ▼
|
|
149
|
+
┌──────────────────────┐ ┌──────────────────────┐
|
|
150
|
+
│ Interceptor │ │ Shield Chat │
|
|
151
|
+
│ PolicyEngine (YAML) │ │ Sessions + messages │
|
|
152
|
+
│ SmartRiskScorer │ │ (SQLite persistence) │
|
|
153
|
+
│ PHI detector │ │ + optional LLM layer │
|
|
154
|
+
│ Behavior / drift │ └──────────┬────────────┘
|
|
155
|
+
└──────────┬───────────┘ │
|
|
156
|
+
│ │
|
|
157
|
+
▼ ▼
|
|
158
|
+
┌──────────────────────┐ ┌──────────────────────┐
|
|
159
|
+
│ Modes │ │ Compliance KB │
|
|
160
|
+
│ Shadow · Approve · │ │ HIPAA · SOC 2 · │
|
|
161
|
+
│ Live · Negotiation │ │ PCI-DSS citations + │
|
|
162
|
+
│ Simulator · Rollback│ │ evidence SQL hooks │
|
|
163
|
+
└──────────┬───────────┘ └──────────────────────┘
|
|
164
|
+
│
|
|
165
|
+
▼
|
|
166
|
+
┌─────────────────────────────────────────────────────────────────────┐
|
|
167
|
+
│ Persistence: action_logs (audit) · agent registry · approvals · │
|
|
168
|
+
│ chat_sessions / chat_messages │
|
|
169
|
+
└─────────────────────────────────────────────────────────────────────┘
|
|
170
|
+
│
|
|
171
|
+
▼
|
|
172
|
+
┌──────────────────────┐
|
|
173
|
+
│ Tools / APIs │ Email · DB · Slack · shell · payments…
|
|
174
|
+
└──────────────────────┘
|
|
175
|
+
```
|
|
176
|
+
|
|
177
|
+
## API reference (short)
|
|
178
|
+
|
|
179
|
+
| Endpoint | Method | Description |
|
|
180
|
+
|----------|--------|-------------|
|
|
181
|
+
| `/health` | GET | Health check + mode + risk threshold |
|
|
182
|
+
| `/api/v1/intercept` | POST | Intercept an agent action |
|
|
183
|
+
| `/api/v1/audit` | GET | Query audit log |
|
|
184
|
+
| `/api/v1/report` | GET | Summary report |
|
|
185
|
+
| `/api/v1/settings` | PUT | Runtime mode + risk threshold |
|
|
186
|
+
| `/ws/actions` | WebSocket | Real-time action stream |
|
|
187
|
+
|
|
188
|
+
Full OpenAPI at `http://localhost:8000/docs`.
|
|
189
|
+
|
|
190
|
+
## Testing
|
|
191
|
+
|
|
192
|
+
```bash
|
|
193
|
+
python -m pytest tests/ -q
|
|
194
|
+
python -m pytest tests/ -m "slow or not slow" -q
|
|
195
|
+
```
|
|
196
|
+
|
|
197
|
+
## Contributing
|
|
198
|
+
|
|
199
|
+
See [CONTRIBUTING.md](CONTRIBUTING.md).
|
|
200
|
+
|
|
201
|
+
## License
|
|
202
|
+
|
|
203
|
+
Apache 2.0 — see [LICENSE](LICENSE).
|
|
204
|
+
|
|
205
|
+
## Built by
|
|
206
|
+
|
|
207
|
+
**[Rishav Aryan](https://rishavar.github.io)** — ML Engineer, George Mason University
|
|
208
|
+
|
|
209
|
+
[GitHub](https://github.com/RishavAr) · [Twitter](https://twitter.com/RishavAr)
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
from __future__ import annotations
|
|
2
|
+
|
|
3
|
+
from typing import Any, Dict, List
|
|
4
|
+
|
|
5
|
+
import httpx
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class AlertManager:
|
|
9
|
+
"""Send alerts when dangerous things happen."""
|
|
10
|
+
|
|
11
|
+
def __init__(self, websocket_broadcaster=None, slack_webhook_url: str = "", email_target: str = "", webhook_url: str = ""):
|
|
12
|
+
self.websocket_broadcaster = websocket_broadcaster
|
|
13
|
+
self.slack_webhook_url = slack_webhook_url
|
|
14
|
+
self.email_target = email_target
|
|
15
|
+
self.webhook_url = webhook_url
|
|
16
|
+
self.sent_alerts: List[Dict[str, Any]] = []
|
|
17
|
+
|
|
18
|
+
async def send_alert(self, alert_type, action, channel="all"):
|
|
19
|
+
payload = {
|
|
20
|
+
"alert_type": alert_type,
|
|
21
|
+
"action_id": action.id,
|
|
22
|
+
"tool_name": action.tool_name,
|
|
23
|
+
"decision": action.decision,
|
|
24
|
+
"risk_score": action.risk_score,
|
|
25
|
+
"agent_id": action.agent_id,
|
|
26
|
+
}
|
|
27
|
+
self.sent_alerts.append(payload)
|
|
28
|
+
|
|
29
|
+
if channel in {"all", "websocket"} and self.websocket_broadcaster is not None:
|
|
30
|
+
await self.websocket_broadcaster(payload)
|
|
31
|
+
|
|
32
|
+
async with httpx.AsyncClient(timeout=5.0) as client:
|
|
33
|
+
if channel in {"all", "slack"} and self.slack_webhook_url:
|
|
34
|
+
await client.post(self.slack_webhook_url, json={"text": str(payload)})
|
|
35
|
+
if channel in {"all", "webhook"} and self.webhook_url:
|
|
36
|
+
await client.post(self.webhook_url, json=payload)
|
|
37
|
+
if channel in {"all", "email"} and self.email_target:
|
|
38
|
+
# Placeholder email integration hook.
|
|
39
|
+
pass
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
|