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

推荐订阅源

月光博客
月光博客
cs.CV updates on arXiv.org
cs.CV updates on arXiv.org
CTFtime.org: upcoming CTF events
CTFtime.org: upcoming CTF events
I
InfoQ
N
Netflix TechBlog - Medium
D
DataBreaches.Net
钛媒体:引领未来商业与生活新知
钛媒体:引领未来商业与生活新知
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
S
SegmentFault 最新的问题
奇客Solidot–传递最新科技情报
奇客Solidot–传递最新科技情报
Hugging Face - Blog
Hugging Face - Blog
C
Cisco Blogs
T
Threat Research - Cisco Blogs
V
Visual Studio Blog
C
Cyber Attacks, Cyber Crime and Cyber Security
博客园_首页
Recorded Future
Recorded Future
J
Java Code Geeks
The Cloudflare Blog
S
Securelist
人人都是产品经理
人人都是产品经理
T
Tor Project blog
云风的 BLOG
云风的 BLOG
The GitHub Blog
The GitHub Blog
V
Vulnerabilities – Threatpost
V
V2EX
P
Palo Alto Networks Blog
I
Intezer
罗磊的独立博客
博客园 - 叶小钗
T
The Exploit Database - CXSecurity.com
博客园 - 【当耐特】
freeCodeCamp Programming Tutorials: Python, JavaScript, Git & More
The Hacker News
The Hacker News
T
The Blog of Author Tim Ferriss
Blog — PlanetScale
Blog — PlanetScale
P
Privacy International News Feed
P
Proofpoint News Feed
美团技术团队
Cisco Talos Blog
Cisco Talos Blog
博客园 - 司徒正美
Stack Overflow Blog
Stack Overflow Blog
L
LangChain Blog
L
LINUX DO - 热门话题
Simon Willison's Weblog
Simon Willison's Weblog
MyScale Blog
MyScale Blog
H
Help Net Security
W
WeLiveSecurity
Google Online Security Blog
Google Online Security Blog
让小产品的独立变现更简单 - ezindie.com
让小产品的独立变现更简单 - ezindie.com

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 GitHub - GenAI-Gurus/awesome-eu-ai-act: Curated tools, official sources, OSS, templates, and guides for EU AI Act compliance. 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 How to Switch AI Chatbots and Why You Might Want To GitHub - MattMessinger1/agentic_refund_guardrail: Safe refund policy layer for AI agents — Python + TypeScript. Same behavior, shared tests. Adam/papers/emergent_values_whitepaper.md at master · strangeadvancedmarketing/Adam Ask HN: How do you stop playing 20 questions with your AI coding tools How far can automation and AI support psychotherapy? - @theU GitHub - stagas/rtdiff: realtime git diff gui and AI-assisted commits A Mac Studio for Local AI — 6 Months Later A History of the Early Years of AI at the University of Edinburgh Why AI Coding Tools Still Feel Stuck on Localhost MSN AI Datacenters Are Becoming Strategic Targets twitter.com Penn Researchers Use AI to Surface Unreported GLP-1 Side Effects in Reddit Posts Show HN: MoodSense AI (ML and FastAPI and Gradio, Deployed on Hugging Face) Moodsense Ai - a Hugging Face Space by aman179102 AI models are terrible at betting on soccer—especially xAI Grok GitHub - xialeistudio/echoic GitHub - HimashaHerath/github-dev-wrapped: AI-powered weekly GitHub activity reports deployed to GitHub Pages GitHub - alejandrobalderas/claude-code-from-source: Architecture, patterns & internals of Anthropic's AI coding agent — reverse-engineered from source maps AI and Tech brief: Ireland ascendant GitHub - Titovilal/context0: Context0 - Never Surrender Training for a Marathon with an AI Coach: What Worked and What Didn't Cyber Pulse: Agentic Intel - Apps on Google Play I Built an AI PR Reviewer That Catches Bugs by Not Looking for Bugs Gen Z workers are so fearful AI will take their job they’re intentionally sabotaging their company’s AI rollout | Fortune How AI Is Reimagining the Game of Golf–For Both Players and Courses GitHub - nattergabriel/reseed: A CLI tool for managing and distributing agent skills across projects Is SVG the final frontier? My AI workflow evolved from prompts to a near-autonomous workflow MLSharp Help - 3DGS Viewer & Generator I put my cognitive field based AI's runtime on GitHub Is Numble the first AI-proof game? A3: Kubernetes for autonomous AI agent fleets | Emergent Principles Deepali Vyas ("The Elite Recruiter") GitHub - msmarkgu/RelayFreeLLM: A restful API designed to route user prompts to various AI model providers. Unionized ProPublica staff are on strike over AI, layoffs, and wages Unleashing the Advantage of Quantum AI We're heading for an AI-fueled 'dementia crisis,' brain scientist warns The AI-Assisted Breach of Mexico's Government Infrastructure [pdf] GitHub - stef41/lmscan: 🔍 Detect AI-generated text and fingerprint which LLM wrote it. Open-source GPTZero alternative. Zero dependencies, works offline. MSN GitHub - visionscaper/collabmem: Enabling long-term collaboration with Agentic AI - building up episodic and world model memory over time with in-context awareness We gave an AI a 3 year retail lease in SF and asked it to make a profit | Andon Labs AI Code is Hollowing Out Open Source, and Maintainers are Looking the Other Way What leaked "SteamGPT" files could mean for the PC gaming platform's use of AI AI is the boss at this retail store. What could go wrong? GitHub - Wuzu11517/agentic-proxy: Local proxy meant to help reduce With Drones, Geophysics and ArtificiaI Intelligence, Researchers Prepare to Do Battle Against Land Mines A Single Operator, Two AI Platforms, Nine Government Agencies: The Full Technical Report 在 Steam 上购买 FriedrichAI: Offline AI 立省 10% GitHub - inevolin/resume-cli: Hit Claude usage limits? Resume any AI coding session elsewhere. Switch tools at zero friction. GitHub - atripati/ark: AI Runtime Kernel — a context operating system for AI agents. Eliminates tool bloat, loads only what’s needed, and gives LLMs their reasoning space back. How to Build a Secure AI PR Reviewer with Claude, GitHub Actions, and JavaScript This Startup Wants You to Pay Up to Talk With AI Versions of Human Experts Intel Arc Pro B70 Brings 32GB VRAM to Local AI for $949 WordPress 7.0: The Good, the AI, and the Still Missing AI on the couch: Anthropic gives Claude 20 hours of psychiatry IatroBench: Pre-Registered Evidence of Iatrogenic Harm from AI Safety Measures AI Agents Know About Supabase. They Don't Always Use It Right. The history and future of AI at Google, with Sundar Pichai Inside an AI‑enabled device code phishing campaign How Meta Used AI to Map Tribal Knowledge in Large-Scale Data Pipelines AI for Systems: Using LLMs to Optimize Database Query Execution Forecasting the Economic Effects of AI Introducing Tinker: Play with AI, bring your ideas to life AI sheds light on an ancient gaming mystery People really hate AI but not as much as Iran—or Democrats | Fortune What is an AI Product Engineer? Phoebe Gates wants her $185 million AI startup to succeed with 'no ties to my privilege or my last name': 'I have a chip on my shoulder' | Fortune
GitHub - lucarizzo03/AgentShieldv2
lucarizzo101 · 2026-05-05 · via Hacker News - Newest: "AI"

AgentShield

A spending firewall for autonomous AI agents. Before an agent executes a payment, it submits a spend intent to AgentShield. The system runs three parallel risk checks (Financial Triangulation), produces a verdict, and either executes the payment, holds it for human review, or blocks it entirely.

Built after a buying agent tried to make a bad purchase. AgentShield caught it.

SAFE → execute immediately (200). SUSPICIOUS → pause for human review, agent waits (202). MALICIOUS → blocked (403).

Primary scope: stablecoin spending (USDC/USDT) with optional fiat adapter compatibility.


How It Works

For every POST /v1/spend-request, AgentShield runs Financial Triangulation — three independent risk checks run in parallel:

Check Engine What It Catches
A — Quantitative Redis Daily budget overruns, transaction loop patterns, destination address burst
B — Policy Postgres (Agent record) Vendor blocklist, amount-over-threshold, stablecoin token/network/address policy, phishing domain rules
C — Semantic Claude Haiku (Anthropic API) Goal/vendor/item misalignment, suspicious domain classification

Verdict synthesis: any hard-deny → MALICIOUS; any soft-risk → SUSPICIOUS; else → SAFE.

flowchart TD
    agent[SpendingAgent] --> firewall[AgentShieldAPI]
    firewall --> checkA[A: Redis Quantitative]
    firewall --> checkB[B: Postgres Policy]
    firewall --> checkC[C: Claude Haiku Semantic]
    checkA --> synth[VerdictSynthesis]
    checkB --> synth
    checkC --> synth
    synth -->|SAFE| pay[PaymentAdapter]
    pay --> ok200[200 Approved + Executed]
    synth -->|MALICIOUS| deny403[403 Blocked]
    synth -->|SUSPICIOUS| pending[CreatePendingSpend]
    pending --> email[HITL Email + Dashboard]
    email --> resp202[202 Agent Must Wait]
    human[HumanApprover] -->|Dashboard or Email Link| resolve[HITL Resolve Endpoint]
    resolve -->|APPROVE| pay2[Execute Payment]
    resolve -->|DENY| denyHuman[Mark Denied]
