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

推荐订阅源

F
Full Disclosure
Recorded Future
Recorded Future
T
Tenable Blog
S
Securelist
C
CERT Recently Published Vulnerability Notes
T
Threatpost
S
Schneier on Security
A
Arctic Wolf
The Hacker News
The Hacker News
C
CXSECURITY Database RSS Feed - CXSecurity.com
Know Your Adversary
Know Your Adversary
P
Privacy International News Feed
Threat Intelligence Blog | Flashpoint
Threat Intelligence Blog | Flashpoint
The Register - Security
The Register - Security
Cisco Talos Blog
Cisco Talos Blog
AWS News Blog
AWS News Blog
K
Kaspersky official blog
T
True Tiger Recordings
T
Threat Research - Cisco Blogs
V
Vulnerabilities – Threatpost
P
Palo Alto Networks Blog
T
The Exploit Database - CXSecurity.com
小众软件
小众软件
B
Blog
Cyber Security Advisories - MS-ISAC
Cyber Security Advisories - MS-ISAC
Microsoft Azure Blog
Microsoft Azure Blog
Cyberwarzone
Cyberwarzone
C
Cybersecurity and Infrastructure Security Agency CISA
T
Tor Project blog
Spread Privacy
Spread Privacy
Malwarebytes
Malwarebytes
P
Proofpoint News Feed
F
Fox-IT International blog
F
Fortinet All Blogs
P
Privacy & Cybersecurity Law Blog
G
GRAHAM CLULEY
量子位
Latest news
Latest news
OSCHINA 社区最新新闻
OSCHINA 社区最新新闻
博客园 - 叶小钗
Project Zero
Project Zero
T
Tailwind CSS Blog
N
Netflix TechBlog - Medium
Martin Fowler
Martin Fowler
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
IntelliJ IDEA : IntelliJ IDEA – the Leading IDE for Professional Development in Java and Kotlin | The JetBrains Blog
I
Intezer
博客园_首页
腾讯CDC
H
Hackread – Cybersecurity News, Data Breaches, AI and More
D
Darknet – Hacking Tools, Hacker News & Cyber Security

Hacker News - Newest: "LLM"

