Skip to main content
Version: v1

Connector plugins

A connector talks to a SaaS API with named actions. Tokens live in the vault. You can bridge those actions so agents call them as tools.

acton-plugin new my-saas --type=connector

Register actions and bridge tools​

package main

import (
"github.com/actonos/plugin-sdk/sdk"
)

type ListReposInput struct {
PerPage int `json:"per_page" jsonschema:"description=Page size"`
}

func init() {
conn := sdk.NewBaseConnector("github", "GitHub", "oauth2").
WithSecretKey("github_access_token")

sdk.RegisterTypedAction(conn, "list_repos", "List GitHub repositories for the user", func(ctx sdk.Context, in ListReposInput) (any, error) {
token, err := conn.GetAuthToken(ctx)
if err != nil {
return nil, err
}
resp, err := ctx.HTTP().GetWithBearer("https://api.github.com/user/repos", token)
if err != nil {
return nil, err
}
var repos []map[string]any
if err := resp.JSON(&repos); err != nil {
return nil, err
}
return repos, nil
})

sdk.RegisterConnector(conn)

for _, tool := range conn.AsTools() {
sdk.RegisterTool(tool)
}
}

func main() {
sdk.Serve()
}

AsTools() names tools connector_<name>_<action> β€” for example connector_github_list_repos. The host also accepts shortened aliases (list_repos, github_list_repos).


Auth types​

auth_typeHow the user signs inTypical vault key
oauth2OAuth 2.1 PKCE in the ActonOS UIgithub_access_token
api_keyPasted key in the plugin form (x-secret: true)linear_api_key
bearerPasted bearer tokennotion_api_key

GetAuthToken(ctx) reads SecretKeyName. Override with .WithSecretKey("...").

Declare the key under permissions.secrets and the API host under net_outbound.


Manifest snippet​

{
"capabilities": ["connector"],
"permissions": {
"net_outbound": ["api.github.com"],
"secrets": ["github_access_token"]
},
"connectors": [
{
"name": "github",
"display_name": "GitHub",
"auth_type": "oauth2",
"actions": ["list_repos", "create_issue"]
}
]
}

Keep actions in sync with RegisterTypedAction names.


Operator flow​

Users connect the account on Connectors. After the badge is green, they enable the bridged tools on an agent in Agent Studio. You do not implement the OAuth popup β€” ActonOS does. Your plugin only consumes the vault token at runtime.


  • Tool plugins β€” the same sdk.Tool type AsTools() produces.
  • Manifest β€” connectors[] and UI schema.
  • Official plugins β€” Google, GitHub, Notion, Jira, Linear, Figma, Slack.