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
Click to show internal directories.
Click to hide internal directories.