11-custom-provider

command
v0.0.0-...-8a574d8 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 5, 2026 License: MIT Imports: 14 Imported by: 0

Documentation

Overview

Example 11: Custom Provider — build your own ProviderPort for an API the SDK doesn't ship with. This example implements the Anthropic Messages API (SSE streaming) and wires it through the gateway and agent.

This demonstrates that:

  • ProviderPort is the extension point for any LLM API

  • The gateway, catalog, and agent don't need to know about your provider

  • You can mix custom providers with built-in ones in the same gateway

    mkdir my-agent && cd my-agent && go mod init my-agent cp main.go . && go mod tidy ANTHROPIC_API_KEY="sk-ant-..." go run main.go

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL