AdResonance
Enter App
Developer Preview — 2026-04-22

The operating record and control plane for governed decisions.

Model decisions, enforce policy, execute across surfaces, and keep every mutation tied to the decision that caused it.

What you are reading

GENYS is the governed decision runtime. The primitives below — Decision, Policy, Workflow, Mutation Log — apply to any vertical where structured decisions need to be governed, logged, and auditable. AdResonance is the first vertical product built on GENYS: governed advertising decisions across fragmented channels. The contract below is authoritative for both.

This page is the public contract. Not the repo.

Shapes are stable within the published preview. Breaking changes ship in a new dated preview. Internal code surfaces that are not described below are intentionally omitted and should not be treated as public. Consumers build against what is documented; what is undocumented is subject to change without notice.

Primitives

Four objects. One trace. Every field named.

The four objects below are threaded by decision_id. A Decision is evaluated against Policy, routed through a Workflow, and recorded as one or more Mutation Log entries. The same decision_id appears in all four shapes — that is the join key.

Decision

A structured proposal to change the state of an ad operation.

Why it exists

Generation and advice tools produce text. Decisions produce structured intent: typed, confidence-scored, and routable. The Decision is the first-class record of what the system chose and why — the object other primitives thread from.

Execution semantics

A Decision does not execute on creation. It is evaluated against Policy and enqueued as a Workflow. Execution writes Mutation Log entries. A Decision with auto_executable=true and a passing Policy evaluation may execute without human approval; otherwise it pauses for approval.

Example

{
  "id": "dec_01HXA7M4B8N3RXQK9VPYZW2QF4",
  "type": "adjust_budget",
  "priority": "high",
  "confidence": 0.82,
  "summary": "Raise Meta Search Demand budget to $720/day",
  "reasoning": "Qualified-quote signal rose 18% week-over-week on category 'replacement-parts-heavy-equipment'. Current budget is capped at last week's lower demand band.",
  "auto_executable": false,
  "action": {
    "type": "adjust_budget",
    "campaign_id": "cmp_meta_4921",
    "channel": "meta",
    "target_budget": 720,
    "reason": "rising_qualified_demand"
  },
  "campaign_id": "cmp_meta_4921",
  "computed_at": "2026-04-22T14:02:18Z",
  "policy_version": "policy-2026-04-15"
}

Decision types — v1 public set

Five Decision types are part of the public contract. Each has a typed parameter shape; action.parameters is not a catch-all bag. Types not listed here exist internally but are not in the public contract for this preview.

TypeRequired parameters
adjust_budgetcampaign_id, channel, (budget_delta | target_budget), reason
pause_underperformercampaign_id, channel, reason
resume_campaigncampaign_id, channel, reason
rebalance_spendsource_channel, target_channel, (amount | percentage), scope, reason
refresh_creativecampaign_id, (asset_group | creative_id), objective, constraints

Policy

A declarative rule set evaluated before a Decision executes.

Why it exists

A dashboard helps a person follow a process. A Policy enforces one. Budget caps, approved-claim libraries, distributor contracts, daily spend ceilings, and risk thresholds are encoded as named, versioned rules. Every Decision carries the Policy version it was evaluated against.

Execution semantics

Policy evaluation returns one of three results: allow, require_approval, or deny. Allow proceeds to Workflow. Require_approval pauses the Workflow and surfaces an approval request. Deny halts execution and writes a refusal event. Policy versions are immutable; a change creates a new version and old evaluations keep their citation.

Example

{
  "evaluation_id": "eval_01HXA7M4C2K9RXQK9VPYZW2QF4",
  "decision_id": "dec_01HXA7M4B8N3RXQK9VPYZW2QF4",
  "decision": "require_approval",
  "requires_approval": true,
  "triggered_policies": [
    {
      "policy_id": "budget_daily_cap",
      "decision": "require_approval",
      "reason": "Target budget $720/day exceeds auto-executable cap of $500/day.",
      "requires_approval": true,
      "constraint": "daily_cap_micros=500000000"
    }
  ],
  "bypassed_policies": [],
  "evaluated_at": "2026-04-22T14:02:18Z"
}

Workflow

A durable multi-step execution that runs a Decision through approval, channel APIs, and logging.

Why it exists

Ad operations are rarely one-shot. A budget change may pause for approval, run across multiple platform APIs, and write several log entries. Workflows make the full path durable: pausable, resumable, idempotent, and compensatable on failure — properties an agency spreadsheet or ad-platform UI cannot provide.

Execution semantics

Workflows carry an idempotency_key so retries do not double-execute. Steps may compensate on failure (e.g. roll back a partial budget write). Runs progress through queued, running, paused_for_approval, completed, failed, timed_out, or compensated states. Only completed and compensated are terminal success/failure states in the public contract.

Example

{
  "run_id": "wf_01HXA7M4D3L0RXQK9VPYZW2QF4",
  "workflow_id": "execute_budget_adjustment",
  "status": "paused_for_approval",
  "idempotency_key": "dec_01HXA7M4B8N3RXQK9VPYZW2QF4-attempt-1",
  "current_step_id": "await_approval",
  "requested_by": "agent:claude-desktop",
  "org_id": "org_01HW3T9P2Q8YXZ3N5B7C9DFA2V",
  "retry_count": 0,
  "awaiting_approval": true,
  "created_at": "2026-04-22T14:02:19Z",
  "updated_at": "2026-04-22T14:02:20Z"
}

Mutation Log

The audit record of every state-changing call to a channel API, keyed to its originating Decision.

Why it exists

Every change across Google, Meta, Amazon, Pinterest, and X is logged against a decision_id. That makes advertising operations queryable: 'what changed on this campaign, under which decision, caused by which signal, approved by whom' is one query, not a forensic exercise.

Execution semantics

Entries are append-only. Status progresses through pending, success, failed, or rolled_back. A rolled_back entry is written by a compensation step, not deleted. The decision_id is the stable join back to Decision, Policy evaluation, and Workflow run.

Example

{
  "mutation_id": "mut_01HXA7M4E4M1RXQK9VPYZW2QF4",
  "decision_id": "dec_01HXA7M4B8N3RXQK9VPYZW2QF4",
  "org_id": "org_01HW3T9P2Q8YXZ3N5B7C9DFA2V",
  "campaign_id": "cmp_meta_4921",
  "platform": "meta",
  "platform_campaign_id": "23854192...",
  "mutation_type": "update_budget",
  "payload": { "daily_budget_micros": 720000000 },
  "result": { "applied_at": "2026-04-22T14:04:02Z" },
  "status": "success",
  "actor_type": "agent:claude-desktop",
  "error_message": null
}

Where these primitives sit next to ecosystem tools

The four primitives above are GENYS-native. They have interfaces that external tools — policy engines (OPA, Cedar), durable-workflow engines (Temporal, Inngest), lineage standards (OpenLineage), LLM tracing (OpenLLMetry), and upstream memory infrastructure (Mem0) — can sit behind as adapters, not above as replacements. The adapter map, including what's GENYS-native and not adapter-replaceable, lives on /architecture#adapter-landscape.

Agent operation

MCP endpoint — governed decisions as a tool surface.

GENYS exposes its operating record over the Model Context Protocol. MCP-compatible agents — Claude Desktop, Claude Code, or your own client — can read state, request recommendations, and execute decisions under the same Policy engine that gates in-app actions. A narrative walkthrough lives at /mcp; the contract lives here.

Endpoint

POST /api/mcp — JSON-RPC for tool calls. GET /api/mcp — Server-Sent Events for server-initiated notifications.

Auth modes — v1 contract

  • Available now: authenticated dashboard session via Clerk. The agent acts as the signed-in user.
  • Controlled rollout: partner-issued API keys, configured per engagement. Contact the platform team.
  • Not yet public: self-serve API keys and developer-portal tenant key management.

Tool classes

Twelve tools, grouped by risk class: six read tools, three proposal tools (no state change), and three mutation tools (state-changing). All three mutation tools evaluate Policy before execution and may return require_approval. Full tool list on /mcp.

Approval boundary

Mutation tools are approval-gated by default. The contract is: recommendations are not authorization. Calling get_recommendations returns candidate actions; those actions do not execute until a separate execute_decision call passes Policy evaluation (and any resulting approval step).

Example request

POST /api/mcp
Content-Type: application/json
Authorization: Bearer <clerk-session-token>

