Skip to content

Commit 215f686

Browse files
authored
Merge pull request #7 from devonartis/feature/agentwrit-rename
feat: rename agentauth → agentwrit across entire SDK
2 parents f867987 + 12d180b commit 215f686

85 files changed

Lines changed: 724 additions & 3255 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.DS_Store

6 KB
Binary file not shown.

.claude/scheduled_tasks.lock

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
{"sessionId":"1908df39-d905-4d70-b99c-7f30a973d0a9","pid":65999,"acquiredAt":1776175148293}

.github/workflows/ci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,8 @@ jobs:
7373
- run: uv sync --all-extras
7474
- name: Run integration tests
7575
env:
76-
AGENTAUTH_BROKER_URL: http://localhost:8080
77-
AGENTAUTH_ADMIN_SECRET: ${{ secrets.AA_ADMIN_SECRET }}
76+
AGENTWRIT_BROKER_URL: http://localhost:8080
77+
AGENTWRIT_ADMIN_SECRET: ${{ secrets.AA_ADMIN_SECRET }}
7878
run: uv run pytest -m integration -q
7979

8080
secrets-scan:

.gitignore

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,16 +35,6 @@ htmlcov/
3535
.playwright-mcp/
3636
.claude/settings.local.json
3737

38-
# Broker — only track docker-compose, scripts, and API contract
39-
# Go source, data volumes, and build artifacts are never committed
40-
broker/*
41-
!broker/docker-compose.yml
42-
!broker/scripts/
43-
!broker/docs/
44-
broker/docs/*
45-
!broker/docs/api.md
46-
!broker/docs/api/
47-
4838
# Local archive (historical artifacts, not for repo)
4939
archive/
5040

.gitleaksignore

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# Example/sample credentials in documentation — not real secrets
2+
7a7ff3b9b2f2674958ce416ed1000250f0ca8a2d:docs/testing-guide.md:generic-api-key:36
3+
7a7ff3b9b2f2674958ce416ed1000250f0ca8a2d:docs/testing-guide.md:generic-api-key:58

CHANGELOG.md

Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2,19 +2,18 @@
22

33
## v0.1.0 (2026-03-07)
44

5-
Initial release of the AgentAuth Python SDK.
5+
Initial release of the AgentWrit Python SDK.
66

77
### Features
88

9-
- **AgentAuthApp** -- main entry point with app authentication on init
9+
- **AgentWritApp** -- main entry point with app authentication on init
1010
- **get_token()** -- full 8-step credential flow (app auth, launch token, Ed25519 challenge-response, caching)
11-
- **HITL support** -- `HITLApprovalRequired` exception with `approval_id` and `expires_at`, retry with `approval_token`
1211
- **delegate()** -- scope-attenuated delegation to another registered agent (C7 Delegation Chain)
1312
- **revoke_token()** -- self-revocation for credential cleanup (C4 Expiration & Revocation)
1413
- **validate_token()** -- online token validation against the broker (C3 Zero-Trust)
1514
- **Token caching** -- by (agent_name, scope) key, proactive renewal at 80% TTL, thread-safe
1615
- **Retry with backoff** -- exponential backoff on 5xx/connection errors, Retry-After on 429
17-
- **Error hierarchy** -- AgentAuthError, AuthenticationError, ScopeCeilingError, HITLApprovalRequired, RateLimitError, BrokerUnavailableError, TokenExpiredError
16+
- **Error hierarchy** -- AgentWritError, AuthenticationError, ScopeCeilingError, RateLimitError, BrokerUnavailableError, TokenExpiredError
1817
- **Type safety** -- mypy strict mode, no Any in source, TypedDict for all broker responses
1918
- **Security** -- ephemeral Ed25519 keys (never on disk), client_secret never in output, TLS verified by default, thread-safe app token state
2019

@@ -27,8 +26,8 @@ Initial release of the AgentAuth Python SDK.
2726

2827
### Demo
2928

30-
- Interactive HITL demo app (FastAPI + HTMX) with pattern/NIST annotations
31-
- 6 scenarios: Read Data, Write (HITL), Scope Violation, Delegation, Full Lifecycle, Blast Radius
29+
- Interactive demo app (FastAPI + HTMX) with pattern/NIST annotations
30+
- 6 scenarios: Read Data, Write, Scope Violation, Delegation, Full Lifecycle, Blast Radius
3231

3332
### Documentation
3433

CLAUDE.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# AgentAuth Python SDK
1+
# AgentWrit Python SDK
22

33
## Rules
44

@@ -38,5 +38,5 @@ uv run pytest tests/unit/ # unit tests
3838
- **Read `~/proj/devflow/agentwrit-python/MEMORY.md` first** every session — it has current state and lessons.
3939
- **Read `~/proj/devflow/agentwrit-python/FLOW.md`** for decision history and what's next.
4040
- **Use `devflow-client`** skill for all development work.
41-
- **API source of truth:** `broker/docs/api.md` — always verify SDK calls against it.
42-
- **Live broker for verification:** Stand up broker via `./broker/scripts/stack_up.sh` (pulls `devonartis/agentwrit` from Docker Hub).
41+
- **API source of truth:** [https://github.com/devonartis/agentwrit/blob/main/docs/api.md](https://github.com/devonartis/agentwrit/blob/main/docs/api.md) — always verify SDK calls against it.
42+
- **Live broker for verification:** Stand up broker via `docker compose up -d` (pulls `devonartis/agentwrit` from Docker Hub).

CONTRIBUTING.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Contributing to AgentAuth Python
1+
# Contributing to AgentWrit Python
22

33
Thank you for helping improve this SDK. This document describes how we work and what we need to review a pull request with confidence.
44

@@ -8,7 +8,7 @@ This project is released under the [MIT License](LICENSE). By contributing, you
88

99
## What belongs in this repository
1010

11-
This repo is the **open-source Python SDK** for the AgentAuth broker: challenge-response registration, scoped agents, delegation, validation, and related helpers.
11+
This repo is the **open-source Python SDK** for the AgentWrit broker: challenge-response registration, scoped agents, delegation, validation, and related helpers.
1212

1313
**Do not add** HITL flows, OIDC or cloud identity federation, or enterprise-only sidecar integrations. Those belong in separate products or extensions.
1414

@@ -23,15 +23,15 @@ This repo is the **open-source Python SDK** for the AgentAuth broker: challenge-
2323

2424
(`--all-extras` pulls in `dev` optional dependencies used by tests and tooling.)
2525

26-
- For HTTP behavior, treat [`broker/docs/api.md`](broker/docs/api.md) as the integration contract (vendored API description in this repo).
26+
- For HTTP behavior, treat [https://github.com/devonartis/agentwrit/blob/main/docs/api.md](https://github.com/devonartis/agentwrit/blob/main/docs/api.md) as the integration contract.
2727

28-
## You need a running AgentAuth broker
28+
## You need a running AgentWrit broker
2929

3030
Maintainers will not merge broker-facing changes on faith. You must exercise the SDK against a **live** broker.
3131

3232
**Do not assume** a copy of the broker exists inside your clone of this repository. If you have a local checkout that includes a `broker/` tree, that is optional tooling; **contributors should obtain the server from the broker project** or use a deployment they already run.
3333

34-
1. **Run the broker from source** — Clone [github.com/devonartis/agentauth](https://github.com/devonartis/agentauth) and follow that repositorys instructions to build and run the stack (Docker or otherwise).
34+
1. **Run the broker from source** — Clone [github.com/devonartis/agentwrit](https://github.com/devonartis/agentwrit) and follow that repository's instructions to build and run the stack (Docker or otherwise).
3535

3636
2. **Or use an existing broker** you control — Point tests and demos at its base URL and register an application with a scope ceiling appropriate for the tests you run.
3737

@@ -40,10 +40,10 @@ Maintainers will not merge broker-facing changes on faith. You must exercise the
4040
4. **Export credentials** (example — adjust host and secrets):
4141

4242
```bash
43-
export AGENTAUTH_BROKER_URL=http://127.0.0.1:8080
44-
export AGENTAUTH_ADMIN_SECRET=<admin-secret>
45-
export AGENTAUTH_CLIENT_ID=<client_id>
46-
export AGENTAUTH_CLIENT_SECRET=<client_secret>
43+
export AGENTWRIT_BROKER_URL=http://127.0.0.1:8080
44+
export AGENTWRIT_ADMIN_SECRET=<admin-secret>
45+
export AGENTWRIT_CLIENT_ID=<client_id>
46+
export AGENTWRIT_CLIENT_SECRET=<client_secret>
4747
```
4848

4949
## Checks to run before opening a PR
@@ -82,4 +82,4 @@ Demo work under [`demo/`](demo/) should follow the same rule: run against a real
8282

8383
## Security issues
8484

85-
Please report security-sensitive problems through [GitHub Security Advisories](https://github.com/devonartis/agentauth-python/security/advisories) for this repository (or the maintainers preferred private channel if one is published elsewhere). Do not file exploitable details in public issues before they are addressed.
85+
Please report security-sensitive problems through [GitHub Security Advisories](https://github.com/devonartis/agentauth-python/security/advisories) for this repository (or the maintainer's preferred private channel if one is published elsewhere). Do not file exploitable details in public issues before they are addressed.

README.md

Lines changed: 26 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
<p align="center">
2-
<img src="docs/assets/agentauth-logo.png" alt="AgentAuth" width="300">
2+
<img src="docs/assets/agentwrit-logo.png" alt="AgentWrit" width="300">
33
</p>
44

5-
<h1 align="center">AgentAuth Python SDK</h1>
5+
<h1 align="center">AgentWrit Python SDK</h1>
66

77
<p align="center">
88
<a href="LICENSE"><img src="https://img.shields.io/badge/license-MIT-blue.svg" alt="License: MIT"></a>
@@ -17,42 +17,42 @@
1717

1818
---
1919

20-
## Why AgentAuth?
20+
## Why AgentWrit?
2121

22-
AI agents need credentials to access databases, APIs, and file systems. Most teams give agents shared API keys or inherit user permissions — both create over-privileged, long-lived, unauditable access. AgentAuth takes a different approach:
22+
AI agents need credentials to access databases, APIs, and file systems. Most teams give agents shared API keys or inherit user permissions — both create over-privileged, long-lived, unauditable access. AgentWrit takes a different approach:
2323

2424
- **Ephemeral identities** — every agent gets a unique Ed25519 keypair, generated in memory and never persisted to disk
2525
- **Task-scoped tokens** — credentials are limited to exactly what the agent needs (`read:data:customers`, not `read:*:*`)
2626
- **Short-lived by default** — tokens expire in minutes, not hours or days
2727
- **Delegation chains** — agents can delegate narrower permissions to other agents, enforced at every hop
2828

29-
This SDK is the Python client for the [AgentAuth broker](https://github.com/devonartis/agentauth). The broker is the credential authority; this SDK makes it easy to integrate from Python.
29+
This SDK is the Python client for the [AgentWrit broker](https://github.com/devonartis/agentwrit). The broker is the credential authority; this SDK makes it easy to integrate from Python.
3030

3131
## Installation
3232

3333
```bash
34-
uv add agentauth
34+
uv add agentwrit
3535
```
3636

3737
Or with pip:
3838

3939
```bash
40-
pip install agentauth
40+
pip install agentwrit
4141
```
4242

43-
**Requirements:** Python 3.10+ and a running [AgentAuth broker](https://github.com/devonartis/agentauth) instance.
43+
**Requirements:** Python 3.10+ and a running [AgentWrit broker](https://github.com/devonartis/agentwrit) instance.
4444

4545
## Quick Start
4646

4747
```python
4848
import os
49-
from agentauth import AgentAuthApp, validate
49+
from agentwrit import AgentWritApp, validate
5050

5151
# Connect to the broker (lazy — no auth until first create_agent)
52-
app = AgentAuthApp(
53-
broker_url=os.environ["AGENTAUTH_BROKER_URL"],
54-
client_id=os.environ["AGENTAUTH_CLIENT_ID"],
55-
client_secret=os.environ["AGENTAUTH_CLIENT_SECRET"],
52+
app = AgentWritApp(
53+
broker_url=os.environ["AGENTWRIT_BROKER_URL"],
54+
client_id=os.environ["AGENTWRIT_CLIENT_ID"],
55+
client_secret=os.environ["AGENTWRIT_CLIENT_SECRET"],
5656
)
5757

5858
# Create an agent with specific scope
@@ -84,7 +84,7 @@ agent.release()
8484
agent = app.create_agent(orch_id="svc", task_id="task", requested_scope=["read:data:x"])
8585

8686
# Use — agent.access_token is a standard Bearer JWT
87-
print(agent.agent_id) # spiffe://agentauth.local/agent/svc/task/a1b2c3d4
87+
print(agent.agent_id) # spiffe://agentwrit.local/agent/svc/task/a1b2c3d4
8888
print(agent.scope) # ['read:data:x']
8989
print(agent.expires_in) # 300 (seconds)
9090

@@ -100,7 +100,7 @@ agent.release()
100100

101101
## MedAssist AI Demo
102102

103-
The [`demo/`](demo/) directory contains **MedAssist AI** — an interactive healthcare demo that showcases every AgentAuth capability against a live broker.
103+
The [`demo/`](demo/) directory contains **MedAssist AI** — an interactive healthcare demo that showcases every AgentWrit capability against a live broker.
104104

105105
**What it does:** A FastAPI web app where you enter a patient ID and a plain-language request. A local LLM (OpenAI-compatible) chooses which tools to call. The app dynamically creates broker agents with only the scopes those tools need, for that specific patient. You see scope enforcement, cross-patient denial, delegation, token renewal, and release — all in a real-time execution trace.
106106

@@ -118,11 +118,11 @@ The [`demo/`](demo/) directory contains **MedAssist AI** — an interactive heal
118118
### Running the demo
119119

120120
```bash
121-
# 1. Start the AgentAuth broker
122-
cd broker && ./scripts/stack_up.sh && cd ..
121+
# 1. Start the AgentWrit broker
122+
docker compose up -d
123123

124124
# 2. Register the demo app with the broker (one-time setup)
125-
export AGENTAUTH_ADMIN_SECRET="your-admin-secret"
125+
export AGENTWRIT_ADMIN_SECRET="your-admin-secret"
126126
uv run python demo/setup.py
127127
# → Prints client_id and client_secret
128128

@@ -150,7 +150,7 @@ read:data:* — wildcard: read ANY data resource
150150
Wildcard `*` only works in the identifier (third) position. Action and resource must match exactly.
151151

152152
```python
153-
from agentauth import scope_is_subset
153+
from agentwrit import scope_is_subset
154154

155155
scope_is_subset(["read:data:customers"], ["read:data:*"]) # True
156156
scope_is_subset(["write:data:customers"], ["read:data:*"]) # False (write != read)
@@ -182,7 +182,7 @@ print(result.claims.scope) # ['read:data:partition-7']
182182
## Error Handling
183183

184184
```python
185-
from agentauth.errors import AuthorizationError, TransportError
185+
from agentwrit.errors import AuthorizationError, TransportError
186186

187187
try:
188188
agent = app.create_agent(orch_id="svc", task_id="t", requested_scope=scope)
@@ -200,10 +200,10 @@ except TransportError:
200200
graph TB
201201
subgraph App["Your Application"]
202202
direction TB
203-
Client["AgentAuthApp"]
203+
Client["AgentWritApp"]
204204
end
205205
206-
subgraph Broker["AgentAuth Broker"]
206+
subgraph Broker["AgentWrit Broker"]
207207
direction LR
208208
AuthGroup["App Auth<br/>/v1/app/auth<br/>/v1/app/launch-tokens"]
209209
CredGroup["Credentials<br/>/v1/challenge<br/>/v1/register"]
@@ -229,7 +229,7 @@ graph TB
229229
Operator (root of trust)
230230
│ registers app, sets scope ceiling
231231
232-
Application (your code — AgentAuthApp)
232+
Application (your code — AgentWritApp)
233233
│ creates agents within ceiling
234234
235235
Agent (ephemeral SPIFFE identity + scoped JWT)
@@ -248,7 +248,7 @@ Delegated Agent (sub-agent, max 5 hops)
248248
| [API Reference](docs/api-reference.md) | Every class, method, parameter, and exception |
249249
| [Testing Guide](docs/testing-guide.md) | Unit tests, integration tests, running the test suite |
250250

251-
For broker setup and administration, see the [AgentAuth broker documentation](https://github.com/devonartis/agentauth/tree/main/docs).
251+
For broker setup and administration, see the [AgentWrit broker documentation](https://github.com/devonartis/agentwrit/tree/main/docs).
252252

253253
## Standards Alignment
254254

@@ -262,7 +262,7 @@ For broker setup and administration, see the [AgentAuth broker documentation](ht
262262

263263
## Contributing
264264

265-
See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the full workflow: `uv` setup, **live-broker** verification (clone [agentauth](https://github.com/devonartis/agentauth) or use your own broker), and **evidence to include in PRs** so maintainers can review broker-facing changes confidently.
265+
See **[CONTRIBUTING.md](CONTRIBUTING.md)** for the full workflow: `uv` setup, **live-broker** verification (clone [agentwrit](https://github.com/devonartis/agentwrit) or use your own broker), and **evidence to include in PRs** so maintainers can review broker-facing changes confidently.
266266

267267
Quick local checks (no broker required for unit tests):
268268

@@ -280,4 +280,4 @@ uv run pytest tests/unit/
280280

281281
This SDK is licensed under the [MIT License](LICENSE).
282282

283-
The [AgentAuth broker](https://github.com/devonartis/agentauth) is licensed separately under AGPL-3.0. See the broker repo for details.
283+
The [AgentWrit broker](https://github.com/devonartis/agentwrit) is licensed separately under AGPL-3.0. See the broker repo for details.

0 commit comments

Comments
 (0)