Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
49 changes: 47 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,21 @@ work.

## Getting Started

Install via pip (when released) or add the package to your project:
Install via pip (when released) or add the package to your project.

```bash
pip install agentshield
pip install agentshield-api
```

*If you’re just trying the library out against a test index, you can
install from TestPyPI with:*

```bash
pip install -i https://test.pypi.org/simple agentshield-api
```

Note that the distribution on PyPI is named **agentshield-api** (not
`agentshield`) to avoid collisions with other projects.
```python
from agentshield import SecureFS, OutputGuard

Expand Down Expand Up @@ -65,6 +74,38 @@ scanner.register_pattern("MY_SECRET", re.compile(r"mysecret=\S+"))
Patterns are applied in the order they are registered, and you can also
provide a custom list during initialization.

## Custom policy

By default the library loads a YAML file named `default_policy.yaml` from the
`policies/` directory in the package. You can override this behaviour by
suppling your own `Policy` instance:

```python
from agentshield import SecureFS, Policy

policy = Policy(allowed=["ENV_VAR"], blocked=["API_KEY"], block_mode="error")
fs = SecureFS(policy=policy)
```

Or create your own YAML file and load it:

```python
p = Policy.load_from_file("/path/to/my_policy.yaml")
guard = OutputGuard(policy=p)
```

The configuration schema is simple:

```yaml
allowed:
- ENV_VAR
blocked:
- API_KEY
block_mode: redact # or error or warn
```

This makes it easy to adapt AgentShield to your project’s risk profile.

## Project Structure

```
Expand All @@ -79,6 +120,10 @@ policies/
default_policy.yaml
examples/
example_usage.py
tests/
test_*.py
pyproject.toml
requirements.txt
README.md
LICENSE
```
Expand Down
101 changes: 0 additions & 101 deletions agentshield.egg-info/PKG-INFO

This file was deleted.

19 changes: 0 additions & 19 deletions agentshield.egg-info/SOURCES.txt

This file was deleted.

1 change: 0 additions & 1 deletion agentshield.egg-info/dependency_links.txt

This file was deleted.

4 changes: 0 additions & 4 deletions agentshield.egg-info/requires.txt

This file was deleted.

1 change: 0 additions & 1 deletion agentshield.egg-info/top_level.txt

This file was deleted.