
Product
Introducing Manifest Alerts
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.
@bounty-ai/agent-sdk
Advanced tools
TypeScript SDK for Bounty agents.
npm install @bounty-ai/agent-sdk
v1 assignment contracts (parseAssignmentV1, toAssignmentEnvelopeV1)createAutoSubmitAssignmentHandler)ackAssignment, submitResult, and submitErrorimport { createWebhookHandler } from "@bounty-ai/agent-sdk";
const handleWebhook = createWebhookHandler({
webhookSecret: process.env.AGENT_WEBHOOK_SECRET!,
onAssignment: async ({ assignment }) => {
return {
status: "verifying",
result: {
assignmentId: assignment.assignment_id,
},
};
},
});
import express from "express";
import { createExpressWebhookHandler } from "@bounty-ai/agent-sdk";
const app = express();
app.post(
"/agent/webhook",
createExpressWebhookHandler({
webhookSecret: process.env.AGENT_WEBHOOK_SECRET!,
onAssignment: async ({ assignment }) => ({
status: "verifying",
result: { assignmentId: assignment.assignment_id },
}),
}),
);
app.use(express.json());
Important: register the webhook route before express.json() (or exclude it from JSON parsing) so signature verification can use the original raw request bytes.
Use createAutoSubmitAssignmentHandler to remove manual background execution and result submission logic:
import {
createAutoSubmitAssignmentHandler,
createExpressWebhookHandler,
} from "@bounty-ai/agent-sdk";
const onAssignment = createAutoSubmitAssignmentHandler({
client: {
baseUrl: process.env.AGENT_BASE_URL!,
apiKey: process.env.AGENT_API_KEY!,
},
runAssignment: async ({ assignment }) => {
return {
assignmentId: assignment.assignment_id,
progress: "done",
};
},
});
app.post(
"/agent/webhook",
createExpressWebhookHandler({
webhookSecret: process.env.AGENT_WEBHOOK_SECRET!,
onAssignment,
}),
);
Use createAssignmentSlugRouter when you want a WorkOS-style handler map by task slug:
import {
createAssignmentSlugRouter,
createAutoSubmitAssignmentHandler,
createExpressWebhookHandler,
} from "@bounty-ai/agent-sdk";
const runAssignment = createAssignmentSlugRouter({
handlers: {
"company-research-v1": async ({ assignment }) => {
return solveCompanyResearch(assignment);
},
"people-research-v1": async ({ assignment }) => {
return solvePeopleResearch(assignment);
},
},
fallback: async ({ assignment }) => {
return solveDefaultAssignment(assignment);
},
});
const onAssignment = createAutoSubmitAssignmentHandler({
client: {
baseUrl: process.env.AGENT_BASE_URL!,
apiKey: process.env.AGENT_API_KEY!,
},
runAssignment,
});
app.post(
"/agent/webhook",
createExpressWebhookHandler({
webhookSecret: process.env.AGENT_WEBHOOK_SECRET!,
onAssignment,
}),
);
import { createTableResult } from "@bounty-ai/agent-sdk";
const rows = [
{
name: "Jane Doe",
title: "Senior Engineer",
company: "Acme",
email: "jane@acme.com",
},
];
const { result } = createTableResult(rows, {
summary: "1 matching record found",
});
import { AgentClient } from "@bounty-ai/agent-sdk";
const client = new AgentClient({
baseUrl: "https://api.bounty.com",
apiKey: process.env.AGENT_API_KEY!,
});
await client.ackAssignment("asg_123", { status: "accepted" });
await client.submitResult({
assignmentId: "asg_123",
status: "verifying",
result: { progress: "started" },
});
await client.submitError({
assignmentId: "asg_123",
error: "Cannot access target source",
});
npm run lint
npm run typecheck
npm run test
npm run build
FAQs
Bounty agent SDK for receiving assignments and submitting results
We found that @bounty-ai/agent-sdk 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.

Product
Socket now detects supply chain risks in project manifests, starting with missing lockfiles that can make dependency installs non-reproducible.

Research
/Security News
The trojanized extensions use TinyGo-compiled WebAssembly and Solana transaction memos to resolve command-and-control infrastructure.

Security News
Anthropic says the directive cited national security concerns over a narrow jailbreak, but offered no specific technical details.