惯性聚合 高效追踪和阅读你感兴趣的博客、新闻、科技资讯
阅读原文 在惯性聚合中打开

推荐订阅源

V
V2EX
博客园 - 叶小钗
Last Week in AI
Last Week in AI
Google DeepMind News
Google DeepMind News
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Microsoft Security Blog
Microsoft Security Blog
腾讯CDC
P
Proofpoint News Feed
大猫的无限游戏
大猫的无限游戏
The Cloudflare Blog
aimingoo的专栏
aimingoo的专栏
月光博客
月光博客
量子位
A
About on SuperTechFans
Engineering at Meta
Engineering at Meta
Apple Machine Learning Research
Apple Machine Learning Research
Jina AI
Jina AI
博客园 - Franky
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
人人都是产品经理
人人都是产品经理
D
DataBreaches.Net
博客园_首页
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Stack Overflow Blog
Stack Overflow Blog

Hacker News - Newest: "AI"

AI can't read an investor deck AI as an attorney? Student uses ChatGPT, Gemini to sue UW over alleged racial discrimination Hacking MCP Servers in AI Systems – The Rug Pull: Tool Changes After Approval GitHub - MeepCastana/KubeezCut: Free Web based video editor Can AI judge journalism? A Thiel-backed startup says yes, even if it risks chilling whistleblowers Coming soon: 10 Things That Matter in AI Right Now DARPA built an AI to fact-check enemy weapons claims What explains heterogeneity in AI adoption? When AI Meets Muscle: Context-Aware Electrical Stimulation Promises a New Way to Guide Human Movements - Department of Computer Science AI Changed How We Build. It Did Not Change What Matters. Linux rules on using AI-generated code - Copilot is OK, but humans must take 'full responsibility for the… Meta spins up AI version of Mark Zuckerberg to engage with employees Code Mode: Let Your AI Write Programs, Not Just Call Tools | TanStack Blog GitHub - Delavalom/graft: Go framework for building AI agents. Type-safe tools, multi-provider (OpenAI, Anthropic, Gemini, Bedrock), zero vendor SDKs. India's TCS tops estimates, says new AI models did not dent services demand Gen Z's fading AI hype Strong feeling: we are in a folded AI reality GitHub - machinarii/total-recall-catalog: A reference catalog of latest knowledge retrieval, memory & RAG systems GitHub - mensfeld/code-on-incus: Give each AI agent its own isolated machine with root, Docker, and systemd. Active defense detects and stops threats automatically.. Quantization, LoRA, and the 8% Problem: Benchmarking Local LLMs for Production AI Iran war: We spoke to the man making Lego-style AI videos that experts say are powerful propaganda Powell, Bessent discussed Anthropic's Mythos AI cyber threat with major U.S. banks GitHub - immartian/bellamem: Persistent belief-graph memory for AI agents. Retrieves decisive context by importance — not recency, not RAG, not /compact. recursive-mode: The Repo-Native Operating System for AI Engineering After the attack on Sam Altman's home, will AI CEO's go on the offensive? The biggest advance in AI since the LLM Opus 4.6 vs GPT 5.4 One Prompt Unity World Generation Test “AI polls” are fake polls Client Challenge Can AI be a 'child of God'? Inside Anthropic's meeting with Christian leaders
GitHub - devonartis/agentwrit: AI agent credential broker...
tdevonartis · 2026-05-07 · via Hacker News - Newest: "AI"

AgentWrit

CI CodeQL OpenSSF Scorecard Go Reference Go Report Card License Go Version Docker Security Policy EdDSA SPIFFE

Important

Building in public. The broker core and Python SDK are stable and in daily use. For anything non-lab, pin to a versioned tag like v2.0.0 or a commit-pinned digest like main-899e4ca3:latest moves with every main commit and will change without notice. Issues are welcome; external PRs are paused until the contribution workflow is ready. See CHANGELOG.md for what shipped recently.


What is AgentWrit?

