Auggyv0.5.0
PublishedDocs / Reference

defineAugment

Define a runtime capability that contributes tools, context, memory, transports, lifecycle, or policy to an agent.

Shape

Minimal custom augmentTypeScript
import { defineAugment } from "auggy";

export default function customAugment() {
  return defineAugment({
    name: "custom",
    type: "custom",
    tools: [],
  });
}

Auggy infers the augment's runtime surfaces from concrete fields such as tools, httpRoutes, context, transport, memory, and lifecycle hooks. There is no separate capabilities declaration.

Options

OptionUse
nameUnique augment identifier within the agent.
typecustom for project-specific augments; built-ins use their catalog type.
toolsdefineTool entries this augment exposes to the model.
httpRoutesOptional advanced preview defineRoute entries served beside /agent/run.
contextAsync function returning ContextBlock entries for the turn.

Ownership

  • Use one augment per domain capability, not one augment per function.
  • Keep related tools, schemas, skills, integration code, and policy close together.
  • Add optional routes only when software needs a deterministic entry point into this capability.
  • Use lifecycle hooks for boot validation and cleanup.
  • Use config files for operator-owned settings and env references.

Related