agentscore-py 1.0.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.
- agentscore_py-1.0.0/.claude/CLAUDE.md +43 -0
- agentscore_py-1.0.0/.github/ISSUE_TEMPLATE/bug_report.md +21 -0
- agentscore_py-1.0.0/.github/ISSUE_TEMPLATE/feature_request.md +13 -0
- agentscore_py-1.0.0/.github/PULL_REQUEST_TEMPLATE.md +7 -0
- agentscore_py-1.0.0/.github/dependabot.yml +20 -0
- agentscore_py-1.0.0/.github/workflows/ci.yml +22 -0
- agentscore_py-1.0.0/.github/workflows/publish.yml +37 -0
- agentscore_py-1.0.0/.github/workflows/security.yml +50 -0
- agentscore_py-1.0.0/.gitignore +9 -0
- agentscore_py-1.0.0/CODE_OF_CONDUCT.md +31 -0
- agentscore_py-1.0.0/CONTRIBUTING.md +37 -0
- agentscore_py-1.0.0/LICENSE +21 -0
- agentscore_py-1.0.0/PKG-INFO +95 -0
- agentscore_py-1.0.0/README.md +72 -0
- agentscore_py-1.0.0/SECURITY.md +23 -0
- agentscore_py-1.0.0/agentscore/__init__.py +35 -0
- agentscore_py-1.0.0/agentscore/_version.py +1 -0
- agentscore_py-1.0.0/agentscore/client.py +193 -0
- agentscore_py-1.0.0/agentscore/errors.py +5 -0
- agentscore_py-1.0.0/agentscore/py.typed +0 -0
- agentscore_py-1.0.0/agentscore/types.py +156 -0
- agentscore_py-1.0.0/lefthook.yml +14 -0
- agentscore_py-1.0.0/pyproject.toml +43 -0
- agentscore_py-1.0.0/ruff.toml +45 -0
- agentscore_py-1.0.0/tests/__init__.py +0 -0
- agentscore_py-1.0.0/tests/test_client.py +524 -0
- agentscore_py-1.0.0/tests/test_errors.py +36 -0
- agentscore_py-1.0.0/uv.lock +383 -0
- agentscore_py-1.0.0/vulture_whitelist.py +4 -0
|
@@ -0,0 +1,43 @@
|
|
|
1
|
+
# agentscore-py
|
|
2
|
+
|
|
3
|
+
Python client for the AgentScore trust and reputation API.
|
|
4
|
+
|
|
5
|
+
## Architecture
|
|
6
|
+
|
|
7
|
+
Single-package Python library published to PyPI.
|
|
8
|
+
|
|
9
|
+
| File | Purpose |
|
|
10
|
+
|------|---------|
|
|
11
|
+
| `agentscore/` | Source code |
|
|
12
|
+
| `tests/` | pytest tests |
|
|
13
|
+
|
|
14
|
+
## Tooling
|
|
15
|
+
|
|
16
|
+
- **uv** — package manager. Use `uv sync`, `uv run`.
|
|
17
|
+
- **ruff** — linting + formatting. `uv run ruff check .` and `uv run ruff format --check .`.
|
|
18
|
+
- **vulture** — dead code detection.
|
|
19
|
+
- **pytest** — tests. `uv run pytest tests/`.
|
|
20
|
+
- **Lefthook** — git hooks. Pre-commit: ruff. Pre-push: vulture.
|
|
21
|
+
|
|
22
|
+
## Key Commands
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
uv sync --all-extras
|
|
26
|
+
uv run ruff check .
|
|
27
|
+
uv run ruff format .
|
|
28
|
+
uv run pytest tests/
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Workflow
|
|
32
|
+
|
|
33
|
+
1. Create a branch
|
|
34
|
+
2. Make changes
|
|
35
|
+
3. Lefthook runs ruff on commit, vulture on push
|
|
36
|
+
4. Open a PR — CI runs automatically
|
|
37
|
+
5. Merge (squash)
|
|
38
|
+
|
|
39
|
+
## Rules
|
|
40
|
+
|
|
41
|
+
- **No silent refactors**
|
|
42
|
+
- **Never commit .env files or secrets**
|
|
43
|
+
- **Use PRs** — never push directly to main
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Bug Report
|
|
3
|
+
about: Report a bug
|
|
4
|
+
title: ''
|
|
5
|
+
labels: bug
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the bug**
|
|
10
|
+
A clear description of what the bug is.
|
|
11
|
+
|
|
12
|
+
**To reproduce**
|
|
13
|
+
Steps to reproduce the behavior.
|
|
14
|
+
|
|
15
|
+
**Expected behavior**
|
|
16
|
+
What you expected to happen.
|
|
17
|
+
|
|
18
|
+
**Environment**
|
|
19
|
+
- Package version:
|
|
20
|
+
- Runtime (Node.js/Python version):
|
|
21
|
+
- OS:
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: Feature Request
|
|
3
|
+
about: Suggest an improvement
|
|
4
|
+
title: ''
|
|
5
|
+
labels: enhancement
|
|
6
|
+
assignees: ''
|
|
7
|
+
---
|
|
8
|
+
|
|
9
|
+
**Describe the feature**
|
|
10
|
+
A clear description of what you'd like.
|
|
11
|
+
|
|
12
|
+
**Use case**
|
|
13
|
+
Why is this needed? What problem does it solve?
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
version: 2
|
|
2
|
+
updates:
|
|
3
|
+
- package-ecosystem: "uv"
|
|
4
|
+
directory: "/"
|
|
5
|
+
labels: ["dependencies", "python"]
|
|
6
|
+
schedule:
|
|
7
|
+
interval: "weekly"
|
|
8
|
+
day: "monday"
|
|
9
|
+
time: "06:00"
|
|
10
|
+
timezone: "America/New_York"
|
|
11
|
+
|
|
12
|
+
- package-ecosystem: "github-actions"
|
|
13
|
+
directory: "/"
|
|
14
|
+
labels: ["dependencies", "ci"]
|
|
15
|
+
schedule:
|
|
16
|
+
interval: "weekly"
|
|
17
|
+
day: "monday"
|
|
18
|
+
time: "06:00"
|
|
19
|
+
timezone: "America/New_York"
|
|
20
|
+
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
jobs:
|
|
13
|
+
ci:
|
|
14
|
+
runs-on: blacksmith-2vcpu-ubuntu-2404
|
|
15
|
+
steps:
|
|
16
|
+
- uses: actions/checkout@v6
|
|
17
|
+
- uses: astral-sh/setup-uv@v7
|
|
18
|
+
- run: uv sync --frozen --all-extras
|
|
19
|
+
- run: uv run ruff check .
|
|
20
|
+
- run: uv run ruff format --check .
|
|
21
|
+
- run: uv run vulture . vulture_whitelist.py --min-confidence 80 --exclude .venv
|
|
22
|
+
- run: uv run pytest tests/
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
name: Publish
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
tags: ["v*"]
|
|
6
|
+
|
|
7
|
+
permissions:
|
|
8
|
+
contents: write
|
|
9
|
+
id-token: write
|
|
10
|
+
|
|
11
|
+
jobs:
|
|
12
|
+
publish:
|
|
13
|
+
runs-on: blacksmith-2vcpu-ubuntu-2404
|
|
14
|
+
steps:
|
|
15
|
+
- uses: actions/checkout@v6
|
|
16
|
+
|
|
17
|
+
- uses: astral-sh/setup-uv@v7
|
|
18
|
+
|
|
19
|
+
- name: Set version from tag
|
|
20
|
+
run: |
|
|
21
|
+
VERSION="${GITHUB_REF_NAME#v}"
|
|
22
|
+
sed -i "s/^version = .*/version = \"$VERSION\"/" pyproject.toml
|
|
23
|
+
echo "VERSION=$VERSION" >> "$GITHUB_ENV"
|
|
24
|
+
|
|
25
|
+
- run: uv build
|
|
26
|
+
|
|
27
|
+
- name: Publish to PyPI
|
|
28
|
+
uses: pypa/gh-action-pypi-publish@release/v1
|
|
29
|
+
|
|
30
|
+
- name: Commit version bump
|
|
31
|
+
run: |
|
|
32
|
+
git config user.name "github-actions[bot]"
|
|
33
|
+
git config user.email "github-actions[bot]@users.noreply.github.com"
|
|
34
|
+
git add pyproject.toml
|
|
35
|
+
git commit -m "chore: bump version to $VERSION" || true
|
|
36
|
+
git push origin HEAD:main
|
|
37
|
+
|
|
@@ -0,0 +1,50 @@
|
|
|
1
|
+
name: Security
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [main]
|
|
6
|
+
pull_request:
|
|
7
|
+
branches: [main]
|
|
8
|
+
|
|
9
|
+
concurrency:
|
|
10
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
11
|
+
cancel-in-progress: true
|
|
12
|
+
|
|
13
|
+
permissions:
|
|
14
|
+
contents: read
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
osv-scan:
|
|
18
|
+
name: Dependency Scan
|
|
19
|
+
runs-on: blacksmith-2vcpu-ubuntu-2404
|
|
20
|
+
timeout-minutes: 5
|
|
21
|
+
steps:
|
|
22
|
+
- uses: actions/checkout@v6
|
|
23
|
+
|
|
24
|
+
- name: Install osv-scanner
|
|
25
|
+
run: |
|
|
26
|
+
curl -fsSL https://github.com/google/osv-scanner/releases/download/v2.3.2/osv-scanner_linux_amd64 -o osv-scanner
|
|
27
|
+
chmod +x osv-scanner
|
|
28
|
+
|
|
29
|
+
- name: Scan dependencies
|
|
30
|
+
run: ./osv-scanner --lockfile=uv.lock --format=table || true
|
|
31
|
+
|
|
32
|
+
pip-audit:
|
|
33
|
+
name: Python Audit
|
|
34
|
+
runs-on: blacksmith-2vcpu-ubuntu-2404
|
|
35
|
+
timeout-minutes: 5
|
|
36
|
+
steps:
|
|
37
|
+
- uses: actions/checkout@v6
|
|
38
|
+
- uses: astral-sh/setup-uv@v7
|
|
39
|
+
- uses: actions/setup-python@v6
|
|
40
|
+
with:
|
|
41
|
+
python-version: "3.13"
|
|
42
|
+
|
|
43
|
+
- name: Install pip-audit
|
|
44
|
+
run: pip install pip-audit
|
|
45
|
+
|
|
46
|
+
- name: Audit dependencies
|
|
47
|
+
run: |
|
|
48
|
+
uv export --format requirements-txt --no-hashes > requirements.txt
|
|
49
|
+
pip-audit -r requirements.txt --disable-pip --no-deps || true
|
|
50
|
+
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
# Contributor Covenant Code of Conduct
|
|
2
|
+
|
|
3
|
+
## Our Pledge
|
|
4
|
+
|
|
5
|
+
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, caste, color, religion, or sexual identity and orientation.
|
|
6
|
+
|
|
7
|
+
## Our Standards
|
|
8
|
+
|
|
9
|
+
Examples of behavior that contributes to a positive environment:
|
|
10
|
+
|
|
11
|
+
- Using welcoming and inclusive language
|
|
12
|
+
- Being respectful of differing viewpoints and experiences
|
|
13
|
+
- Gracefully accepting constructive criticism
|
|
14
|
+
- Focusing on what is best for the community
|
|
15
|
+
- Showing empathy towards other community members
|
|
16
|
+
|
|
17
|
+
Examples of unacceptable behavior:
|
|
18
|
+
|
|
19
|
+
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
|
20
|
+
- Trolling, insulting or derogatory comments, and personal or political attacks
|
|
21
|
+
- Public or private harassment
|
|
22
|
+
- Publishing others' private information without explicit permission
|
|
23
|
+
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
|
24
|
+
|
|
25
|
+
## Enforcement
|
|
26
|
+
|
|
27
|
+
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the project team at engineering@agentscore.sh. All complaints will be reviewed and investigated promptly and fairly.
|
|
28
|
+
|
|
29
|
+
## Attribution
|
|
30
|
+
|
|
31
|
+
This Code of Conduct is adapted from the [Contributor Covenant](https://www.contributor-covenant.org), version 2.1.
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
# Contributing to AgentScore
|
|
2
|
+
|
|
3
|
+
Thanks for your interest in contributing! Here's how to get started.
|
|
4
|
+
|
|
5
|
+
## Development Setup
|
|
6
|
+
|
|
7
|
+
1. Fork the repo and clone it locally
|
|
8
|
+
2. Install dependencies (see README for tooling)
|
|
9
|
+
3. Create a branch from `main`
|
|
10
|
+
4. Make your changes
|
|
11
|
+
5. Run linting and tests
|
|
12
|
+
6. Open a pull request
|
|
13
|
+
|
|
14
|
+
## Pull Requests
|
|
15
|
+
|
|
16
|
+
- All PRs require 1 approval before merging
|
|
17
|
+
- Squash merge to `main` is the standard
|
|
18
|
+
- Keep PRs focused — one feature or fix per PR
|
|
19
|
+
- Include tests for new functionality
|
|
20
|
+
- Make sure CI passes before requesting review
|
|
21
|
+
|
|
22
|
+
## Reporting Issues
|
|
23
|
+
|
|
24
|
+
Open an issue on GitHub with:
|
|
25
|
+
- A clear description of the problem
|
|
26
|
+
- Steps to reproduce
|
|
27
|
+
- Expected vs actual behavior
|
|
28
|
+
- Environment details (OS, runtime version)
|
|
29
|
+
|
|
30
|
+
## Code Style
|
|
31
|
+
|
|
32
|
+
- **TypeScript repos**: ESLint handles formatting and style. Run `bun run lint` before committing.
|
|
33
|
+
- **Python repos**: Ruff handles linting and formatting. Run `uv run ruff check .` and `uv run ruff format .` before committing.
|
|
34
|
+
|
|
35
|
+
## License
|
|
36
|
+
|
|
37
|
+
By contributing, you agree that your contributions will be licensed under the MIT License.
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2026 AgentScore
|
|
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,95 @@
|
|
|
1
|
+
Metadata-Version: 2.4
|
|
2
|
+
Name: agentscore-py
|
|
3
|
+
Version: 1.0.0
|
|
4
|
+
Summary: Python client for the AgentScore trust and reputation API
|
|
5
|
+
Project-URL: Homepage, https://docs.agentscore.sh
|
|
6
|
+
Project-URL: Repository, https://github.com/agentscore/python-sdk
|
|
7
|
+
Project-URL: Issues, https://github.com/agentscore/python-sdk/issues
|
|
8
|
+
License-Expression: MIT
|
|
9
|
+
License-File: LICENSE
|
|
10
|
+
Keywords: agent,agentic-payments,agentscore,ai-agent,blockchain,erc-8004,reputation,trust,wallet,x402
|
|
11
|
+
Classifier: Development Status :: 4 - Beta
|
|
12
|
+
Classifier: Intended Audience :: Developers
|
|
13
|
+
Classifier: License :: OSI Approved :: MIT License
|
|
14
|
+
Classifier: Programming Language :: Python :: 3
|
|
15
|
+
Classifier: Topic :: Software Development :: Libraries
|
|
16
|
+
Requires-Python: >=3.9
|
|
17
|
+
Requires-Dist: httpx<1.0.0,>=0.25.0
|
|
18
|
+
Provides-Extra: dev
|
|
19
|
+
Requires-Dist: pytest-asyncio>=0.21; extra == 'dev'
|
|
20
|
+
Requires-Dist: pytest>=7.0; extra == 'dev'
|
|
21
|
+
Requires-Dist: respx>=0.21; extra == 'dev'
|
|
22
|
+
Description-Content-Type: text/markdown
|
|
23
|
+
|
|
24
|
+
# agentscore-py
|
|
25
|
+
|
|
26
|
+
[](https://pypi.org/project/agentscore-py/)
|
|
27
|
+
[](LICENSE)
|
|
28
|
+
|
|
29
|
+
Python client for the [AgentScore](https://agentscore.sh) trust and reputation API. Score, verify, and assess AI agent wallets in the [x402](https://github.com/coinbase/x402) payment ecosystem and [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) agent registry.
|
|
30
|
+
|
|
31
|
+
## Install
|
|
32
|
+
|
|
33
|
+
```bash
|
|
34
|
+
pip install agentscore-py
|
|
35
|
+
```
|
|
36
|
+
|
|
37
|
+
## Quick Start
|
|
38
|
+
|
|
39
|
+
```python
|
|
40
|
+
from agentscore import AgentScore
|
|
41
|
+
|
|
42
|
+
client = AgentScore(api_key="ask_...")
|
|
43
|
+
|
|
44
|
+
# Free reputation lookup
|
|
45
|
+
rep = client.get_reputation("0x1234...")
|
|
46
|
+
print(rep["grade"], rep["score"])
|
|
47
|
+
|
|
48
|
+
# Trust decision with policy
|
|
49
|
+
decision = client.get_decision("0x1234...", min_grade="C", min_transactions=5)
|
|
50
|
+
print(decision["decision"]["allow"])
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Async
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
async with AgentScore(api_key="ask_...") as client:
|
|
57
|
+
rep = await client.aget_reputation("0x1234...")
|
|
58
|
+
print(rep["grade"])
|
|
59
|
+
```
|
|
60
|
+
|
|
61
|
+
### Context Manager
|
|
62
|
+
|
|
63
|
+
```python
|
|
64
|
+
with AgentScore(api_key="ask_...") as client:
|
|
65
|
+
rep = client.get_reputation("0x1234...")
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
## Configuration
|
|
69
|
+
|
|
70
|
+
| Parameter | Default | Description |
|
|
71
|
+
|------------|----------------------------|--------------------------|
|
|
72
|
+
| `api_key` | `None` | API key from [agentscore.sh](https://agentscore.sh) |
|
|
73
|
+
| `base_url` | `https://api.agentscore.sh` | API base URL |
|
|
74
|
+
| `timeout` | `10.0` | Request timeout (seconds)|
|
|
75
|
+
|
|
76
|
+
## Error Handling
|
|
77
|
+
|
|
78
|
+
```python
|
|
79
|
+
from agentscore import AgentScore, AgentScoreError
|
|
80
|
+
|
|
81
|
+
try:
|
|
82
|
+
rep = client.get_reputation("0xinvalid")
|
|
83
|
+
except AgentScoreError as e:
|
|
84
|
+
print(e.code, e.status_code, str(e))
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
## Documentation
|
|
88
|
+
|
|
89
|
+
- [API Reference](https://docs.agentscore.sh)
|
|
90
|
+
- [ERC-8004 Standard](https://eips.ethereum.org/EIPS/eip-8004)
|
|
91
|
+
- [x402 Protocol](https://github.com/coinbase/x402)
|
|
92
|
+
|
|
93
|
+
## License
|
|
94
|
+
|
|
95
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
# agentscore-py
|
|
2
|
+
|
|
3
|
+
[](https://pypi.org/project/agentscore-py/)
|
|
4
|
+
[](LICENSE)
|
|
5
|
+
|
|
6
|
+
Python client for the [AgentScore](https://agentscore.sh) trust and reputation API. Score, verify, and assess AI agent wallets in the [x402](https://github.com/coinbase/x402) payment ecosystem and [ERC-8004](https://eips.ethereum.org/EIPS/eip-8004) agent registry.
|
|
7
|
+
|
|
8
|
+
## Install
|
|
9
|
+
|
|
10
|
+
```bash
|
|
11
|
+
pip install agentscore-py
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
## Quick Start
|
|
15
|
+
|
|
16
|
+
```python
|
|
17
|
+
from agentscore import AgentScore
|
|
18
|
+
|
|
19
|
+
client = AgentScore(api_key="ask_...")
|
|
20
|
+
|
|
21
|
+
# Free reputation lookup
|
|
22
|
+
rep = client.get_reputation("0x1234...")
|
|
23
|
+
print(rep["grade"], rep["score"])
|
|
24
|
+
|
|
25
|
+
# Trust decision with policy
|
|
26
|
+
decision = client.get_decision("0x1234...", min_grade="C", min_transactions=5)
|
|
27
|
+
print(decision["decision"]["allow"])
|
|
28
|
+
```
|
|
29
|
+
|
|
30
|
+
### Async
|
|
31
|
+
|
|
32
|
+
```python
|
|
33
|
+
async with AgentScore(api_key="ask_...") as client:
|
|
34
|
+
rep = await client.aget_reputation("0x1234...")
|
|
35
|
+
print(rep["grade"])
|
|
36
|
+
```
|
|
37
|
+
|
|
38
|
+
### Context Manager
|
|
39
|
+
|
|
40
|
+
```python
|
|
41
|
+
with AgentScore(api_key="ask_...") as client:
|
|
42
|
+
rep = client.get_reputation("0x1234...")
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Configuration
|
|
46
|
+
|
|
47
|
+
| Parameter | Default | Description |
|
|
48
|
+
|------------|----------------------------|--------------------------|
|
|
49
|
+
| `api_key` | `None` | API key from [agentscore.sh](https://agentscore.sh) |
|
|
50
|
+
| `base_url` | `https://api.agentscore.sh` | API base URL |
|
|
51
|
+
| `timeout` | `10.0` | Request timeout (seconds)|
|
|
52
|
+
|
|
53
|
+
## Error Handling
|
|
54
|
+
|
|
55
|
+
```python
|
|
56
|
+
from agentscore import AgentScore, AgentScoreError
|
|
57
|
+
|
|
58
|
+
try:
|
|
59
|
+
rep = client.get_reputation("0xinvalid")
|
|
60
|
+
except AgentScoreError as e:
|
|
61
|
+
print(e.code, e.status_code, str(e))
|
|
62
|
+
```
|
|
63
|
+
|
|
64
|
+
## Documentation
|
|
65
|
+
|
|
66
|
+
- [API Reference](https://docs.agentscore.sh)
|
|
67
|
+
- [ERC-8004 Standard](https://eips.ethereum.org/EIPS/eip-8004)
|
|
68
|
+
- [x402 Protocol](https://github.com/coinbase/x402)
|
|
69
|
+
|
|
70
|
+
## License
|
|
71
|
+
|
|
72
|
+
[MIT](LICENSE)
|
|
@@ -0,0 +1,23 @@
|
|
|
1
|
+
# Security Policy
|
|
2
|
+
|
|
3
|
+
## Reporting a Vulnerability
|
|
4
|
+
|
|
5
|
+
If you discover a security vulnerability, please report it responsibly.
|
|
6
|
+
|
|
7
|
+
**Do not open a public GitHub issue for security vulnerabilities.**
|
|
8
|
+
|
|
9
|
+
Instead, email us at **security@agentscore.sh** with:
|
|
10
|
+
|
|
11
|
+
- Description of the vulnerability
|
|
12
|
+
- Steps to reproduce
|
|
13
|
+
- Potential impact
|
|
14
|
+
- Suggested fix (if any)
|
|
15
|
+
|
|
16
|
+
We will acknowledge receipt within 48 hours and aim to release a fix within 7 days for critical issues.
|
|
17
|
+
|
|
18
|
+
## Supported Versions
|
|
19
|
+
|
|
20
|
+
| Version | Supported |
|
|
21
|
+
|---------|-----------|
|
|
22
|
+
| 1.x | ✅ |
|
|
23
|
+
| < 1.0 | ❌ |
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
from agentscore._version import __version__
|
|
2
|
+
from agentscore.client import AgentScore
|
|
3
|
+
from agentscore.errors import AgentScoreError
|
|
4
|
+
from agentscore.types import (
|
|
5
|
+
AgentRecord,
|
|
6
|
+
AgentsListResponse,
|
|
7
|
+
AssessResponse,
|
|
8
|
+
DecisionPolicy,
|
|
9
|
+
EntityType,
|
|
10
|
+
Grade,
|
|
11
|
+
ReputationResponse,
|
|
12
|
+
ReputationStatus,
|
|
13
|
+
StatsERC8004,
|
|
14
|
+
StatsPayments,
|
|
15
|
+
StatsReputation,
|
|
16
|
+
StatsResponse,
|
|
17
|
+
)
|
|
18
|
+
|
|
19
|
+
__all__ = [
|
|
20
|
+
"AgentRecord",
|
|
21
|
+
"AgentScore",
|
|
22
|
+
"AgentScoreError",
|
|
23
|
+
"AgentsListResponse",
|
|
24
|
+
"AssessResponse",
|
|
25
|
+
"DecisionPolicy",
|
|
26
|
+
"EntityType",
|
|
27
|
+
"Grade",
|
|
28
|
+
"ReputationResponse",
|
|
29
|
+
"ReputationStatus",
|
|
30
|
+
"StatsERC8004",
|
|
31
|
+
"StatsPayments",
|
|
32
|
+
"StatsReputation",
|
|
33
|
+
"StatsResponse",
|
|
34
|
+
"__version__",
|
|
35
|
+
]
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
__version__ = "1.0.0"
|