{
  "jsonrpc": "2.0",
  "id": 1,
  "method": "tools/call",
  "params": {
    "name": "get_recommendations",
    "arguments": { "campaign_id": "cmp_meta_4921" }
  }
}

Example response

{
  "jsonrpc": "2.0",
  "id": 1,
  "result": {
    "decisions": [
      {
        "id": "dec_01HXA7M4B8N3RXQK9VPYZW2QF4",
        "type": "adjust_budget",
        "confidence": 0.82,
        "auto_executable": false,
        "summary": "Raise Meta Search Demand budget to $720/day",
        "action": {
          "type": "adjust_budget",
          "campaign_id": "cmp_meta_4921",
          "channel": "meta",
          "target_budget": 720,
          "reason": "rising_qualified_demand"
        }
      }
    ]
  }
}

Trust model

What is guaranteed, and what is not.

Developer Preview means honest: we commit to the shapes below, and we flag the things that will harden later. Do not build against what is not listed.

Idempotency

Every Workflow run carries an idempotency_key. Retrying a call with the same key will not double-execute. Clients must supply a key on state-changing requests; the key is part of the contract.

Approval gates

Mutation tools evaluate Policy before execution. Results are allow, require_approval, or deny. Require_approval pauses the Workflow until a human approves in the dashboard or via an approval tool call. Agents cannot unilaterally bypass this path in v1.

Failure handling

Channel-API failures return in the Mutation Log with status=failed and error_message set. Workflow runs may enter compensated state if a later step rolls back an earlier write. Clients should treat completed and compensated as the two terminal success/failure states.

Audit trail

Decision, Policy evaluation, Workflow run, and Mutation Log are append-only in the public contract. A decision_id is the single join key across all four. Queryable audit as a stream is on the roadmap; today the audit is readable through the same tool surface that writes it.

Versioning

This contract is Developer Preview — 2026-04-22. Shapes are stable within the published preview. Breaking changes ship in a new dated preview, announced. There is no semver commitment and no long-term backward-compatibility guarantee yet.

Not guaranteed (yet)

Self-serve API keys. Public webhook delivery. An API reference beyond this page. Public connector schemas for inbound signals. Partner sandbox. Rate-limit SLAs. These are explicitly out of the v1 contract and will be addressed in later previews.

Status

What is public today. What is controlled. What is not yet.

The honest map. If something is not listed here, assume it is internal and not part of the v1 contract.

Available now
  • Authenticated MCP access (Clerk session)

    Any dashboard-authenticated user can drive the MCP endpoint as themselves. All 12 tools reachable, approval boundary enforced.

  • Four public primitives

    Decision, Policy, Workflow, Mutation Log — shapes documented on this page.

  • Five public Decision types

    adjust_budget, pause_underperformer, resume_campaign, rebalance_spend, refresh_creative — with typed parameter schemas.

  • Enterprise intake

    Structured engagement for platform partners and integrations.

Controlled rollout
  • Partner-issued API keys

    Long-lived keys for partner backends, configured per engagement. Not self-serve. Contact the platform team to request.

  • Custom policy rules

    Approved-claim libraries, distributor contracts, regulated-language rules — onboarded with the platform team, not via self-serve config.

  • Additional Decision types

    Types beyond the public five (connect_platform, expand_keywords, generate_variant) are reachable through controlled engagements but not part of the public v1 contract.

Not yet public
  • Self-serve API keys

    No public key-issuance UI. No signup-to-key path. Planned after the auth model stabilizes.

  • Developer portal

    No tenant key management, no usage dashboards, no per-key rate limits. This page is the closest thing until that surface exists.

  • Public connector SDK

    The internal connector framework (public data sources, channel adapters) is not yet a published SDK. Shipping requires a stable connector contract.

  • Audit-stream query API

    The append-only record exists internally. A public query API with addressable decision_id / policy_version / input_hash is on the roadmap.

  • Webhooks

    No public event delivery. Agents read state through tool calls today.

Build against the contract.

If you are evaluating GENYS for integration, vertical build-out, or partner engagement, start with the primitives above and the MCP walkthrough. If your use case needs anything listed under controlled rollout or not-yet-public, engage through enterprise intake.

Infrastructure for advertising capital.

Pay on what the system governs. Scale without upgrading.