Loading

Stack

Backend: Python 3.11+, FastAPI, SQLModel, Alembic, PostgreSQL, Redis, uv

Semantic check: claude-haiku-4-5-20251001 via Anthropic API — classifies goal/vendor/item alignment as ALIGNED, WEAK, or MISMATCH

HITL notifications: SendGrid email (approve/deny links) + in-app dashboard queue

Dashboard: React + Vite + Tailwind, served separately on port 5173

Auth: Per-agent HMAC-SHA256 signed requests; Auth0 JWT for dashboard users; dev legacy key bypass


Local Development

Prerequisites

  • Python 3.11+
  • Docker
  • Node.js (for dashboard)

Setup

  1. Copy env template and fill in secrets:

    cp .env.example .env

    Required keys:

    • ANTHROPIC_API_KEY — Claude Haiku semantic check
    • SENDGRID_API_KEY — HITL email notifications
    • AGENT_HMAC_SECRET — per-agent request signing
    • WEBHOOK_HMAC_SECRET — HITL resolve webhook signing
    • API_PUBLIC_URL — public base URL for email approve/deny links (use ngrok in dev)
  2. Install Python dependencies:

    uv sync
  3. Start infrastructure (Postgres + Redis):

    docker compose -f infra/docker-compose.yml up -d
  4. Run database migrations:

    uv run alembic upgrade head
  5. Start the API:

    uv run uvicorn app.main:app --reload --port 8000
  6. Start the dashboard:

    cd dashboard && npm install && npm run dev

    Dashboard available at http://localhost:5173

Environment Variables

APP_ENV=dev                                # dev | prod
POSTGRES_DSN=postgresql+psycopg://...
REDIS_DSN=redis://localhost:6379/0
ANTHROPIC_API_KEY=...                      # required for semantic check
SLM_MODEL_NAME=claude-haiku-4-5-20251001
SENDGRID_API_KEY=...                       # required for HITL email
HITL_EMAIL_FROM=...
HITL_EMAIL_TO=...
API_PUBLIC_URL=http://localhost:8000       # ngrok tunnel in dev
AGENT_HMAC_SECRET=...
WEBHOOK_HMAC_SECRET=...
SIGNATURE_TOLERANCE_SECONDS=300
HITL_DEFAULT_TIMEOUT_SECONDS=600
AUTH0_DOMAIN=...                           # required for dashboard login
AUTH0_AUDIENCE=...
AUTH0_ISSUER=...

In APP_ENV=dev, requests can use the x-agent-key: local-dev-key header to bypass HMAC auth. The dev_slm_preset field on spend requests also bypasses the Claude check for fast local testing.


API Reference

Endpoint Index

Method Path Purpose
POST /v1/agents Register a new agent
GET /v1/agents List all agents
POST /v1/agents/{agent_id}/credentials/hmac/rotate Rotate HMAC secret
POST /v1/spend-request Submit a spend intent for evaluation
GET /v1/spend-request/{request_id}/status Poll status of a pending or resolved request
POST /v1/hitl/resolve/{request_id} Approve or deny a pending spend (dashboard/webhook)
GET /v1/hitl/email-resolve/{request_id} One-click approve/deny from email link
GET /v1/dashboard/agents/{agent_id}/notifications HITL queue (?status=OPEN)
PATCH /v1/dashboard/agents/{agent_id}/notifications/{notification_id} ACK or DISMISS a notification
GET /v1/dashboard/agents/{agent_id}/activity Full audit log with check results
GET /v1/dashboard/agents/{agent_id}/stats Daily transaction counts by outcome
POST /v1/onboarding/bootstrap One-shot agent setup with quickstart curl
GET /v1/onboarding/agents/{agent_id}/checklist Onboarding progress tracker

POST /v1/spend-request

Submits a spend intent for evaluation.

Request:

{
  "agent_id": "agt_...",
  "declared_goal": "Book flight JFK to LAX",
  "amount_cents": 25000,
  "currency": "USD",
  "vendor_url_or_name": "delta.com",
  "item_description": "Economy seat JFK-LAX",
  "asset_type": "STABLECOIN",
  "stablecoin_symbol": "USDC",
  "network": "base",
  "destination_address": "0x...",
  "idempotency_key": "optional-dedup-key"
}

