Skip to main content

Adapters

Adapters are the official reference patterns for wiring Vluna into common LLM SDKs and agent frameworks.

Use this section when you want:

  • a concrete integration shape for a known framework
  • guidance on where to attach authorize -> commit/cancel
  • links to the corresponding Python and TypeScript adapter source and examples

Start here

What adapters are for

The adapters section is about runtime integration shape, not about billing-plan design.

These pages focus on:

  • selecting the right runtime boundary
  • carrying request context correctly
  • extracting actual usage
  • handling streaming, retries, and tool calls
  • deciding when to use top-level quantity_minor and when to also send meters[]

Artifact expectations

The downloadable adapter artifacts are not all meant to be used the same way.

  • vluna_adapter.py / vluna_adapter.ts
    • Treat these as the primary integration templates.
    • If your runtime matches the corresponding SDK or framework, you can usually copy them into your repository, make a small number of project-specific changes, and try them directly.
  • vluna_plugin.py / vluna_plugin.ts
    • Treat these the same way when the framework exposes a plugin or callback model.
    • They are intended to be copied and adapted, not just read.
  • example.py / example.ts
    • Treat these as demos of how to call the adapter from application code.
    • They show runtime wiring and invocation shape, but they are not the primary files to paste into production as-is.
  • README.md
    • Treat these as setup notes for that framework-specific example package when present.

Downloadable artifacts