Hasty Briefsbeta

Bilingual

Show HN: Weak Incentives – lean, minimalistic toolkit for background agents

5 months ago
  • #Python
  • #Tooling
  • #LLM
  • Lean, typed building blocks for side-effect-free background agents.
  • Compose deterministic prompts, run typed tools, and parse strict JSON replies without heavy dependencies.
  • Optional adapters snap in when you need a model provider.
  • Built out of frustration with LangGraph and DSPy for better state and context management in LLM apps.
  • Prompt objects compose trees of dataclass-backed sections, render deterministic Markdown, and surface tool contracts.
  • Prompt definitions include hash-based descriptors and on-disk overrides with schema validation.
  • Provider adapters share a conversation loop for tool calls, JSON-schema response formats, and structured payloads.
  • In-process event bus publishes ToolInvoked and PromptExecuted events.
  • Session aggregates typed payloads, supports reducers, and enables rollback.
  • Built-in planning, virtual filesystem, and Python-eval sections enforce validation and expose guided Markdown.
  • Code-review example demonstrates override-aware prompts, session telemetry, and replayable tooling.
  • Prompt optimizers are recommended after establishing a robust evaluation suite.
  • Python 3.12+ required, with 3.14 pinned for development.
  • Structured logging adapter adds contextual metadata to records without manual plumbing.
  • Typed dataclasses ensure consistent telemetry and predictable structured responses.
  • Planning, virtual filesystem, and Python-evaluation sections support plans, staged edits, and calculations.
  • Tools are typed callables returning structured results, with lightweight helpers alongside built-in suites.
  • Session reducers accumulate structured state across prompt and tool events.
  • Sections render through string.Template for readable placeholders and auditable prompt trees.
  • Adapters send rendered prompts to providers and publish telemetry to the event bus.
  • Selectors expose reducer output for audit logs without extra plumbing.
  • Persist optimizer output for runtime section tuning without redeploy.
  • LocalPromptOverridesStore enforces descriptors and reads JSON overrides from a specified directory.
  • Deterministic reviewer enforces typed contracts, persists session state, and supports optimizer-driven overrides.