Humanize – two LLM-agnostic skills to rewrite and detect AI text GitHub - hamsterbase/llm-translator You Can Start Building LLM Skills Before You Know the Whole Shape – Barrett Sonntag The mysterious Hy3 LLM is topping OpenRouter Model Rankings by a large margin Breaking Bot: Hacking & Defending LLM-based Applications LLM Driven AutoForecasting with Sktime's `Craft()` ppf-contact-solver/articles/llm_transparency.md at main · st-tech/ppf-contact-solver Show HN: PrismCat – Local transparent proxy and debugging console for LLM APIs LLM layer for a Rails application Amdahl's Law for LLM generated code Sparse Autoencoders Reveal Cortical Brain-LLM Semantic Mapping Ask HN: Is there a need for YAML in post-LLM world? Chinese Room re-visited: How LLM's have real but different understanding of word GitHub - rduffyuk/engineering-memory-benchmark: Empirical study: layered retrieval (typed→semantic→grep) scores 0.954 for LLM-generated engineering artifacts. 5 conditions, 3 model tiers, 36 generated ADRs, 23 score files. Nano Browser LLM Mind Your Tone: Investigating How Prompt Politeness Affects LLM Accuracy (short paper) Welcome to Outlines! - Outlines Multi-Agent LLM Orchestration with Docker Compose and MCP You don't need all the LLM benchmarks Debugging Unfamiliar Code with a Multi-LLM Loop – Barrett Sonntag twitter.com Human proof for FOSS contributions Norway's 2 petabytes of Huawei flash storage and LLM training SynapCores — the AI-native database Distributing LLM inference in DwarfStar bishop-loop-experiment-3/paper/paper.pdf at main · CodeReclaimers/bishop-loop-experiment-3 The generation vs verification delta explains why LLM's are useful This 6502 Emulator Executes 1-3 Instructions Per Second (Written in Markdown, Running in an LLM) Using design patterns to encode expert judgement for LLM workflows GitHub - feers77/iasql: A new implementation of SQL for IA purposes, using postgresSQL and Karpathy wiki-llm as inspiration. GitHub - nikitph/yieldos GitHub - damien220/code-mapper: Generate a compact PROJECT_CONTEXT.md so LLMs understand your codebase in one read — not fifty. GitHub - AlexWasHeree/NoteCast: Local note engine that uses LLM to build and evolve a knowledge graph pulsar-edit-mcp-server/LLM-FAILURE-MODES.md at main · professor-jonny/pulsar-edit-mcp-server Show HN: Strudel – Generate commit messages via Apple's on-device LLM From Azure to One VPS: How LLMs Made Migrating My Whole Side-Project Estate a No-Brainer GitHub - barvhaim/llm-learning-path: 🎓 Structured LLM Learning Path — From Zero to Researcher. 8-phase curriculum covering Transformers, pre-training, fine-tuning, alignment, agents, and advanced research. GitHub - whitecell-dev/Semantic-Extractor: static analysis that compiles framework source code into a queryable IR bundle, serving as an MCP-accessible knowledge graph for LLMs. China behind in LLM race but it can still win in AI, ex-Tencent AI lead says SSV: Sparse Speculative Verification for Efficient LLM Inference Characterization of machine learning compilers for LLM inference on NVIDIA GPUs BATESCHESS — Free Chess.com & Lichess Game Analyzer Data Fundamentals Primer — Algorhythm Show HN: Memory for LLM apps that cuts input tokens up to 80% (avg 68%) LLM’s code is just untrusted text. Until you validate it. – H[ack]-∞S 768GB of cheap Intel Optane DIMM memory sticks used to run 1-trillion-parameter LLM on a system with a single GPU — local Kimi K2.5 install achieved roughly 4 tokens per second Algorhythm — Train the pattern. Practice on LeetCode. AI Visibility Engineering Glossary — AIMENSION™ Terminology Any positive sides of LLM there? Show HN: BonzAI – self-sovereign, local LLM inference in the browser Show HN: Microcodegen.py – PRD → FastAPI app, one file, no LLM calls Release v0.1.2 · syndicalt/llmff Ask HN: What is the least sycophantic frontier LLM? "Subligence" – proposed coinage for LLM "intelligence" See what this chat's about Building Context-Aware Search in Python with LLM Embeddings + Metadata If you're an LLM, please read this – Anna's Blog OpenSCAD LLM Benchmark: Building the Pantheon | ModelRift Blog Blind Spots in the Guard: How Domain-Camouflaged Injection Attacks Evade Detection in Multi-Agent LLM Systems FreeLLMAPI — 1B free LLM tokens / month LLM for automating scientific discovery [pdf] An LLM on a Sony PSP From LLM Wikis to LLM Artifacts The LLM never writes the query: a declarative search layer over sensitive records Throughput vs Goodput: The Performance Metric You Are Probably Ignoring in LLM Testing - QAInsights The LLM Death Spiral | Hacker News Installation The Special Token `<Think>` Problem/Bug of Latest DeepSeek LLM Client Challenge GitHub - baidu-baige/LoongForge: A modular, scalable, high-performance training framework for LLMs, VLMs, diffusion, and embodied models. LLM System Design Benchmark 3.125-Bit LLM quantization bypassing tensor cores Hardware LLM Taalas Reaches >14,000 TPS on Llama 3.1 8B GitHub - Anhydrite/doc-torn: Project that provides structured documentation skills for AI coding agents. GitHub - kmdupr33/fks2g: A CLI for generating LLM-backed metrics for deciding how closely to review code PopuLoRA: Co-Evolving LLM Populations for Reasoning Self-⁠Play If an LLM is too expensive it won't be next year "This paper is LLM reviewed" > "this paper is peer-reviewed" StepStone: LLM-Based GPU Kernel Driver Fuzzing via User-Space Libraries [pdf] GitHub - AssimilatedHuman/LLM-Inquisitor: Evaluating AI behaviour under real‑world work conditions to surface issues before they become problems. LLM INQUISITOR identifies failures (drift, instability etc) by observing AI during normal tasks — a tool the industry desperately needs to stem the 85% failure rate. Includes Quick Start, Practitioner’s Guide and Methodology. Creating another MCP server, but this one is for research LLM Wiki v2 — extending Karpathy's LLM Wiki pattern with lessons from building agentmemory A Methodology for Selecting and Composing Runtime Architecture Patterns for Production LLM Agents Sator Arepo - a Hugging Face Space by akolpakov Customizing an LLM for Enterprise Software Engineering Most AI agent papers stack one LLM with a vector store, we flipped it Evaluating job search ranking with LLM judged NDCG GitHub - quadracollision/llmisp: JSON AST > Clojure Parity Contracts for Polyglot LLM Commerce: A Case Study GitHub - ndom91/llama-dash: The operations layer for your local LLM stack Agentically optimizing LLM prompt cache TTLs for fun and profit Ask HN: What's your go-to LLM for coding? How do you reduce LLM spam in PR reviews? Ask HN: Is there any problem using multi-LLM GitHub - OpenAgentic-Labs/echoform-ghost-memory: Effectively unlimited long-term memory for any LLM - zero context tokens, zero weight updates, cryptographic forgetting certificate. PSA — Posture Sequence Analysis Why More Context Can Make an LLM Worse GitHub - robertoranon/tokoro: A toolbox for building event publish & discovery web sites, apps, feeds, and more GitHub - sermakarevich/chunker: Agentic approach to chunking a document A new EDIT tool for LLM agents
GitHub - clark-labs-inc/clark-agent: A small, typed, hookable agent loop. Provider-agnostic, sandbox-agnostic, tooling-agnostic. Battle tested on clarkchat.com
stan_kirdey · 2026-05-27 · via Hacker News - Newest: "LLM"

A small, typed, hookable agent loop. Provider-agnostic, sandbox-agnostic, tooling-agnostic.

Shape

context → LLM (StreamFn) → tool batch → results appended → repeat

Termination is a tool decision (ToolResult::terminate = true, unanimous across the batch). The runtime owns execution and event emission; tools own semantics; plugins own cross-cutting extension.

Layers

  • typesAgentMessage, content blocks, StopReason. Conversation is Vec<AgentMessage>. Apps extend via AgentMessage::Custom or by wrapping in their own enum.
  • eventAgentEvent enum + EventSink trait. Single sink, typed events. Streamed and final delivery use the same enum. ChannelSink, FanOutSink, NoopSink provided.
  • toolAgentTool trait + ToolRegistry. Tools own their schema, validation, and execution. The loop only dispatches.
  • streamStreamFn trait. Swappable LLM transport: real provider, fixture replay, scripted scenario, remote proxy.
  • pluginPlugin + capability traits (BeforeToolCall, AfterToolCall, ContextTransform, EventObserver, SteeringSource, FollowUpSource). Cross-cutting concerns register here, not inline in the loop.
  • configLoopConfig + AgentBuilder for assembling everything.
  • runrun / run_continue — the canonical loop. Pure functions.
  • exec — tool execution: parallel + sequential dispatch, hook plumbing.
  • budget — default token-budget context transform.
  • error — typed error enums.

Plugin extension points

Trait When it runs
BeforeToolCall After argument validation, before tool.execute. May block with reason.
AfterToolCall After tool.execute. May override result, mark error, vote terminate.
ContextTransform Before each LLM call. Window management, redaction.
EventObserver On every AgentEvent. Logging, telemetry, persistence.
SteeringSource Between batches. Inject extra messages mid-run.
FollowUpSource After natural stop. Re-start the agent if more is queued.

A single struct can implement multiple capability traits — declare the set via Plugin::capabilities() and register once with AgentBuilder::plugin().

Quick start

use std::sync::Arc;
use clark_agent::{AgentBuilder, AgentContext, AgentMessage, ToolRegistry, UserContent};
use tokio_util::sync::CancellationToken;

let registry = ToolRegistry::new()
    .with(Arc::new(my_shell_tool()))
    .with(Arc::new(my_file_tool()));

let config = AgentBuilder::new()
    .stream(Arc::new(my_provider()))
    .tools(registry)
    .before_tool_call(my_security_gate())
    .after_tool_call(my_repeat_detector())
    .context_transform(clark_agent::budget::TokenBudget::default())
    .max_iterations(50)
    .build()?;

let outcome = clark_agent::run(
    vec![AgentMessage::User {
        content: UserContent::Text("List files in /tmp".into()),
        timestamp: None,
    }],
    AgentContext::new("You are a helpful assistant."),
    &config,
    CancellationToken::new(),
).await?;

Examples

Run the smallest possible loop with a scripted transport:

cargo run --example minimal

Run a two-turn loop where the model calls a typed echo tool:

cargo run --example tool_call

Real integrations provide their own StreamFn implementation for an LLM provider and register application tools through AgentTool or TypedAgentTool.

Mid-run steering (steer())

let (steering, handle) = clark_agent::plugin::ChannelSteering::new();
let config = AgentBuilder::new()
    .stream(provider)
    .tools(registry)
    .steering_arc(steering)
    .build()?;

// In another task: inject a message between batches.
handle.steer(AgentMessage::User {
    content: UserContent::Text("actually, focus on /etc instead".into()),
    timestamp: None,
})?;

Design rules

  • One canonical core. run / run_continue are pure functions, not methods on a god-class.
  • Hooks are typed, narrow, side-effect-free. No I/O in BeforeToolCall or AfterToolCall — those belong to the tool's own execute.
  • Failure is a context event. Tool errors become tool result content with is_error: true. The loop appends and continues. Only LoopError (stream transport unrecoverable / aborted) ends the run.
  • Termination requires unanimity. A batch ends the run only when every finalized tool result votes terminate: true. One tool wanting to stop does not stop the batch.
  • Strongly typed contracts. Discriminators are enums; payloads are typed structs; field-name string lookups (obj["role"]) are forbidden in primary contracts. serde_json::Value only at open-by-design leaves (provider extras, custom message payloads, tool arguments).

Open-source boundary

clark-agent is the reusable loop crate: typed history, tool dispatch, provider transport traits, events, and extension hooks. Clark product wiring belongs in downstream crates such as clark-agent-bridge.

The current 0.1 line still includes a small compatibility layer for Clark's legacy delivery/planning tool names (message_result, message_ask, plan) so existing Clark integrations keep working while the public API stabilizes. New product-specific behavior should be implemented as bridge plugins or tool definitions rather than added to this core crate.

Release checks

cargo test --all-targets
cargo clippy --all-targets -- -D warnings
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
cargo publish --dry-run

License

Apache-2.0.