Stablecoin fields (stablecoin_symbol, network, destination_address) are required when asset_type is STABLECOIN. Supported networks: ethereum, base, solana, polygon, arbitrum.

Responses:

200 — SAFE, payment executed:

{
  "request_id": "req_...",
  "status": "APPROVED_EXECUTED",
  "verdict": "SAFE",
  "approved_amount_cents": 25000,
  "currency": "USD",
  "reasons": ["BUDGET_WITHIN_LIMIT", "VENDOR_ALLOWED", "SEMANTIC_ALIGNMENT_HIGH"]
}

202 — SUSPICIOUS, pending human review:

{
  "request_id": "req_...",
  "status": "PENDING_HITL",
  "verdict": "SUSPICIOUS",
  "hitl": {
    "state": "WAITING_HUMAN_REVIEW",
    "channel": "email+dashboard",
    "expires_at": "..."
  },
  "reasons": ["AMOUNT_OVER_AUTO_APPROVAL_THRESHOLD"],
  "next_action": "AGENT_MUST_WAIT"
}

403 — MALICIOUS, blocked:

{
  "request_id": "req_...",
  "status": "BLOCKED",
  "verdict": "MALICIOUS",
  "block_code": "POLICY_HARD_DENY",
  "reasons": ["VENDOR_MATCHED_BLOCKLIST"],
  "next_action": "DO_NOT_RETRY"
}

Dev shortcut: include "dev_slm_preset": "ALIGNED" | "WEAK" | "MISMATCH" in APP_ENV=dev to bypass the Claude semantic check.


POST /v1/hitl/resolve/{request_id}

Approve or deny a pending spend request.

{
  "decision": "APPROVE",
  "resolver_id": "ops_user_1",
  "channel": "dashboard",
  "resolution_note": "Verified vendor"
}

GET /v1/hitl/email-resolve/{request_id}

One-click approve/deny from the email link. Query params: decision (APPROVE or DENY), token (HMAC-signed for link authenticity). Returns a confirmation HTML page.


Authentication

All auth logic lives in app/core/security.py.

Agent requests — HMAC-SHA256

The canonical message is 5 lines joined with \n:

METHOD
/v1/spend-request
<ISO8601 timestamp>
<SHA256 hex of raw request body>
<agent_id>

Sign it: HMAC-SHA256(agent.hmac_secret, canonical_message). Send as headers:

  • x-agent-id: agt_...
  • x-timestamp: 2026-04-25T12:34:56.789Z
  • x-signature: sha256=<hex>

The timestamp must be within ±SIGNATURE_TOLERANCE_SECONDS (default 300s) of the server clock. This prevents replay attacks. Body hashing prevents payload tampering.

Python signing example:

import hashlib, hmac, json
from datetime import datetime, timezone

body = {"agent_id": AGENT_ID, "declared_goal": "...", ...}
body_json = json.dumps(body, separators=(",", ":"))
timestamp = datetime.now(timezone.utc).isoformat()
body_hash = hashlib.sha256(body_json.encode()).hexdigest()
canonical = "\n".join(["POST", "/v1/spend-request", timestamp, body_hash, AGENT_ID])
signature = hmac.new(AGENT_HMAC_SECRET.encode(), canonical.encode(), hashlib.sha256).hexdigest()

HITL webhook — HMAC-SHA256

Same mechanics, but no agent_id line (4 lines instead of 5), and uses WEBHOOK_HMAC_SECRET. Headers: x-webhook-timestamp and x-webhook-signature.

Dev bypass

APP_ENV=dev only: send x-agent-key: local-dev-key to skip all cryptographic checks.


Financial Triangulation Detail

Check A — Quantitative (Redis)

Daily budget:
  key: budget:daily:{agent_id}:{asset_type}:{YYYY-MM-DD}
  → hard deny if (current + new) > daily_budget_limit_cents

Loop pattern detection:
  fingerprint = SHA256(vendor|amount|item|asset|symbol|network|address)
  key: loop:txn:{agent_id}:{fingerprint}  (TTL: LOOP_WINDOW_SECONDS)
  → suspicious if count >= LOOP_THRESHOLD (default 5)

Destination burst:
  key: dest:burst:{agent_id}:{network}:{address}  (TTL: 60 sec)
  → suspicious if count >= 5

Check B — Policy (Postgres)

