Repository navigation
feat(audit): replicate real-world agent harnesses — sdr-outreach, data-analyst, eval-loop - #621
Merged
Merged
Conversation
…ch, data-analyst, eval-loop Surveyed what teams actually ship (TRENDS.md: G2/Salesforce/OpenAI/Google Cloud agent reports + reference implementations) and replicated the three dominant production patterns live on OpenRouter: - sdr-outreach: AI-SDR "drafts-as-pull-requests" — enrichment -> personalized draft -> durable approval queue -> reject-with-feedback redraft -> separate sender principal (per-agent tool allowlists) -> CRM log + audit trail. 8/8 PASS on gpt-4o-mini; 27 approval pauses resolved durably. - data-analyst: text-to-SQL analyst behind a deterministic SELECT-only guard outside the model (single-statement, forbidden keywords, auto LIMIT, describe-before-query gate), metric definitions + durable corrections, queries.jsonl audit trail. 8/8 PASS on claude-haiku-4.5. - eval-loop: generator<->evaluator with disjoint sessions, 5-predicate contract + typed rubric, deterministic 4-round control loop. 6/6 PASS — converged round 2, canary isolation clean. Findings: model tier matters for multi-step analytics (gpt-4o-mini gave the top plan's MRR as the total); the describe-before-query rule is now enforced by the guard, not the prompt (advised-aways prove it). No SDK defects. Generated with [Devin](https://devin.ai) Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Surveyed what agent harnesses people actually build and ship (G2, Salesforce Agentic Index, OpenAI State of Enterprise AI, Google Cloud ROI study + reference implementations like Arvexi's SDR architecture, OpenAI's cookbook data-analyst, pi-sql-analytics, and the harness-centric generator↔evaluator literature — findings captured in
audit/TRENDS.md), then replicated the three dominant production patterns as live OpenRouter harnesses:sdr-outreach/— the "drafts-as-pull-requests" AI SDR: lead enrichment → personalized drafts → durable approval queue → reject-with-feedback → redraft → a separate sender principal (hard per-agent tool allowlist) → CRM activity log + audit trail.send_emailsimply doesn't exist in the drafting agent's registry.data-analyst/— the "talk to your data" text-to-SQL pattern: sqlite SaaS warehouse,list_tables/describe_table/run_querywith a deterministic guard outside the model (single-statement, SELECT/WITH only, auto LIMIT, describe-before-query gate), metric definitions, durable user corrections,queries.jsonlaudit trail. No approval prompts — the guard IS the boundary.eval-loop/— the generator↔evaluator harness pattern: builder + a hostile reviewer on a disjoint session, a contract of 5 testable predicates + a typed rubric, and a deterministic control loop (continue / stop / escalate after 4 rounds). Canary string proves context isolation.Live results (OpenRouter, alpha.19 packed build)
Findings (documented in REPORT.md)
AUDIT_MODELpicks it.describe_tablebefore querying, sorun_querynow refuses statements against undescribed tables (advisory verdict,advised-aways=3in the green run) — enforcing the pattern the way the reference implementations do.Test plan
npx tsx sdr-outreach/index.ts— 8/8 PASSnpx tsx data-analyst/index.ts— 8/8 PASS (AUDIT_MODEL=claude-haiku-4.5)npx tsx eval-loop/index.ts— 6/6 PASSGenerated with Devin