For the complete documentation index, see llms.txt. This page is also available as Markdown.

πŸš€Quick Start From Template

Scaffold a new vCon adapter in five minutes from the official template repo.

The vcon-adapter-template repo is a GitHub template repository. This page is the shortest path from "I have a source platform that produces conversations" to "I have a running, spec-compliant adapter delivering vCons over a signed webhook."

Spec target: draft-ietf-vcon-vcon-core-02, syntax "0.4.0".

Prerequisites

  • Python 3.12+

  • uv (recommended) or pip

  • gh CLI (or use the GitHub web UI for step 1)

  • A source platform that exposes conversation data β€” webhook events, an API to poll, files on a disk, an S3 bucket, anything

Step 1 β€” Create your repo from the template

Pick three names up front, all referring to the same adapter:

Name
Form
Example

Adapter name

kebab-case

signalwire

Python package

snake_case

signalwire_adapter

Source platform

human-readable

SignalWire

Then create the repo:

gh repo create vcon-dev/vcon-foo-adapter \
  --template vcon-dev/vcon-adapter-template \
  --public \
  --clone

cd vcon-foo-adapter

Step 2 β€” Run find-and-replace on placeholders

The template uses three placeholder tokens. Substitute them in one pass:

Then delete the scaffolding boilerplate the template ships with:

Step 3 β€” Install and verify the smoke tests pass

You should see all 14 spec-compliance smoke tests pass. If anything fails, you have placeholder residue or a Python version mismatch β€” fix before touching anything else.

Step 4 β€” Wire the source-platform listener

Open src/<your_package>/cli.py and find the # TODO: wire your source-platform listener comment. Replace it with whatever fits your source:

  • Webhook receiver: add aiohttp.web routes that consume incoming events

  • Polling job: use asyncio.create_task to run a loop with asyncio.sleep(interval)

  • File watcher: import watchdog and observe a directory

  • Batch CLI: read input files, build vCons in a loop, deliver, exit

The shape of the per-event work is the same regardless:

new_vcon() handles the four Vcon.build_new() quirks (syntax param, dropped empty group/redacted, subject setter, extensions list) for you. Use the library's add_party / add_dialog / add_attachment / add_analysis / add_tag helpers for everything else β€” they're spec-correct out of the box.

Step 5 β€” Configure

Copy config.example.yaml to config.yaml and set the values. Required env vars:

Env var
Purpose

<PACKAGE>_API_KEY

Credentials for your source platform

VCON_WEBHOOK_URL

Where to POST vCons

VCON_WEBHOOK_HMAC_SECRET

Shared secret for body signing

The config file uses ${ENV_VAR} substitution at startup, so you never commit secrets.

Step 6 β€” Run it

Or via Docker:

Then in another terminal:

Step 7 β€” Verify a real vCon end-to-end

Trigger an event from your source platform (or simulate one) and watch:

  • Logs show delivered url=... uuid=... from webhook_delivery.py

  • The vcons_delivered_total Prometheus counter increments

  • The receiving end sees Idempotency-Key: <uuid> and X-Hub-Signature-256: sha256=… headers

  • If you forcibly take the receiver down, vCons should land in dlq/ after retries exhaust

Step 8 β€” Publish

  1. Push your repo: git push -u origin main

  2. (Optional) Add to the vcon super repo as a submodule

  3. (Optional) Publish to PyPI β€” CI will do this on tag push if PYPI_API_TOKEN is set

Last updated

Was this helpful?