# vibetensor/attestix architecture

> Architecture diagram of the GitHub repository vibetensor/attestix, generated by GitDiagram from its file tree, README and a sample of source files (last updated 2026-10-16). It is an AI-made overview: check details against the source.

- Interactive diagram: https://gitdiagram.com/vibetensor/attestix
- Repository: https://github.com/vibetensor/attestix

## Overview

Attestix is a Python toolkit for AI-agent identity and signed governance evidence, exposed through MCP tools and a REST API. Users create and verify agent identities, record credentials and governance evidence, assess compliance, and use delegation, reputation, provenance, and blockchain anchoring capabilities. The graph emphasizes those product stages and the service/storage layer. The README documents portable and offline verification and framework integrations; detailed internal wiring for those unsampled areas is not asserted.

Main entry points: [`attestix/main.py`](https://github.com/VibeTensor/attestix/blob/main/attestix/main.py) (MCP server), [`attestix/api/main.py`](https://github.com/VibeTensor/attestix/blob/main/attestix/api/main.py) (REST application), [`attestix/services/identity_service.py`](https://github.com/VibeTensor/attestix/blob/main/attestix/services/identity_service.py) (Agent identity), [`attestix/services/compliance_service.py`](https://github.com/VibeTensor/attestix/blob/main/attestix/services/compliance_service.py) (Compliance workflows)

## Diagram (Mermaid)

```mermaid
flowchart TD

subgraph group_entry["Interfaces"]
  node_mcp["MCP server<br/>[main.py]"]
  node_rest["REST application<br/>[main.py]"]
  node_identity_tools["Identity tools<br/>[identity_tools.py]"]
  node_agent_tools["Agent-card tools"]
  node_did_tools["DID tools<br/>[did_tools.py]"]
  node_delegation_tools["Delegation tools"]
  node_compliance_tools["Compliance tools"]
  node_identity_api["Identity API<br/>[identity.py]"]
  node_compliance_api["Compliance API<br/>[compliance.py]"]
  node_delegation_api["Delegation API<br/>[delegation.py]"]
  node_provenance_api["Provenance API<br/>[provenance.py]"]
  node_blockchain_api["Blockchain API<br/>[blockchain.py]"]
end

subgraph group_identity["Identity and trust"]
  node_identity_svc["Agent identity"]
  node_agent_svc["Agent cards"]
  node_did_svc["DID resolution<br/>[did_service.py]"]
  node_delegation_svc["Delegation chains"]
  node_reputation_svc["Reputation scoring"]
end

subgraph group_evidence["Governance evidence"]
  node_compliance_svc["Compliance workflows"]
  node_provenance_svc["Provenance records"]
  node_blockchain_svc["Blockchain anchors"]
  node_reports["Compliance reports<br/>[report_service.py]"]
end

subgraph group_runtime["Services and persistence"]
  node_signing["Signing"]
  node_crypto["Cryptographic profiles<br/>[crypto.py]"]
  node_audit["Audit events<br/>[emitter.py]"]
  node_repository["Repository contract<br/>[repository.py]"]
  node_file_store[("File repository<br/>[file_repository.py]")]
  node_memory_store[("Memory repository")]
end

subgraph group_extensions["Portability and integrations"]
  node_bundles["Portable bundles"]
  node_framework_adapters["Framework adapters"]
  node_offline_verifier["Offline verification<br/>[verify-client.tsx]"]
end

node_developer(("Developer"))

node_developer -->|"uses tools"| node_mcp
node_developer -->|"calls API"| node_rest
node_mcp -->|"registers"| node_identity_tools
node_mcp -->|"registers"| node_agent_tools
node_mcp -->|"registers"| node_did_tools
node_mcp -->|"registers"| node_delegation_tools
node_mcp -->|"registers"| node_compliance_tools
node_rest -->|"routes to"| node_identity_api
node_rest -->|"routes to"| node_compliance_api
node_rest -->|"routes to"| node_delegation_api
node_rest -->|"routes to"| node_provenance_api
node_rest -->|"routes to"| node_blockchain_api
node_identity_api -->|"calls"| node_identity_svc
node_compliance_api -->|"calls"| node_compliance_svc
node_delegation_api -->|"calls"| node_delegation_svc
node_provenance_api -->|"calls"| node_provenance_svc
node_blockchain_api -->|"calls"| node_blockchain_svc
node_identity_svc -->|"persists via"| node_repository
node_compliance_svc -->|"persists via"| node_repository
node_blockchain_svc -->|"persists via"| node_repository
node_repository -->|"implemented by"| node_file_store
node_repository -->|"implemented by"| node_memory_store
node_identity_svc -->|"verifies tokens"| node_crypto
node_identity_svc -->|"signs identity"| node_signing
node_compliance_svc -->|"signs evidence"| node_signing
node_blockchain_svc -->|"reads audit events"| node_audit
node_compliance_tools -->|"calls"| node_compliance_svc
node_reports -->|"aggregates status"| node_compliance_svc
node_reports -->|"aggregates identities"| node_identity_svc
node_reports -->|"includes provenance"| node_provenance_svc
node_bundles -.->|"supports portable evidence"| node_offline_verifier
node_framework_adapters -.->|"integrates with frameworks"| node_mcp

click node_mcp "https://github.com/VibeTensor/attestix/blob/main/attestix/main.py"
click node_rest "https://github.com/VibeTensor/attestix/blob/main/attestix/api/main.py"
click node_identity_tools "https://github.com/VibeTensor/attestix/blob/main/attestix/tools/identity_tools.py"
click node_agent_tools "https://github.com/VibeTensor/attestix/blob/main/attestix/tools/agent_card_tools.py"
click node_did_tools "https://github.com/VibeTensor/attestix/blob/main/attestix/tools/did_tools.py"
click node_delegation_tools "https://github.com/VibeTensor/attestix/blob/main/attestix/tools/delegation_tools.py"
click node_compliance_tools "https://github.com/VibeTensor/attestix/blob/main/attestix/tools/compliance_tools.py"
click node_identity_api "https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/identity.py"
click node_compliance_api "https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/compliance.py"
click node_delegation_api "https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/delegation.py"
click node_provenance_api "https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/provenance.py"
click node_blockchain_api "https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/blockchain.py"
click node_identity_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/identity_service.py"
click node_agent_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/agent_card_service.py"
click node_did_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/did_service.py"
click node_delegation_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/delegation_service.py"
click node_reputation_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/reputation_service.py"
click node_compliance_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/compliance_service.py"
click node_provenance_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/provenance_service.py"
click node_blockchain_svc "https://github.com/VibeTensor/attestix/blob/main/attestix/services/blockchain_service.py"
click node_reports "https://github.com/VibeTensor/attestix/blob/main/attestix/services/report_service.py"
click node_signing "https://github.com/VibeTensor/attestix/blob/main/attestix/signing/inprocess_signer.py"
click node_crypto "https://github.com/VibeTensor/attestix/blob/main/attestix/auth/crypto.py"
click node_audit "https://github.com/VibeTensor/attestix/blob/main/attestix/audit/emitter.py"
click node_repository "https://github.com/VibeTensor/attestix/blob/main/attestix/storage/repository.py"
click node_file_store "https://github.com/VibeTensor/attestix/blob/main/attestix/storage/file_repository.py"
click node_memory_store "https://github.com/VibeTensor/attestix/blob/main/attestix/storage/memory_repository.py"
click node_bundles "https://github.com/VibeTensor/attestix/tree/main/attestix/portability"
click node_framework_adapters "https://github.com/VibeTensor/attestix/tree/main/attestix/integrations"
click node_offline_verifier "https://github.com/VibeTensor/attestix/blob/main/website/src/app/(marketing)/verify/verify-client.tsx"

classDef toneNeutral fill:#f8fafc,stroke:#334155,stroke-width:1.5px,color:#0f172a
classDef toneBlue fill:#dbeafe,stroke:#2563eb,stroke-width:1.5px,color:#172554
classDef toneAmber fill:#fef3c7,stroke:#d97706,stroke-width:1.5px,color:#78350f
classDef toneMint fill:#dcfce7,stroke:#16a34a,stroke-width:1.5px,color:#14532d
classDef toneRose fill:#ffe4e6,stroke:#e11d48,stroke-width:1.5px,color:#881337
classDef toneIndigo fill:#e0e7ff,stroke:#4f46e5,stroke-width:1.5px,color:#312e81
classDef toneTeal fill:#ccfbf1,stroke:#0f766e,stroke-width:1.5px,color:#134e4a
class node_mcp,node_rest,node_identity_tools,node_agent_tools,node_did_tools,node_delegation_tools,node_compliance_tools,node_identity_api,node_compliance_api,node_delegation_api,node_provenance_api,node_blockchain_api toneBlue
class node_identity_svc,node_agent_svc,node_did_svc,node_delegation_svc,node_reputation_svc toneAmber
class node_compliance_svc,node_provenance_svc,node_blockchain_svc,node_reports toneMint
class node_signing,node_crypto,node_audit,node_repository,node_file_store,node_memory_store toneRose
class node_bundles,node_framework_adapters,node_offline_verifier,node_developer toneIndigo
```

## Components

### Interfaces

- [MCP server](https://github.com/VibeTensor/attestix/blob/main/attestix/main.py): `attestix/main.py`
- [REST application](https://github.com/VibeTensor/attestix/blob/main/attestix/api/main.py): `attestix/api/main.py`
- [Identity tools](https://github.com/VibeTensor/attestix/blob/main/attestix/tools/identity_tools.py): `attestix/tools/identity_tools.py`
- [Agent-card tools](https://github.com/VibeTensor/attestix/blob/main/attestix/tools/agent_card_tools.py): `attestix/tools/agent_card_tools.py`
- [DID tools](https://github.com/VibeTensor/attestix/blob/main/attestix/tools/did_tools.py): `attestix/tools/did_tools.py`
- [Delegation tools](https://github.com/VibeTensor/attestix/blob/main/attestix/tools/delegation_tools.py): `attestix/tools/delegation_tools.py`
- [Compliance tools](https://github.com/VibeTensor/attestix/blob/main/attestix/tools/compliance_tools.py): `attestix/tools/compliance_tools.py`
- [Identity API](https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/identity.py): `attestix/api/routers/identity.py`
- [Compliance API](https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/compliance.py): `attestix/api/routers/compliance.py`
- [Delegation API](https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/delegation.py): `attestix/api/routers/delegation.py`
- [Provenance API](https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/provenance.py): `attestix/api/routers/provenance.py`
- [Blockchain API](https://github.com/VibeTensor/attestix/blob/main/attestix/api/routers/blockchain.py): `attestix/api/routers/blockchain.py`

### Identity and trust

- [Agent identity](https://github.com/VibeTensor/attestix/blob/main/attestix/services/identity_service.py): `attestix/services/identity_service.py`
- [Agent cards](https://github.com/VibeTensor/attestix/blob/main/attestix/services/agent_card_service.py): `attestix/services/agent_card_service.py`
- [DID resolution](https://github.com/VibeTensor/attestix/blob/main/attestix/services/did_service.py): `attestix/services/did_service.py`
- [Delegation chains](https://github.com/VibeTensor/attestix/blob/main/attestix/services/delegation_service.py): `attestix/services/delegation_service.py`
- [Reputation scoring](https://github.com/VibeTensor/attestix/blob/main/attestix/services/reputation_service.py): `attestix/services/reputation_service.py`

### Governance evidence

- [Compliance workflows](https://github.com/VibeTensor/attestix/blob/main/attestix/services/compliance_service.py): `attestix/services/compliance_service.py`
- [Provenance records](https://github.com/VibeTensor/attestix/blob/main/attestix/services/provenance_service.py): `attestix/services/provenance_service.py`
- [Blockchain anchors](https://github.com/VibeTensor/attestix/blob/main/attestix/services/blockchain_service.py): `attestix/services/blockchain_service.py`
- [Compliance reports](https://github.com/VibeTensor/attestix/blob/main/attestix/services/report_service.py): `attestix/services/report_service.py`

### Services and persistence

- [Signing](https://github.com/VibeTensor/attestix/blob/main/attestix/signing/inprocess_signer.py): `attestix/signing/inprocess_signer.py`
- [Cryptographic profiles](https://github.com/VibeTensor/attestix/blob/main/attestix/auth/crypto.py): `attestix/auth/crypto.py`
- [Audit events](https://github.com/VibeTensor/attestix/blob/main/attestix/audit/emitter.py): `attestix/audit/emitter.py`
- [Repository contract](https://github.com/VibeTensor/attestix/blob/main/attestix/storage/repository.py): `attestix/storage/repository.py`
- [File repository](https://github.com/VibeTensor/attestix/blob/main/attestix/storage/file_repository.py): `attestix/storage/file_repository.py`
- [Memory repository](https://github.com/VibeTensor/attestix/blob/main/attestix/storage/memory_repository.py): `attestix/storage/memory_repository.py`

### Portability and integrations

- [Portable bundles](https://github.com/VibeTensor/attestix/tree/main/attestix/portability): `attestix/portability`
- [Framework adapters](https://github.com/VibeTensor/attestix/tree/main/attestix/integrations): `attestix/integrations`
- [Offline verification](https://github.com/VibeTensor/attestix/blob/main/website/src/app/(marketing)/verify/verify-client.tsx): `website/src/app/(marketing)/verify/verify-client.tsx`

### Other components

- **Developer**

## Connections

- Developer → MCP server: uses tools (evidence: `README.md`)
- Developer → REST application: calls API (evidence: `README.md`)
- MCP server → Identity tools: registers (evidence: `attestix/main.py`)
- MCP server → Agent-card tools: registers (evidence: `attestix/main.py`)
- MCP server → DID tools: registers (evidence: `attestix/main.py`)
- MCP server → Delegation tools: registers (evidence: `attestix/main.py`)
- MCP server → Compliance tools: registers (evidence: `attestix/main.py`)
- REST application → Identity API: routes to (evidence: `attestix/api/main.py`)
- REST application → Compliance API: routes to (evidence: `attestix/api/main.py`)
- REST application → Delegation API: routes to (evidence: `attestix/api/main.py`)
- REST application → Provenance API: routes to (evidence: `attestix/api/main.py`)
- REST application → Blockchain API: routes to (evidence: `attestix/api/main.py`)
- Identity API → Agent identity: calls (evidence: `attestix/api/routers/identity.py`)
- Compliance API → Compliance workflows: calls (evidence: `attestix/api/routers/compliance.py`)
- Delegation API → Delegation chains: calls (evidence: `attestix/api/routers/delegation.py`)
- Provenance API → Provenance records: calls (evidence: `attestix/api/routers/provenance.py`)
- Blockchain API → Blockchain anchors: calls (evidence: `attestix/api/routers/blockchain.py`)
- Agent identity → Repository contract: persists via (evidence: `attestix/services/identity_service.py`)
- Compliance workflows → Repository contract: persists via (evidence: `attestix/services/compliance_service.py`)
- Blockchain anchors → Repository contract: persists via (evidence: `attestix/services/blockchain_service.py`)
- Repository contract → File repository: implemented by (evidence: `attestix/storage/file_repository.py`)
- Repository contract → Memory repository: implemented by (evidence: `attestix/storage/memory_repository.py`)
- Agent identity → Cryptographic profiles: verifies tokens (evidence: `attestix/services/identity_service.py`)
- Agent identity → Signing: signs identity (evidence: `attestix/services/identity_service.py`)
- Compliance workflows → Signing: signs evidence (evidence: `attestix/services/compliance_service.py`)
- Blockchain anchors → Audit events: reads audit events (evidence: `attestix/services/blockchain_service.py`)
- Compliance tools → Compliance workflows: calls (evidence: `attestix/tools/compliance_tools.py`)
- Compliance reports → Compliance workflows: aggregates status (evidence: `attestix/services/report_service.py`)
- Compliance reports → Agent identity: aggregates identities (evidence: `attestix/services/report_service.py`)
- Compliance reports → Provenance records: includes provenance (evidence: `attestix/services/report_service.py`)
- Portable bundles → Offline verification: supports portable evidence (evidence: `README.md`)
- Framework adapters → MCP server: integrates with frameworks (evidence: `README.md`)