AgentWrit gives AI agents temporary, task-scoped credentials instead of long-lived API keys.

When an AI agent needs to do something — read a customer record, call a vendor API, run a query — it asks the AgentWrit broker for a token. The token works for that specific task, expires in minutes, and can be yanked at four different levels the moment anything feels wrong. The agent never touches your long-lived credentials at all.

Think of it as an issuer of legal writs for software: narrow authority, time-limited, revocable at the source.

Why this matters

Traditional IAM was built for humans and long-running services — not for AI agents that spin up, do one task, and disappear. Agents are ephemeral, task-scoped, and delegate to other agents. They need credentials that match that lifecycle. AgentWrit was purpose-built for it.

Traditional IAM for agents AgentWrit
Agents get static API keys or service account credentials designed for long-running services Each agent requests a token scoped to one task
Credentials are over-permissioned because scoping per-task is manual and fragile Scope attenuation is automatic — permissions cannot widen, only equal or narrower
Leaked credential exposes everything the service account can access Leaked token exposes one task, already expiring in minutes
Revoking a static key means rotating it everywhere it's used Revocation is instant at 4 levels — token, agent, task, or delegation chain
No visibility into which agent used which credential for which task Every credential event is audited per-agent, per-task in a tamper-evident hash chain
No native concept of agent-to-agent delegation Delegation is built in — Agent A can delegate scope-attenuated tokens to Agent B (equal or narrower) with full chain tracking

What the audit trail covers: The broker logs credential lifecycle events — issue, renew, revoke, delegate, release, auth failures, and scope violations. It does not see what the agent does with the token at the resource server.

Want the full security model?Concepts & threat model


Quick Start

Prerequisites: Docker. Five minutes to your first agent token.

# 1. Set a strong admin secret (broker exits without it)
export AA_ADMIN_SECRET="$(openssl rand -base64 32)"

# 2. Start the broker
docker run -d --name agentwrit \
  -p 8080:8080 \
  -e AA_ADMIN_SECRET \
  -e AA_BIND_ADDRESS=0.0.0.0 \
  -e AA_DB_PATH=/data/data.db \
  -e AA_SIGNING_KEY_PATH=/data/signing.key \
  -v agentwrit-data:/data \
  devonartis/agentwrit:latest

# 3. Confirm it's up
curl -s http://localhost:8080/v1/health | jq .

# 4. Authenticate as admin
ADMIN_TOKEN=$(curl -s -X POST http://localhost:8080/v1/admin/auth \
  -H "Content-Type: application/json" \
  -d "{\"secret\":\"$AA_ADMIN_SECRET\"}" | jq -r '.access_token')

# 5. Create a launch token (one-time agent registration credential)
LAUNCH_TOKEN=$(curl -s -X POST http://localhost:8080/v1/admin/launch-tokens \
  -H "Authorization: Bearer $ADMIN_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "agent_name": "demo-agent",
    "orch_id": "quickstart",
    "allowed_scope": ["read:data:*"],
    "ttl_seconds": 300
  }' | jq -r '.launch_token')

echo "Launch token: ${LAUNCH_TOKEN:0:20}..."

You now have a launch token. The agent presents this once to register and get its own scoped JWT.

Next steps from here:

I want to... Go to
Register an agent with this launch token (Python SDK) Python SDK →
See the raw HTTP registration flow (curl + openssl) Getting Started walkthrough →
Build from source or use Docker Compose instead Other install options →
Understand what just happened (auth model, SPIFFE IDs, scopes) Concepts →

How it works

AgentWrit implements the Ephemeral Agent Credentialing v1.3 security pattern — an 8-component architecture purpose-built for autonomous AI agents. The pattern was developed as part of the AI Security Blueprints project and AgentWrit is its reference implementation.

AgentWrit Architecture Overview

Detailed diagrams: Token Lifecycle · Security Topology

  1. Operator creates a launch token with an allowed scope ceiling
  2. App hands the launch token to the agent for a specific task
  3. Agent registers with the broker (Ed25519 challenge-response), gets a short-lived JWT
  4. Agent uses the JWT as a Bearer token against resource servers
  5. Agent releases the token when done — or the broker revokes it at any of 4 levels

10 components, one binary. The broker handles identity, tokens, scopes, revocation, delegation, audit, app management, admin auth, observability, and persistence — all in a single Go binary with 5 direct dependencies.

Component What it does Package
Identity Challenge-response registration, SPIFFE IDs internal/identity
Token EdDSA JWT issue / verify / renew, MaxTTL ceiling internal/token
Authz Scope enforcement on every protected route internal/authz
Revocation 4-level revoke: token, agent, task, chain internal/revoke
Audit Tamper-evident hash-chain event log internal/audit
Delegation Scope-attenuated child tokens internal/deleg
App App registration and client credentials internal/app
Admin Admin auth (bcrypt), launch tokens internal/admin
Observability Structured logging, Prometheus /v1/metrics internal/obs
Store SQLite persistence internal/store

Deep dive: Architecture diagrams & data flows →


See it in action — MedAssist AI Demo

The Python SDK includes MedAssist AI: a FastAPI web app where a local LLM dynamically creates broker agents with per-patient scoped credentials. You see scope enforcement, cross-patient denial, delegation, and audit — all in a real-time trace.

What you'll see What it proves
Agents spawn on demand per LLM tool call Dynamic agent creation works
Each agent scoped to one patient ID Per-resource scope isolation
LLM asks for wrong patient → scope_denied Scope enforcement catches cross-boundary access
Clinical agent delegates to prescription agent Delegation with scope attenuation
Tokens renew and release at end of encounter Full lifecycle management

Run it: MedAssist AI demo → · Beginner's guide → · Presenter's guide →


SDKs

Language Repo Install Status
Python agentwrit-python pip install agentauth (PyPI rename pending) v0.3.0 — 15 acceptance tests passing
TypeScript Coming soon Planned
from agentauth import AgentAuthApp

# The SDK hides the Ed25519 challenge-response flow
agent = AgentAuthApp(broker_url="http://localhost:8080").register(
    launch_token=LAUNCH_TOKEN,
    task_id="read-customer-42",
    requested_scope=["read:data:customers:42"],
)

# Use the token at your resource server
response = httpx.get(url, headers=agent.bearer_header)

# Done — release the credential
agent.release()

Full SDK docs: Python SDK →


API at a glance

19 endpoints. Full schemas and examples in the API Reference →.

Method Path Who uses it
Public GET /v1/health Anyone — health check
GET /v1/metrics Monitoring — Prometheus
GET /v1/challenge Agent — get registration nonce
POST /v1/token/validate Resource server — verify a token
Auth POST /v1/admin/auth Operator — get admin JWT
POST /v1/app/auth App — client credential exchange
POST /v1/register Agent — register with launch token
Token POST /v1/token/renew Agent/App — renew before expiry
POST /v1/token/release Agent — signal task completion
POST /v1/delegate Agent/App — scope-attenuated child token
Admin POST /v1/admin/launch-tokens Operator — create agent launch tokens
POST /v1/admin/apps Operator — register an app
GET /v1/admin/apps Operator — list apps
GET /v1/admin/apps/{id} Operator — get app details
PUT /v1/admin/apps/{id} Operator — update app scopes/TTL
DELETE /v1/admin/apps/{id} Operator — deregister app
POST /v1/revoke Operator — revoke at 4 levels
GET /v1/audit/events Operator — query audit trail

All errors return RFC 7807 application/problem+json.


Other install options

Docker Compose (clone + build locally)

git clone https://github.com/devonartis/agentwrit.git && cd agentwrit
export AA_ADMIN_SECRET="$(openssl rand -base64 32)"
./scripts/stack_up.sh
curl -s http://localhost:8080/v1/health | jq .

Tear down: ./scripts/stack_down.sh

Build from source (Go 1.24+)

