
Company News
Andrew Becherer Joins Socket as Chief Information Security Officer
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.
@copass/agent-router
Advanced tools
High-level Copass agent SDK — hosted agent-runtime routing + integrations + one-liner OAuth flow
High-level Copass agent SDK. Wraps @copass/core to give you:
router.run({...}) — typed async-iterator over agent events (SSE under the hood)router.integrations.connect('github', ...) — one-call OAuth flow with browser redirect + webhook/reconcile pollingrouter.integrations.{list,disconnect,reconcile,catalog} — convenience wrappersnpm add @copass/agent-router @copass/core
import { AgentRouter } from '@copass/agent-router';
import open from 'open';
const router = new AgentRouter({
auth: { type: 'api-key', key: process.env.COPASS_API_KEY! },
sandboxId: 'sb_...',
});
// 1) Connect an integration (works end-to-end from a terminal)
const { connection } = await router.integrations.connect('github', {
scope: 'user',
onConnectUrl: (url) => open(url),
});
console.log('connected:', connection.app, connection.name);
// 2) Run an agent
for await (const event of router.run({
provider: 'anthropic',
model: 'claude-opus-4-7',
system: 'You are a helpful agent.',
message: 'Summarize my latest GitHub issues.',
endUserId: 'u-123',
})) {
if (event.type === 'text') process.stdout.write(event.text);
if (event.type === 'finish') console.log('\n[done]', event.stop_reason);
}
The OAuth listener in runConnectFlow uses node:http and therefore only runs in Node. In browsers, call router.client.integrations.connect(...) directly and handle the redirect via window.open + BroadcastChannel or polling.
MIT.
FAQs
High-level Copass agent SDK — hosted agent-runtime routing + integrations + one-liner OAuth flow
We found that @copass/agent-router demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Company News
Socket’s first CISO brings deep experience securing high-growth SaaS companies as open source supply chain threats accelerate.

Company News
Replit is integrating Socket Firewall into its AI-powered development experience to help protect builders from malicious open source packages.

Security News
npm confirmed a tooling bug incorrectly marked several one-character packages as security holders and said it was working on a rollback.