Skip to content

v1.2.0 — Agent Run, Company Blueprints, Quality Hardening

Choose a tag to compare

@seanphan seanphan released this 03 Apr 00:55
· 229 commits to main since this release

Highlights

af agent run — Non-streaming task execution for AI agents and scripts. Send a task, get structured JSON back with the response and thread ID. No stream parsing needed.

af paperclip init — Bootstrap a complete Paperclip company from a blueprint in one command. 5 ready-made blueprints: dev-shop, marketing-agency, sales-team, content-studio, support-center.

Quality hardening — 6 autoresearch iterations with Codex and sub-agents. 67 edge-case tests across 3 parallel QA agents. Fresh-agent zero-to-company test verified end-to-end.

New Features

SDK

  • agents.run(agentId, { message, threadId?, timeoutMs? }) — fire-and-wait method that returns { response, threadId, status } (5196fb9)
  • AgentStream.threadId — automatically extracted from the first thread_info data event during streaming
  • AgentStream.userMessageId — extracted alongside threadId
  • New types: AgentRunResult, AgentRunOptions

CLI

  • af agent run — non-streaming agent execution ideal for Bash tool calls (0847324)
    af agent run --agent-id <id> --message "Analyze this" --json
    # → {"status":"completed","thread_id":"...","response":"..."}
  • af paperclip init --blueprint <id> — one-command company bootstrap (33344a1)
  • af paperclip blueprints — list available company templates
  • 5 blueprints: dev-shop, marketing-agency, sales-team, content-studio, support-center
  • af playbook company-from-scratch — AI-executable playbook with VERIFY/EXTRACT/IF-FAIL patterns

Gateway

  • Simplified to thin protocol translator — runtime does all work (a0edc75)
  • Extracts thread_id from runtime stream for response tracking (70729e7)
  • Falls back to GET /agent-threads/{id}/messages if stream parsing fails

Bug Fixes

Critical

  • Paperclip heartbeat spam — Deploy now sets runtimeConfig.heartbeat.intervalSec=0 (on-demand only). Thread ID stable per issue, not per run. (3340e3d)
  • af paperclip connect URL mismatch — was /heartbeat, now /webhook/paperclip (a18d965)
  • Paperclip connector crash — handled missing/partial context in heartbeat payload (a18d965)
  • --company-name silent fallback — now always creates new company instead of deploying to wrong one (79c488f)

Validation & Error Handling

  • Gateway returns 400 (not 502) for validation errors (7d0b3f7)
  • --timeout 0 rejected with clear error (7d0b3f7)
  • --thread-id validated as UUID locally (7d0b3f7)
  • --role validated against known Paperclip roles (7d0b3f7)
  • --fields with no matches returns structured error with available fields (b3dc0bf)
  • agent delete returns { deleted: true, id } instead of null (b3dc0bf)
  • Client-side UUID validation on Paperclip commands (79c488f)
  • Port conflict detection on af gateway serve (79c488f)

Output

  • agent stream returns actual text (not JSON-stringified "ok") (a32f359)
  • schema command has proper human-readable mode (79c488f)
  • No duplicate playbook headings (79c488f)
  • --no-warnings suppresses Node.js TLS noise (79c488f)

Playbooks (AI-First Rewrite)

  • quickstart — VERIFY/EXTRACT/IF-FAIL pattern at every step
  • company-from-scratch — full executable guide with prerequisites gate
  • Both Option A (blueprint) and Option B (custom) documented

Testing

  • 276/276 unit tests pass
  • 6 autoresearch iterations (Codex + sub-agents)
  • 67 edge-case tests across 3 parallel QA agents
  • Fresh-agent zero-to-company test: SUCCESS (found and fixed 2 blocking bugs)
  • Score progression: 6.2 → 8.2 → 8.9 → 9.0

Install

npm install -g @pixelml/agenticflow-cli@1.2.0