SHUR IQ/Managed Agent/Build & First-Run Validation
Agent live/2026-05-29
IQ
ShurIQ Report Engine · Claude Managed Agent

A self-driving report engine, built and proven on a live run.

The ShurIQ Report Engine is now a Claude Managed Agent — Anthropic runs the loop, a per-session container does the work, and every artifact writes straight back into the ShurIQ Report Studio system of record. This is the build record and the first end-to-end validation run, executed against a fresh American Heart Association brief.

4
tools — web research, studio write-back, InfraNodus, editorial deploy
6
ShurIQ skills attached @latest (intelligence-brief, competitive-intel, anti-slop, …)
23
custom-tool round-trips fulfilled host-side on the first run
Opus 4.8
agent + every phase, pinned for the demonstration tier
What it is

The studio's generate path, lifted onto Anthropic's orchestration layer

ShurIQ used to generate reports inline — one Claude call inside the studio's generate.ts. The Managed Agent replaces that with a parameterized agent that runs the full gold-standard pipeline autonomously and writes its output directly into the live shuriq D1 database. The dashboard reads D1 natively, so a correct run closes the intelligence loop with no glue.

Anthropic runs the agent loop. A per-session container executes the agent's tools. Three of the four tools are fulfilled host-side — so the studio's service key, the InfraNodus key, and the Cloudflare token never enter the sandbox.

research fact-check hard gate InfraNodus KG SBPI scoring synthesis build (19 sections)

studio_write host-side

Writes reports, sections, KG layers and scored deltas into D1, and clears the fact-check gate. Authenticates back to the studio with a service bearer the studio validates — no session cookie, no secret in the sandbox.

infranodus_graph host-side

Builds an InfraNodus knowledge graph per layer and returns modularity, top-betweenness concepts and named structural gaps — confirmed against the live API.

agent_toolset_20260401 prebuilt

Web search + fetch for outside-in research, plus read access to the mounted system-of-record contract files (grammar.ts, types.ts).

deploy_editorial host-side

Optional — publishes the editorial site + viz hub to Cloudflare Pages and records the live URL when an archetype ships a public artifact.

First-run validation · 2026-05-29

A fresh AHA brief, generated autonomously

We chose the American Heart Association as the first run — a report ShurIQ knows well — and staged a clean report row (rpt-aha-agent-val, Editorial Brief — Sales) for the agent to populate, preserving the existing AHA pressure-test to compare against. Then the agent was handed one instruction: an outcome to satisfy, graded against the "Done" rubric.

pass+corr
fact-check hard gate — cleared before any SBPI scoring, exactly as the gate contract requires
72
SBPI composite (sas_composite) — scored after the gate cleared
ready
graph_status — InfraNodus layers built and graph_data populated

The agent ran the real pipeline: 54 web-research calls, 38 reasoning steps, and 23 custom-tool round-trips — each one surfaced to the host, fulfilled against the studio or InfraNodus, and returned to the agent. The fact-check gate fired between research and scoring; SBPI only ran once it cleared; sections were composed and written back one by one. Every write landed in the live shuriq D1.

Agent-generated AHA intelligence brief — header and Letter from the Editor
Snapshot — the agent's actual output in D1, rendered. The Letter from the Editor it composed: grounded (Giving USA 2025, the mid-2025 NIH grant terminations), on-voice, and explicitly tied back to ShurIQ's prior Trust-without-Differentiation read (3.39/5). SBPI 72/100, fact-check passed, linter passed, graph ready — all set by the agent.

The full 18-section brief — Letter, Context, Numbers Spine, Topology Map, Stack Rank, Reframe, Structural Gaps, a 1,281-word Gap Analysis, Competitive Lens, Method Audit, Structural Advantage Score, Action Set, Ask, Bridge, Appendix — was written section by section into the live system of record. Open the full generated brief →

Live agent configuration

What's provisioned

FieldValue
Agentagent_011zHwRK227kpyYuUMXSzcdx — "ShurIQ Report Engine"
Modelclaude-opus-4-8 (agent + every phase)
Toolsagent_toolset_20260401 · studio_write · infranodus_graph · deploy_editorial
Skills6 @latest — intelligence-brief · competitive-intel · anti-slop · ontology-management · value-flow-ontology · evidence-trail
System prompt2,763 chars — voice anchors, anti-slop hard rules, the phase contract, IP-layer protection
Environmentenv_01MZBXJc… — cloud, limited networking
Org / workspaceSense Collective · Default workspace
Studio fixes shipped along the way

Three latent studio bugs, found and fixed

The missing linter migration fixed

The code referenced linter_status / linter_failures everywhere, but no migration ever created the columns — any linter write would 500. Authored 0005_v06_grammar_linter.sql and applied it to remote + local.

InfraNodus grounding read empty fixed

The studio's InfraNodus client read raw.statistics / topInfluentialNodes — paths that don't exist in the live envelope, so graph grounding silently came back empty. Confirmed the real shape live and repointed it at extendedGraphSummary + graph.graphologyGraph.attributes.

No service auth for write-back fixed

Every write endpoint required a session cookie, so the agent couldn't write at all. Added requireUserOrService (cookie OR a service bearer) and the two missing routes — /kg-layers and /kg-deltas.

Report PATCH couldn't set graph / publish state fixed

Extended PATCH /reports/:id so the agent can set graph_status, graph_ref, graph_data, linter_status and published_url — the fields the "Done" rubric requires.

The hard-won API map

What the Managed Agents beta actually wants

Most of the build was learning the exact shapes the beta accepts — confirmed live, not guessed. These are baked into the reproducible setup.sh.

ThingReality
Skill uploadcurl with folder-qualified multipart filenames where the folder == the name: in SKILL.md (the CLI basenames paths and is unusable)
Agent ↔ skillsThe agent must be created with a workspace API key — an OAuth-login agent can't resolve workspace skills
model field{"id":"claude-opus-4-8"} (model_config) or a bare string — not {"model":…}
prebuilt toolbare {"type":"agent_toolset_20260401"} — no tool sub-array
skill ref{"type":"custom","skill_id":"…","version":"latest"}
session kickoffuser.define_outcome with description + a text rubric, sent via events.send(id, {events}) — not a create param
tool resultuser.custom_tool_result with custom_tool_use_id + content as an array of blocks
file resourcemounted per-session as {type:"file",file_id,mount_path}
Where it lives

Two interchangeable hosts, one shared core

runtime.ts is host-agnostic — the same loop runs under a Node host (server.ts) or a Cloudflare Worker (worker/worker.ts), both implementing the studio's dormant trigger contract. Flip the studio's AGENT_ENDPOINT_URL to either and the Generate button hands the run to the agent. The whole harness is committed and tagged managed-agent-v0.1.

ShurIQ Report Engine · Managed Agent build & first-run validation · 2026-05-29
Generated for Sense Collective / Shur Agency. Agent agent_011zHwRK227kpyYuUMXSzcdx · run rpt-aha-agent-val.