Connections
A connection wires an agent to a third-party service in one declaration. It handles auth, auto-registers a set of tools, and may add a trigger. Most agents only need connections — never individual defineTool calls.
Add-a-connection prompt · being rewritten
The previous "paste this into Claude Code" prompt referenced CLI commands (agentnava-kit auth slack) that no longer exist. The replacement — an SDK-shaped copy-prompt using connect.* factories and the dashboard OAuth flow — is being drafted. Until then, follow the catalog snippets below; each one is the complete declaration.
Catalog
S
connect.slack({ workspace: 'acme' })
Auto-registered tools
post_messagelist_channelsthread_replysearch
G
connect.github({ org: 'acme' })
Auto-registered tools
open_prcomment_issuelist_reposget_file
M
connect.gmail({ account: '[email protected]' })
Auto-registered tools
send_emailsearch_threadsdraft_replyadd_label
C
connect.googleCalendar({ account: '…' })
Auto-registered tools
list_eventscreate_eventupdate_eventsuggest_time
H
connect.hubspot({ portalId: 12345 })
Auto-registered tools
capture_leadupdate_dealquery_contacts
K
connect.calendly({ user: 'swati' })
Auto-registered tools
list_event_typescreate_bookingget_availability
◇
connect.mcp({ url: 'https://mcp.linear.app/sse' })
Auto-registered tools
* (mirrors the server's tool list)
How it looks in a spec
import { AgentNava, connect, loadAgentDir } from '@agentnava/kit';
const an = new AgentNava();
const spec = await an.specs.push(loadAgentDir('./agents/triage', { key: 'triage' }));
await an.agents.configure({
key: 'inbound-triage',
name: 'Inbound triage',
modelClass: 'standard',
spec,
triggers: [{ kind: 'chat' }],
connections: [
connect.slack({ workspace: 'acme' }),
connect.gmail({ account: '[email protected]' }),
connect.hubspot({ portalId: 12345 }),
],
});
The agent now has nine new tools and a Slack mention trigger, with zero credential handling in the spec. See Spec → Import from Claude Code for adding MCP servers, including stdio transports.