go build -o bin/broker ./cmd/broker/
go build -o bin/awrit  ./cmd/awrit/
./bin/awrit init --config-path /tmp/agentwrit/config
AA_CONFIG_PATH=/tmp/agentwrit/config ./bin/broker

Pre-built Docker image tags

Tag Moves? Use for
v2.0.0 No Production — pinned semver
main-<sha> No Reproducible deploys — pinned to a commit
latest Every main push Lab and evaluation only

Verify the image (optional, recommended):

cosign verify devonartis/agentwrit:latest \
  --certificate-identity-regexp='^https://github.com/devonartis/agentwrit/\.github/workflows/release\.yml@' \
  --certificate-oidc-issuer=https://token.actions.githubusercontent.com

Configuration

All env vars use the AA_ prefix. Only AA_ADMIN_SECRET is required — the broker exits without it.

Variable Default What it does
AA_ADMIN_SECRET (required) Root credential — treat like a root password
AA_PORT 8080 HTTP listen port
AA_BIND_ADDRESS 127.0.0.1 Bind address (0.0.0.0 for Docker)
AA_DEFAULT_TTL 300 Token lifetime in seconds (5 min)
AA_MAX_TTL 86400 Maximum token lifetime ceiling (24h)
AA_DB_PATH ./data.db SQLite database path
AA_SIGNING_KEY_PATH ./signing.key Ed25519 key path (auto-generated)
AA_TLS_MODE none none, tls, or mtls
AA_LOG_LEVEL verbose quiet, standard, verbose, trace

Full config reference (all env vars, TLS/mTLS setup, config files, operator CLI): Operator guide →


Operator CLI (awrit)

go build -o bin/awrit ./cmd/awrit/
export AACTL_BROKER_URL=http://localhost:8080
export AACTL_ADMIN_SECRET="your-secret"

awrit init                                         # Generate broker config
awrit app register --name my-pipeline --scopes "read:data:*"  # Register an app
awrit revoke --level agent --target <agent-id>     # Revoke all agent tokens
awrit audit events --outcome denied --limit 20     # Query audit trail

Full CLI reference: awrit commands & flags →


Running tests

go test ./...              # All tests
go test ./... -short       # Unit tests only
./scripts/gates.sh task    # Build + lint + unit + security scan
./scripts/gates.sh module  # Full gates including Docker E2E

Documentation

I want to... Go to
Get started from zero Getting Started →
Integrate my app with the broker Developer guide →
Deploy and operate the broker Operator guide →
See all API endpoints and schemas API Reference →
Understand the security model Concepts & threat model →
See architecture diagrams Architecture →
Follow common workflows Common Tasks →
Debug an issue Troubleshooting →
See real-world integration patterns Integration Patterns →
Use the Python SDK Python SDK →
Run the MedAssist demo MedAssist AI →
Read the FAQ FAQ →
Report a security vulnerability Security Policy →
Read the changelog CHANGELOG →

License

AgentWrit is licensed under the PolyForm Internal Use License 1.0.0 — a source-available license designed for internal business use.

Free for internal use by anyone, including for-profit companies. Any individual, business, or organization may use and modify AgentWrit for their own internal operations at no cost and without contacting the licensor. This includes modification by contractors acting on behalf of a permitted user. Internal business use by a for-profit company is explicitly permitted and free.

Requires a commercial license:

  • Hosted or managed-service offerings (SaaS) to third parties — paid or free
  • Embedding AgentWrit in a product you sell or sublicense
  • Resale or redistribution of AgentWrit or modified versions
  • Any third-party access to a running AgentWrit instance, including shared installs across unrelated organizations

Dual-license contact: Non-commercial and research use (nonprofits, education, mentorship programs, open-source projects, trade groups) is typically free on request. Commercial embedding, resale, and hosted-service offerings require a paid commercial license. Email licensing@agentwrit.com with your use case.

See LICENSE for the full license text.


Built With

Built with help from Claude by Anthropic.