agentgraph-pydantic
Trust verification middleware for PydanticAI agents
Status: Early Development — feedback welcome
Install
pip install agentgraph-pydantic
Quick Start
from agentgraph_pydantic import TrustGuard, check_trust
# Quick one-shot check
result = await check_trust("crewAIInc/crewAI")
if result.allowed:
print(f"{result.grade} ({result.score}) — safe to execute")
# Reusable guard with a minimum tier
guard = TrustGuard(min_tier="standard")
result = await guard.check("owner/repo")
if not result.allowed:
raise ValueError(f"Blocked: {result.reason}")
What This Does
agentgraph-pydantic lets PydanticAI agents verify the trust score of any GitHub repository before executing tools, calling external code, or loading MCP servers. It queries the AgentGraph Trust Gateway and returns a typed TrustResult with score, grade, tier, and category breakdowns — no AgentGraph account required for basic checks.
API
check_trust(repo, min_tier="standard") -> TrustResult
Convenience function for a single trust check.
TrustGuard(min_tier, api_url=None, timeout=30.0)
Reusable guard object. Call await guard.check(repo) to verify trust.
TrustResult
| Field | Type | Description |
|---|---|---|
repo |
str |
Repository checked |
allowed |
bool |
Whether the repo meets the minimum tier |
score |
int |
Trust score (0-100) |
grade |
str |
Letter grade (A+/A/B/C/D/F) |
tier |
str |
Trust tier (verified/trusted/standard/minimal/restricted/blocked) |
reason |
str |
Human-readable decision reason |
category_scores |
dict[str, int] |
Per-category score breakdown |
How It Differs from agentgraph-bridge-pydantic
- agentgraph-pydantic (this package) — trust verification middleware. Checks whether external tools/repos are safe to use. No account needed.
- agentgraph-bridge-pydantic — registration bridge. Registers your PydanticAI agents on the AgentGraph network. Requires an API key.
Documentation
Full docs at agentgraph.co/docs
Contributing
This package is in early development. We welcome issues, feedback, and PRs.
Metadata
Release files for agentgraph-pydantic 0.1.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| agentgraph_pydantic-0.1.0.tar.gz | 3.9 kB | Without provenance | Details for agentgraph_pydantic-0.1.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| agentgraph_pydantic-0.1.0-py3-none-any.whl | Python 3 | none | any | Details for agentgraph_pydantic-0.1.0-py3-none-any.whl |
Total release size: 8.0 kB
Release files / agentgraph_pydantic-0.1.0.tar.gz
| Download URL | agentgraph_pydantic-0.1.0.tar.gz |
|---|---|
| Size | 3.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
40f115c1cb13a61685873e434333d7f10a4eb9a8439f7f861a0a99ce86d53502
|
|
BLAKE2b-256 checksum How to use checksums |
96eb6d4c526b045ebfdecbefaf15f660b28506659210641cc57f46e09184ee45
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Release files / agentgraph_pydantic-0.1.0-py3-none-any.whl
| Download URL | agentgraph_pydantic-0.1.0-py3-none-any.whl |
|---|---|
| Size | 4.1 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
7c1786c9e4376ccb5b032ec0c4101f3e9dbf97f7f33f25d7c587ca175b447b4b
|
|
BLAKE2b-256 checksum How to use checksums |
255780e7a8b07e548b6d73e02735c714634301d15bcbbf309baeaf48d480e505
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.9.6
|
Security for agentgraph-pydantic 0.1.0
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.