agentwall-security 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.
Files changed (118) hide show
  1. agentwall_security-0.1.0/.gitignore +83 -0
  2. agentwall_security-0.1.0/CHANGELOG.md +119 -0
  3. agentwall_security-0.1.0/LICENSE +21 -0
  4. agentwall_security-0.1.0/PKG-INFO +337 -0
  5. agentwall_security-0.1.0/README.md +267 -0
  6. agentwall_security-0.1.0/agentwall/__init__.py +5 -0
  7. agentwall_security-0.1.0/agentwall/cli/__init__.py +0 -0
  8. agentwall_security-0.1.0/agentwall/cli/main.py +340 -0
  9. agentwall_security-0.1.0/agentwall/core/__init__.py +0 -0
  10. agentwall_security-0.1.0/agentwall/core/config_manager.py +109 -0
  11. agentwall_security-0.1.0/agentwall/core/event_manager.py +147 -0
  12. agentwall_security-0.1.0/agentwall/core/session_manager.py +60 -0
  13. agentwall_security-0.1.0/agentwall/core/types.py +81 -0
  14. agentwall_security-0.1.0/agentwall/detectors/__init__.py +0 -0
  15. agentwall_security-0.1.0/agentwall/evaluators/__init__.py +0 -0
  16. agentwall_security-0.1.0/agentwall/inspector/__init__.py +0 -0
  17. agentwall_security-0.1.0/agentwall/inspector/deps.py +30 -0
  18. agentwall_security-0.1.0/agentwall/inspector/desktop.py +58 -0
  19. agentwall_security-0.1.0/agentwall/inspector/event_bus.py +45 -0
  20. agentwall_security-0.1.0/agentwall/inspector/routes/__init__.py +0 -0
  21. agentwall_security-0.1.0/agentwall/inspector/routes/events.py +12 -0
  22. agentwall_security-0.1.0/agentwall/inspector/routes/export.py +78 -0
  23. agentwall_security-0.1.0/agentwall/inspector/routes/goals.py +14 -0
  24. agentwall_security-0.1.0/agentwall/inspector/routes/health.py +9 -0
  25. agentwall_security-0.1.0/agentwall/inspector/routes/overview.py +28 -0
  26. agentwall_security-0.1.0/agentwall/inspector/routes/policies.py +78 -0
  27. agentwall_security-0.1.0/agentwall/inspector/routes/providers.py +90 -0
  28. agentwall_security-0.1.0/agentwall/inspector/routes/sessions.py +54 -0
  29. agentwall_security-0.1.0/agentwall/inspector/routes/ws.py +28 -0
  30. agentwall_security-0.1.0/agentwall/inspector/server.py +52 -0
  31. agentwall_security-0.1.0/agentwall/inspector/ui/dist/assets/index-CdF3waHo.js +40 -0
  32. agentwall_security-0.1.0/agentwall/inspector/ui/dist/assets/index-OKzO_O9l.css +1 -0
  33. agentwall_security-0.1.0/agentwall/inspector/ui/dist/index.html +13 -0
  34. agentwall_security-0.1.0/agentwall/inspector/ui/index.html +12 -0
  35. agentwall_security-0.1.0/agentwall/inspector/ui/package-lock.json +2688 -0
  36. agentwall_security-0.1.0/agentwall/inspector/ui/package.json +25 -0
  37. agentwall_security-0.1.0/agentwall/inspector/ui/postcss.config.js +6 -0
  38. agentwall_security-0.1.0/agentwall/inspector/ui/src/App.tsx +45 -0
  39. agentwall_security-0.1.0/agentwall/inspector/ui/src/api/client.ts +153 -0
  40. agentwall_security-0.1.0/agentwall/inspector/ui/src/components/Badge.tsx +28 -0
  41. agentwall_security-0.1.0/agentwall/inspector/ui/src/components/EventTimeline.tsx +55 -0
  42. agentwall_security-0.1.0/agentwall/inspector/ui/src/components/NavBar.tsx +38 -0
  43. agentwall_security-0.1.0/agentwall/inspector/ui/src/components/SessionList.tsx +39 -0
  44. agentwall_security-0.1.0/agentwall/inspector/ui/src/index.css +3 -0
  45. agentwall_security-0.1.0/agentwall/inspector/ui/src/main.tsx +10 -0
  46. agentwall_security-0.1.0/agentwall/inspector/ui/src/pages/Overview.tsx +76 -0
  47. agentwall_security-0.1.0/agentwall/inspector/ui/src/pages/Policies.tsx +194 -0
  48. agentwall_security-0.1.0/agentwall/inspector/ui/src/pages/Providers.tsx +298 -0
  49. agentwall_security-0.1.0/agentwall/inspector/ui/src/pages/Sessions.tsx +108 -0
  50. agentwall_security-0.1.0/agentwall/inspector/ui/src/pages/Timeline.tsx +221 -0
  51. agentwall_security-0.1.0/agentwall/inspector/ui/tailwind.config.js +6 -0
  52. agentwall_security-0.1.0/agentwall/inspector/ui/tsconfig.json +17 -0
  53. agentwall_security-0.1.0/agentwall/inspector/ui/vite.config.ts +17 -0
  54. agentwall_security-0.1.0/agentwall/integrations/__init__.py +9 -0
  55. agentwall_security-0.1.0/agentwall/integrations/crewai.py +161 -0
  56. agentwall_security-0.1.0/agentwall/integrations/langchain.py +173 -0
  57. agentwall_security-0.1.0/agentwall/integrations/openai_agents.py +185 -0
  58. agentwall_security-0.1.0/agentwall/interceptors/__init__.py +24 -0
  59. agentwall_security-0.1.0/agentwall/interceptors/agent.py +104 -0
  60. agentwall_security-0.1.0/agentwall/interceptors/base.py +21 -0
  61. agentwall_security-0.1.0/agentwall/interceptors/tool.py +173 -0
  62. agentwall_security-0.1.0/agentwall/models/__init__.py +0 -0
  63. agentwall_security-0.1.0/agentwall/models/schemas.py +93 -0
  64. agentwall_security-0.1.0/agentwall/policies/__init__.py +0 -0
  65. agentwall_security-0.1.0/agentwall/providers/__init__.py +0 -0
  66. agentwall_security-0.1.0/agentwall/providers/anthropic.py +44 -0
  67. agentwall_security-0.1.0/agentwall/providers/base.py +105 -0
  68. agentwall_security-0.1.0/agentwall/providers/chain.py +31 -0
  69. agentwall_security-0.1.0/agentwall/providers/deepseek.py +46 -0
  70. agentwall_security-0.1.0/agentwall/providers/groq.py +46 -0
  71. agentwall_security-0.1.0/agentwall/providers/keyring.py +20 -0
  72. agentwall_security-0.1.0/agentwall/providers/ollama.py +48 -0
  73. agentwall_security-0.1.0/agentwall/providers/openai.py +44 -0
  74. agentwall_security-0.1.0/agentwall/providers/registry.py +64 -0
  75. agentwall_security-0.1.0/agentwall/security/__init__.py +5 -0
  76. agentwall_security-0.1.0/agentwall/security/detectors.py +145 -0
  77. agentwall_security-0.1.0/agentwall/security/engine.py +142 -0
  78. agentwall_security-0.1.0/agentwall/security/exceptions.py +13 -0
  79. agentwall_security-0.1.0/agentwall/security/goal_tracker.py +98 -0
  80. agentwall_security-0.1.0/agentwall/security/policy_engine.py +154 -0
  81. agentwall_security-0.1.0/agentwall/security/result_analyzer.py +169 -0
  82. agentwall_security-0.1.0/agentwall/security/rules.py +152 -0
  83. agentwall_security-0.1.0/agentwall/storage/__init__.py +0 -0
  84. agentwall_security-0.1.0/agentwall/storage/database.py +81 -0
  85. agentwall_security-0.1.0/agentwall/storage/models.py +97 -0
  86. agentwall_security-0.1.0/examples/crewai/example.py +80 -0
  87. agentwall_security-0.1.0/examples/langchain/example.py +72 -0
  88. agentwall_security-0.1.0/examples/openai_agents/example.py +76 -0
  89. agentwall_security-0.1.0/pyproject.toml +110 -0
  90. agentwall_security-0.1.0/tests/__init__.py +0 -0
  91. agentwall_security-0.1.0/tests/conftest.py +14 -0
  92. agentwall_security-0.1.0/tests/integration/__init__.py +0 -0
  93. agentwall_security-0.1.0/tests/integration/test_crewai_integration.py +282 -0
  94. agentwall_security-0.1.0/tests/integration/test_langchain_integration.py +317 -0
  95. agentwall_security-0.1.0/tests/integration/test_openai_agents_integration.py +241 -0
  96. agentwall_security-0.1.0/tests/test_cli.py +28 -0
  97. agentwall_security-0.1.0/tests/test_config_manager.py +63 -0
  98. agentwall_security-0.1.0/tests/test_detectors.py +163 -0
  99. agentwall_security-0.1.0/tests/test_engine_defaults.py +244 -0
  100. agentwall_security-0.1.0/tests/test_event_bus.py +66 -0
  101. agentwall_security-0.1.0/tests/test_event_manager.py +63 -0
  102. agentwall_security-0.1.0/tests/test_goal_inference.py +266 -0
  103. agentwall_security-0.1.0/tests/test_goal_tracker.py +202 -0
  104. agentwall_security-0.1.0/tests/test_inspector_desktop.py +74 -0
  105. agentwall_security-0.1.0/tests/test_inspector_routes.py +375 -0
  106. agentwall_security-0.1.0/tests/test_interceptors.py +219 -0
  107. agentwall_security-0.1.0/tests/test_parse_robust.py +79 -0
  108. agentwall_security-0.1.0/tests/test_policy_engine.py +168 -0
  109. agentwall_security-0.1.0/tests/test_policy_priority.py +76 -0
  110. agentwall_security-0.1.0/tests/test_post_execution.py +151 -0
  111. agentwall_security-0.1.0/tests/test_provider_keyring.py +54 -0
  112. agentwall_security-0.1.0/tests/test_providers.py +137 -0
  113. agentwall_security-0.1.0/tests/test_registry.py +89 -0
  114. agentwall_security-0.1.0/tests/test_result_analyzer.py +164 -0
  115. agentwall_security-0.1.0/tests/test_security_engine.py +93 -0
  116. agentwall_security-0.1.0/tests/test_security_rules.py +115 -0
  117. agentwall_security-0.1.0/tests/test_session_manager.py +49 -0
  118. agentwall_security-0.1.0/tests/test_storage.py +33 -0
