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
2 changes: 2 additions & 0 deletions agentscore/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
DecisionPolicy,
EntityType,
Grade,
Reputation,
ReputationResponse,
ReputationResponseFull,
ReputationStatus,
Expand All @@ -29,6 +30,7 @@
"DecisionPolicy",
"EntityType",
"Grade",
"Reputation",
"ReputationResponse",
"ReputationResponseFull",
"ReputationStatus",
Expand Down
43 changes: 40 additions & 3 deletions agentscore/types.py
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
from __future__ import annotations

from typing import Any, Literal, TypedDict
from typing import Literal, TypedDict

Grade = Literal["A", "B", "C", "D", "F"]
EntityType = Literal["agent", "service", "hybrid", "wallet", "bot", "unknown"]
Expand Down Expand Up @@ -54,6 +54,42 @@ class Activity(TypedDict):
last_verified_tx_at: str | None


class Reputation(TypedDict):
feedback_count: int
client_count: int
trust_avg: float | None
uptime_avg: float | None
activity_avg: float | None
last_feedback_at: str | None


class EvidenceSummary(TypedDict, total=False):
candidate_tx_count: int
confirmed_or_likely_tx: int
endpoint_count: int
github_stars: int
github_url: str | None
has_a2a_agent_card: bool
has_ens: bool
has_github: bool
has_website: bool
healthy_endpoints: int
is_erc8004: bool
metadata_kind: str | None
metadata_quality: str | None
multi_chain_count: int
reputation_feedback_count: int
reputation_trust_avg: float | None
reputation_uptime_avg: float | None
reputation_activity_avg: float | None
reputation_client_count: int
verified_tx_count: int
website_mentions_mcp: bool
website_mentions_x402: bool
website_reachable: bool
website_url: str | None


class OperatorScore(TypedDict):
score: int
grade: Grade
Expand All @@ -75,7 +111,7 @@ class ReputationResponse(TypedDict):
score: Score
identity: Identity | None
activity: Activity | None
evidence_summary: dict[str, Any] | None
evidence_summary: EvidenceSummary | None
data_semantics: str
caveats: list[str]
updated_at: str | None
Expand All @@ -84,6 +120,7 @@ class ReputationResponse(TypedDict):
class ReputationResponseFull(ReputationResponse, total=False):
operator_score: OperatorScore
agents: list[AgentSummary]
reputation: Reputation


class DecisionPolicy(TypedDict, total=False):
Expand All @@ -98,7 +135,7 @@ class AssessResponse(TypedDict):
score: Score
identity: Identity | None
activity: Activity | None
evidence_summary: dict[str, Any] | None
evidence_summary: EvidenceSummary | None
data_semantics: str
caveats: list[str]
updated_at: str | None
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ build-backend = "hatchling.build"

[project]
name = "agentscore-py"
version = "1.1.0"
version = "1.2.0"
description = "Python client for the AgentScore trust and reputation API"
readme = "README.md"
license = "MIT"
Expand Down
8 changes: 4 additions & 4 deletions uv.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading