This package provides a generic agent loop, tool registry, and provider helper. Product-specific tools, prompts, and authorization stay in the consuming app.
- Generic Agent Loop: Standardized loop for building robust agent workflows.
- Tool Registry: Easily register, manage, and distribute tools for your agents.
- Provider Helpers: Built-in helpers for AI SDK providers (e.g., OpenRouter).
- TypeScript First: Fully typed for safe, scalable, and rapid development.
Install the dependencies and build the package:
yarn install
yarn buildRun the TypeScript compiler in watch mode:
yarn devTo perform typechecking, create a clean build, and package the artifact:
yarn typecheck
yarn build
yarn pack:artifactNote:
yarn pack:artifactcreatesprotawk-agents.tgz. The package lifecycle runs a clean build before packing, so the artifact is always created from the current source.
Import the necessary functions from the package to start building your agent infrastructure:
import {
createToolRegistry,
runAgent,
} from "@protawk/agents";
// Add your specific implementation here...