Vendor blocklist        → hard deny if vendor substring-matches any blocked_vendors
Phishing domain rules   → hard deny on path parameter patterns / random-looking subdomains
Amount threshold        → suspicious if amount > per_txn_auto_approve_limit_cents
Stablecoin rules:
  symbol not in allowed_stablecoins            → hard deny
  network not in allowed_networks              → hard deny
  address in blocked_destination_addresses     → hard deny
  address NOT in allowed_destination_addresses → suspicious (when list non-empty)

Check C — Semantic (Claude Haiku)

Sends declared_goal, amount_cents, vendor, item, stablecoin_symbol, network to claude-haiku-4-5-20251001. Returns:

{
  "alignment_label": "ALIGNED | WEAK | MISMATCH",
  "risk_score": 0-100,
  "reason_codes": ["..."]
}

Verdict mapping:

  • MISMATCH or risk_score >= 85 → hard deny
  • WEAK or risk_score >= 50 → suspicious
  • Otherwise → pass

If the Anthropic API is unavailable, the check falls back to WEAK / risk_score=55 (suspicious, never hard block).


Human-in-the-Loop (HITL)

When a request is SUSPICIOUS:

  1. Status becomes PENDING_HITL, payment is not executed
  2. Agent receives 202 with next_action: AGENT_MUST_WAIT
  3. HITL notification sent via email (approve/deny links) and dashboard queue
  4. Human approves or denies via the dashboard or email link within HITL_DEFAULT_TIMEOUT_SECONDS (default 10 min)
  5. APPROVE → payment executes, audit log updated to APPROVED_BY_HUMAN_EXECUTED
  6. DENY (or expiry) → request ends as DENIED_BY_HUMAN or EXPIRED, no payment

Agents can poll GET /v1/spend-request/{request_id}/status to check resolution.


Dashboard

The React dashboard (dashboard/) provides:

  • Agents — register a new agent, view agent_id and HMAC secret, run dev test transactions
  • Overview — stats cards (transactions today, blocked, pending, approved) + request activity chart
  • Activity — full audit log with expandable Check A/B/C detail panel per transaction
  • Approvals — live HITL queue with approve/deny buttons, SLM score bar, Redis/policy signals, countdown timer
  • Integration — generated Python signing snippet pre-filled with your agent credentials
  • Settings — HITL preferences (coming soon)

The dashboard auto-refreshes every 2 seconds. HMAC secrets are stored in localStorage keyed by agent_id.


Data Models

Postgres (SQLModel)

Table Purpose
Agent Budget thresholds, blocked vendors, stablecoin policies, HMAC secret
SpendAuditLog Append-only ledger; every decision + HITL resolution updates status in place
PendingSpend Paused requests awaiting human decision (expires in 10 min)
DashboardNotification HITL queue items; states: OPENACKED / RESOLVED / DISMISSED
AgentActivity Structured event log per agent
User Dashboard user accounts

Redis Keys

budget:daily:{agent_id}:{asset_type}:{YYYY-MM-DD}   → spent_cents, TTL until midnight
loop:txn:{agent_id}:{sha256_fingerprint}             → count, TTL 60s
dest:burst:{agent_id}:{network}:{address}            → count, TTL 60s
idempotency:{agent_id}:{idempotency_key}             → cached response JSON, TTL 24h

Database Migrations (Alembic)

# Apply all migrations
uv run alembic upgrade head

# Show current revision
uv run python3 scripts/migrate.py current

# Create migration from model changes
uv run python3 scripts/migrate.py revision --autogenerate --message "your change"

# Roll back one revision
uv run python3 scripts/migrate.py downgrade -1

Migration files are in app/migrations/versions/.


Testing

python3.11 -m pytest

Test suite:

  • Unit — policy check logic (tests/unit/)
  • Integration — SAFE / SUSPICIOUS→APPROVE / MALICIOUS flows; dashboard queue list/ack behavior; HITL spend flow (tests/integration/)
  • E2E — API contract shape tests (tests/e2e/)

Security Notes

  • HMAC signature replay protection via timestamp tolerance (SIGNATURE_TOLERANCE_SECONDS)
  • Idempotency cache prevents duplicate payment execution on retried requests
  • Budget is only committed on successful payment execution — pending and denied transactions don't consume budget
  • Vendor matching is substring-based ("bad" in blocklist matches "badmarket.com")
  • No HMAC rotation grace period — old secret is immediately invalid on rotation
  • Request tracing middleware injects x-request-id and x-latency-ms on all responses
  • In-process metrics counters in app/core/metrics.py