Reference
Triggers and Public Route Gating
How agents are invoked once deployed.
Triggers are agent metadata that tell generated servers which entrypoints should expose an agent. Put triggers inside the agent({...}) definition.
Declaring triggers
import { agent } from '@fabric-harness/sdk';
export default agent({
name: 'webhook-triage',
triggers: {
webhook: true,
// schedule: '*/15 * * * *', // designed-for
},
async run({ input }) {
return input;
},
});Default behavior
webhook: true→POST /agents/:agent/:idis enabled on the Node and Cloudflare server targets.- Without
triggers.webhook, an agent is CLI-only in production HTTP deployments.fh runandfh devcan drive it, but the deployed server returns 404 forPOST /agents/:agent/:idwhen production route gating is enabled.
Public route gating
For Node/Cloudflare deployments, gate the public route with:
--auth-token-env <var>(CLI / env) requiring a bearer token.--max-body-bytesto cap body size.--rate-limit-window-ms+--rate-limit-maxfor per-IP rate limits.
For Cloudflare, prefer route-level rules (e.g. only expose /agents/<name>/* for the agents you want public).
Schedule triggers
A schedule trigger is roadmap. For now, drive scheduled invocations from your existing cron / scheduler hitting POST /agents/:agent/:id.