@@ -0,0 +1,83 @@
1
+ # Python
2
+ __pycache__/
3
+ *.pyc
4
+ *.pyo
5
+ *.pyd
6
+ *.pyc
7
+
8
+ # Test caches
9
+ .pytest_cache/
10
+ .mypy_cache/
11
+ .ruff_cache/
12
+
13
+ # Coverage
14
+ .coverage
15
+ .coverage.*
16
+ htmlcov/
17
+ coverage.xml
18
+
19
+ # Virtual environments
20
+ .venv/
21
+ venv/
22
+ env/
23
+ ENV/
24
+ .env/
25
+
26
+ # Build artifacts
27
+ build/
28
+ dist/
29
+ *.egg-info/
30
+ *.egg
31
+ MANIFEST
32
+
33
+ # Distribution / packaging
34
+ pip-wheel-metadata/
35
+ .installed.cfg
36
+
37
+ # Environment / secrets
38
+ .env
39
+ .env.*
40
+ *.env
41
+ .envrc
42
+
43
+ # IDE
44
+ .vscode/
45
+ .idea/
46
+ *.swp
47
+ *.swo
48
+ *~
49
+
50
+ # OS
51
+ .DS_Store
52
+ .DS_Store?
53
+ ._*
54
+ Thumbs.db
55
+ desktop.ini
56
+
57
+ # Node / React (frontend build only — committed assets live in ui/dist/)
58
+ agentwall/inspector/ui/node_modules/
59
+ agentwall/inspector/ui/.vite/
60
+ npm-debug.log*
61
+ yarn-debug.log*
62
+ yarn-error.log*
63
+ .npm
64
+ .yarn-integrity
65
+
66
+ # Local databases
67
+ *.db
68
+ *.sqlite
69
+ *.sqlite3
70
+
71
+ # Logs
72
+ *.log
73
+ logs/
74
+
75
+ # Temporary / scratch
76
+ *.tmp
77
+ *.bak
78
+ *.old
79
+ *.orig
80
+ *.backup
81
+
82
+ # Internal planning docs
83
+ docs/superpowers/
@@ -0,0 +1,119 @@
1
+ # Changelog
2
+
3
+ All notable changes to AgentWall are documented here.
4
+
5
+ Format: [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
6
+ Versioning: [Semantic Versioning](https://semver.org/spec/v2.0.0.html)
7
+
8
+ ---
9
+
10
+ ## [0.1.0] — 2026-06-24
11
+
12
+ Initial release.
13
+
14
+ ### Added
15
+
16
+ **Core runtime security**
17
+ - `SecurityEngine` with 5-stage evaluation pipeline: detectors → rules → policy → threshold → LLM
18
+ - `SensitiveResourceDetector`: credential file pattern matching
19
+ - `ScopeExpansionDetector`: cross-session resource drift detection
20
+ - `DataExfiltrationDetector`: external upload pattern detection
21
+ - Rule engine with per-tool-type risk scoring and resource category bonuses
22
+ - Policy engine: user-defined allow/warn/block rules with JSON conditions
23
+ - `ProviderChain`: multi-provider LLM evaluation with fallback
24
+ - `build_default_engine(db)`: auto-constructs engine from DB config (thresholds + provider chain)
25
+
26
+ **Providers**
27
+ - OpenAI (gpt-4o, gpt-4o-mini, gpt-4-turbo, gpt-3.5-turbo)
28
+ - Anthropic (claude-opus-4-8, claude-sonnet-4-6, claude-haiku-4-5)
29
+ - Groq (llama-3.3-70b-versatile, llama-3.1-8b-instant, gemma2-9b-it)
30
+ - DeepSeek (deepseek-chat, deepseek-reasoner)
31
+ - Ollama (local inference, no API key)
32
+
33
+ **Framework integrations**
34
+ - OpenAI Agents SDK: `protect_openai_agent()` with `InputGuardrail` goal inference
35
+ - LangChain: `protect_langchain_agent()` with `executor.invoke()` goal inference; async tool interception via `coroutine` patching
36
+ - CrewAI: `protect_crewai_crew()` with `crew.kickoff()` goal inference
37
+
38
+ **Interceptors**
39
+ - `ProtectedAgent`: session lifecycle management, tool wrapping, goal tracking
40
+ - `ToolInterceptor`: pre-execution evaluation, DB recording, post-execution analysis
41
+ - `protect_agent()`: top-level SDK entry point, optional goal
42
+ - `protect_tool()`: standalone tool wrapping
43
+
44
+ **Post-execution analysis**
45
+ - `ResultAnalyzer` in `agentwall/security/result_analyzer.py`
46
+ - Analyzes tool output after execution: filesystem (credential content), database (bulk rows, sensitive columns), API (confirmed transfers), email (dispatch events), terminal (credential output)
47
+ - Classifications: `NORMAL`, `SENSITIVE_DATA_EXPOSURE`, `BULK_DATA_ACCESS`, `EXTERNAL_TRANSFER`, `EMAIL_DISPATCH`
48
+ - Persists `post_execution_risk`, `result_classification`, `result_detector_hits`, `result_metadata` to evaluation row
49
+ - Storage rules enforced: no content stored — hashes, counts, type info only
50
+ - Pre-execution decision remains authoritative; post-execution NEVER retroactively blocks
51
+
52
+ **Dynamic goal tracking**
53
+ - `GoalTracker` in `agentwall/security/goal_tracker.py`
54
+ - Session goal segments: create, transition, close
55
+ - Transition detection via token-overlap heuristic (threshold 0.4)
56
+ - `ProtectedAgent.maybe_infer_goal()` replaces one-shot inference guard — enables multi-invoke transitions
57
+ - Framework inference patches updated to use `maybe_infer_goal()` on every invoke/kickoff
58
+ - Segments persist: goal text, started_at, ended_at, transition_reason
59
+ - SecurityEngine always evaluates against current active goal (via shared `_goal_ref`)
60
+
61
+ **Goal inference**
62
+ - Optional `goal` parameter in all `protect_*` functions
63
+ - Automatic inference from framework execution entry points
64
+ - Mutable `_goal_ref` shared across all wrapped tool closures
65
+
66
+ **Storage**
67
+ - SQLite at `~/.agentwall/data.db`
68
+ - Tables: `sessions`, `tool_events`, `evaluations`, `policies`, `provider_settings`, `goal_segments`
69
+ - WAL mode, foreign keys enabled
70
+
71
+ **Inspector**
72
+ - FastAPI backend with 9 router groups (added goals router)
73
+ - Built React UI (5 pages: Overview, Sessions, Timeline, Providers, Policies)
74
+ - PyWebView desktop window (`agentwall inspect`)
75
+ - Browser fallback (`agentwall inspect --browser`)
76
+ - Event-driven WebSocket push (in-process pub/sub via `EventBus`; replaces 1.5s SQLite poll)
77
+ - 30s keepalive ping on idle WS connections
78
+ - `GET /api/sessions/{id}/goals` — goal segment timeline
79
+ - `PATCH /api/policies/{name}/priority` — update policy priority
80
+ - `EvaluationSchema` extended with post-execution fields
81
+
82
+ **Policy engine**
83
+ - `priority` field on policies: higher priority evaluated first, creation-order tiebreak
84
+ - `PolicyEngine.set_priority(name, priority)` — runtime priority updates
85
+ - `PolicyEngine.create(name, config, priority=0)` — priority at creation time
86
+
87
+ **GoalTracker hardening**
88
+ - Thread-safe `set_goal()` and `maybe_infer()` via `threading.RLock`
89
+ - Two-signal transition heuristic: full token overlap AND resource token overlap (strips action verbs and stop words) — prevents pure verb changes ("Build X" → "Write X") from triggering new segments while catching true goal shifts ("Build login API" → "Create billing service")
90
+
91
+ **LLM response parsing**
92
+ - `parse_llm_response` handles nested JSON (`{"decision": {"type": "block", "risk": 90}}`)
93
+ - Strips markdown fences (` ```json ` blocks) before parsing
94
+ - Balanced-brace extraction handles arbitrarily nested JSON objects
95
+ - Fallback chain: stripped text → original text → BLOCK decision
96
+
97
+ **CLI**
98
+ - `agentwall version`
99
+ - `agentwall doctor`
100
+ - `agentwall config` (interactive wizard + flag mode)
101
+ - `agentwall inspect`
102
+
103
+ **Security**
104
+ - API keys in OS keyring only (Windows Credential Manager / macOS Keychain / Linux Secret Service)
105
+ - No secrets in SQLite, JSON, YAML, logs, or source
106
+
107
+ **EvalContext history**
108
+ - LLM evaluation receives recent tool history (up to 5 prior events) for contextual analysis
109
+
110
+ ---
111
+
112
+ ## Unreleased
113
+
114
+ ### Known gaps for v0.2.0
115
+ - Async LangChain tool `ainvoke` full coverage (coroutine patching works; ainvoke path tested)
116
+ - Per-account DB path via environment variable
117
+ - Graceful inspector shutdown
118
+ - Test coverage reporting
119
+ - LLM-assisted goal transition disambiguation (current heuristic: token overlap only)
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 AgentWall
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1,337 @@
1
+ Metadata-Version: 2.4
2
+ Name: agentwall-security
3
+ Version: 0.1.0
4
+ Summary: AI Agent Runtime Security Platform — runtime security and behavioral monitoring for agentic AI systems
5
+ Project-URL: Homepage, https://github.com/RwitabrataPan/AgentWall
6
+ Project-URL: Repository, https://github.com/RwitabrataPan/AgentWall
7
+ Project-URL: Issues, https://github.com/RwitabrataPan/AgentWall/issues
8
+ Project-URL: Changelog, https://github.com/RwitabrataPan/AgentWall/blob/main/CHANGELOG.md
9
+ Author: Rwitabrata Pan
10
+ License: MIT License
11
+
12
+ Copyright (c) 2026 AgentWall
13
+
14
+ Permission is hereby granted, free of charge, to any person obtaining a copy
15
+ of this software and associated documentation files (the "Software"), to deal
16
+ in the Software without restriction, including without limitation the rights
17
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
18
+ copies of the Software, and to permit persons to whom the Software is
19
+ furnished to do so, subject to the following conditions:
20
+
21
+ The above copyright notice and this permission notice shall be included in all
22
+ copies or substantial portions of the Software.
23
+
24
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
25
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
26
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
27
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
28
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
29
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
30
+ SOFTWARE.
31
+ License-File: LICENSE
32
+ Keywords: agents,ai,guardrails,llm,monitoring,runtime,security
33
+ Classifier: Development Status :: 3 - Alpha
34
+ Classifier: Intended Audience :: Developers
35
+ Classifier: License :: OSI Approved :: MIT License
36
+ Classifier: Programming Language :: Python :: 3
37
+ Classifier: Programming Language :: Python :: 3.12
38
+ Classifier: Programming Language :: Python :: 3.13
39
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
40
+ Classifier: Topic :: Security
41
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
42
+ Requires-Python: >=3.12
43
+ Requires-Dist: anthropic>=0.25
44
+ Requires-Dist: fastapi>=0.110
45
+ Requires-Dist: httpx>=0.27
46
+ Requires-Dist: keyring>=24.0
47
+ Requires-Dist: openai>=1.30
48
+ Requires-Dist: pydantic>=2.0
49
+ Requires-Dist: pywebview>=5.0
50
+ Requires-Dist: sqlalchemy>=2.0
51
+ Requires-Dist: typer>=0.12
52
+ Requires-Dist: uvicorn[standard]>=0.27
53
+ Provides-Extra: crewai
54
+ Requires-Dist: crewai>=0.80; extra == 'crewai'
55
+ Provides-Extra: dev
56
+ Requires-Dist: httpx>=0.27; extra == 'dev'
57
+ Requires-Dist: pytest-asyncio>=0.23; extra == 'dev'
58
+ Requires-Dist: pytest>=8.0; extra == 'dev'
59
+ Provides-Extra: integrations
60
+ Requires-Dist: crewai>=0.80; extra == 'integrations'
61
+ Requires-Dist: langchain-openai>=0.2; extra == 'integrations'
62
+ Requires-Dist: langchain>=0.3; extra == 'integrations'
63
+ Requires-Dist: openai-agents>=0.17; extra == 'integrations'
64
+ Provides-Extra: langchain
65
+ Requires-Dist: langchain-openai>=0.2; extra == 'langchain'
66
+ Requires-Dist: langchain>=0.3; extra == 'langchain'
67
+ Provides-Extra: openai-agents
68
+ Requires-Dist: openai-agents>=0.17; extra == 'openai-agents'
69
+ Description-Content-Type: text/markdown
70
+
71
+ # AgentWall
72
+
73
+ **Behavior-based runtime security for AI agents.**
74
+
75
+ AgentWall is an SDK-first runtime security platform that sits between AI agents and tools, monitoring actions in real time to detect and prevent unsafe behavior.
76
+
77
+ Unlike prompt scanners and jailbreak detectors, AgentWall focuses on **what agents actually do**, not what users say.
78
+
79
+ ---
80
+
81
+ ## Why AgentWall?
82
+
83
+ Modern AI agents can:
84
+
85
+ * Read files
86
+ * Execute tools
87
+ * Access APIs
88
+ * Send emails
89
+ * Interact with external systems
90
+
91
+ A successful prompt injection often matters only because it changes agent behavior.
92
+
93
+ AgentWall detects:
94
+
95
+ * Goal Hijacking
96
+ * Tool Misuse
97
+ * Scope Expansion
98
+ * Sensitive Resource Access
99
+ * Data Exfiltration
100
+ * Unauthorized Actions
101
+ * Behavioral Drift
102
+
103
+ ---
104
+
105
+ ## How It Works
106
+
107
+ ```text
108
+ User Goal
109
+
110
+ AI Agent
111
+
112
+ AgentWall Runtime
113
+
114
+ Tool Execution
115
+ ```
116
+
117
+ Before a tool executes, AgentWall evaluates:
118
+
119
+ * Current goal
120
+ * Tool being used
121
+ * Resource being accessed
122
+ * Recent tool history
123
+ * Active policies
124
+ * Risk score
125
+
126
+ AgentWall may:
127
+
128
+ * ALLOW
129
+ * WARN
130
+ * BLOCK
131
+
132
+ depending on risk and alignment.
133
+
134
+ ---
135
+
136
+ ## Key Features
137
+
138
+ ### Runtime Security
139
+
140
+ Behavior-based protection for AI agents.
141
+
142
+ ### Goal Tracking
143
+
144
+ Automatically infers and tracks goals throughout a session.
145
+
146
+ ### Policy Engine
147
+
148
+ Create custom allow/warn/block rules.
149
+
150
+ ### Post-Execution Analysis
151
+
152
+ Classifies tool outcomes and records security-relevant findings without storing sensitive outputs.
153
+
154
+ ### Inspector
155
+
156
+ Native desktop security console powered by PyWebView.
157
+
158
+ Launch with:
159
+
160
+ ```bash
161
+ agentwall inspect
162
+ ```
163
+
164
+ ### Provider Agnostic
165
+
166
+ Supports:
167
+
168
+ * OpenAI
169
+ * Anthropic
170
+ * Groq
171
+ * DeepSeek
172
+ * Ollama
173
+
174
+ ### Framework Integrations
175
+
176
+ Supports:
177
+
178
+ * OpenAI Agents SDK
179
+ * LangChain
180
+ * CrewAI
181
+
182
+ ---
183
+
184
+ ## Installation
185
+
186
+ ```bash
187
+ pip install agentwall
188
+ ```
189
+
190
+ ---
191
+
192
+ ## Quick Start
193
+
194
+ ### OpenAI Agents SDK
195
+
196
+ ```python
197
+ from agentwall import protect_agent
198
+
199
+ agent = protect_agent(agent)
200
+
201
+ result = await Runner.run(
202
+ agent,
203
+ "Build a FastAPI CRUD API"
204
+ )
205
+ ```
206
+
207
+ ### LangChain
208
+
209
+ ```python
210
+ from agentwall.integrations import protect_langchain_agent
211
+
212
+ executor = protect_langchain_agent(executor)
213
+ ```
214
+
215
+ ### CrewAI
216
+
217
+ ```python
218
+ from agentwall.integrations import protect_crewai_crew
219
+
220
+ crew = protect_crewai_crew(crew)
221
+ ```
222
+
223
+ ---
224
+
225
+ ## Inspector
226
+
227
+ Launch the desktop Inspector:
228
+
229
+ ```bash
230
+ agentwall inspect
231
+ ```
232
+
233
+ Features:
234
+
235
+ * Session Timeline
236
+ * Security Decisions
237
+ * Risk Scores
238
+ * Goal Segments
239
+ * Detector Results
240
+ * Policy Management
241
+ * Provider Configuration
242
+ * Export (JSON/CSV)
243
+
244
+ ---
245
+
246
+ ## CLI
247
+
248
+ ```bash
249
+ agentwall version
250
+ agentwall doctor
251
+ agentwall config
252
+ agentwall inspect
253
+ ```
254
+
255
+ ---
256
+
257
+ ## Security Model
258
+
259
+ AgentWall focuses on:
260
+
261
+ * Runtime behavior
262
+ * Tool usage
263
+ * Resource access
264
+ * Goal alignment
265
+
266
+ AgentWall does **not** primarily operate as:
267
+
268
+ * Prompt firewall
269
+ * Jailbreak detector
270
+ * Content moderation system
271
+
272
+ Instead it evaluates the consequences of agent actions.
273
+
274
+ ---
275
+
276
+ ## Supported Storage
277
+
278
+ Local-only architecture.
279
+
280
+ Uses:
281
+
282
+ * SQLite
283
+ * OS Keyring
284
+ * Local FastAPI backend
285
+ * Local Inspector UI
286
+
287
+ No cloud dependency required.
288
+
289
+ ---
290
+
291
+ ## Architecture
292
+
293
+ ```text
294
+ Goal Tracking
295
+
296
+ Security Engine
297
+
298
+ Policy Evaluation
299
+
300
+ Risk Assessment
301
+
302
+ Optional LLM Evaluation
303
+
304
+ Decision
305
+
306
+ Tool Execution
307
+
308
+ Post-Execution Analysis
309
+ ```
310
+
311
+ ---
312
+
313
+ ## Documentation
314
+
315
+ * Installation Guide
316
+ * Architecture Guide
317
+ * API Reference
318
+ * Security Guide
319
+ * Testing Guide
320
+
321
+ See the repository documentation for details.
322
+
323
+ ---
324
+
325
+ ## License
326
+
327
+ MIT License.
328
+
329
+ ---
330
+
331
+ ## Status
332
+
333
+ **v0.1.0**
334
+
335
+ Production-ready initial release.
336
+
337
+ Open-source and self-hosted.