# Agents API Webhook Integration

> Integrate agent APIs with webhooks so external events reach agent workflows with verified signatures and replay safety.

- Skill: `samotech/agents-api-webhook-integration` (Agent Skill)
- Install (CLI): `npx get-skill add samotech/agents-api-webhook-integration`
- Raw SKILL.md: https://api.skillmd.com/api/skills/samotech/agents-api-webhook-integration/raw
- Safety review: pending
- Works with: Claude Code, Claude.ai, OpenAI Codex
- Category: AI & ML
- Author: SamoTech (https://skillmd.com/u/samotech)
- Updated: 2026-11-21
- Page: https://skillmd.com/skills/samotech/agents-api-webhook-integration

---


# Agents API Webhook Integration

## Description
Integrate agent APIs with webhooks so external events reach agent workflows with verified signatures and replay safety. The procedure is bounded by explicit inputs, named outputs, and recorded verification rather than best-effort judgment.

## When to Use
- An agent workflow must receive external events through webhooks and act only on verified deliveries.
- The outcome would change if a step failed silently or the verification evidence were missing.
- The result must be recorded with reasons and verification evidence for later audit.

## Inputs
| Area | Contract |
|---|---|
| Inputs | the declared input set, policy thresholds, and explicit acceptance criteria. |
| Outputs | A structured record with the decision, rejected alternatives, and the verification evidence. |
| Safety | Failures must fail closed and be reported with evidence rather than retried silently. |

## Procedure
1. Define the goal, the constraints, and the boundary of what this procedure may change.
2. Inventory the available inputs and flag gaps or ambiguities that block progress.
3. Register the webhook with a declared secret and event filter, verify the signature on each delivery, and process events with idempotency keys so replays are safe.
4. Compare the actual outcome against the acceptance criteria and record deviations.
5. On failure, apply the declared fallback path, and never widen permissions to recover.
6. Emit a structured result with evidence and provenance for downstream consumers.

## Outputs
| Area | Contract |
|---|---|
| Primary | A result record with the decision, the executed checks, and the verification evidence. |
| Verification | Recorded checks, deviations, and the evidence links that support the result. |
| Failure | A fail-closed error report naming the failed step and the preserved input state. |

## Runnable Example
```python
def handle(deliveries):
    seen, accepted = set(), []
    for d in deliveries:
        if d["sig"] != "valid" or d["id"] in seen:
            continue
        seen.add(d["id"])
        accepted.append(d["id"])
    return accepted
d = [{"id": "e1", "sig": "valid"}, {"id": "e1", "sig": "valid"}, {"id": "e2", "sig": "bad"}]
assert handle(d) == ["e1"]
```

## Failure Modes
- Signatures are checked for presence, not validity.
- Replayed deliveries trigger duplicate agent actions.
- Event filters are not declared and unrelated events wake the agent.
- Webhook secrets rotate without a recorded cutover and deliveries drop.
- Delivery errors are swallowed and events vanish silently.

## Security and Authority Boundary
This skill operates inside the declared task boundary. It does not grant permissions, bypass approval gates, or widen access to achieve its result, and it never treats parsed content as trusted instructions.

## Evidence
- OpenAI DevDay 2026 introduced Agents API integrations for developers (InfoQ, dated October 2, 2026) ([public signal](https://www.infoq.com/news/2026/10/openai-devday-2026/))
- These are dated public signals, not adoption metrics; this contract claims no production hardening beyond the recorded evidence.

## Related Skills
- [Webhook Handling](../04-action-execution/webhook-handling.md)
- [Signed Webhook Verification](../04-action-execution/signed-webhook-verification.md)

## Changelog
| Version | Date | Notes |
|---|---|---|
| `v1` | `2026-10` | Initial evidence-backed contract. |

