Examples
The fastest way to learn the platform is to scaffold a working project and read it. The create-agents scaffolder ships two complete templates that exercise agents, connectors, skills, actions, and human-in-the-loop review.
#Overview
Each template is a single typed TypeScript package where the file name is the primitive’s identity — no registries, no manual wiring. Two templates are available:
- starter — a minimal research-and-review project: a researcher, a summarizer that delegates to it, a reviewer with typed actions, a filesystem connector, one skill, and example client code.
- market-intel (default) — a multi-agent arbitrage workflow: an orchestrator that delegates per-market pricing, parallel marketplace scouting, and bid strategy to specialist sub-agents, then submits a human-approval-gated listing proposal.
$ pnpm create @kraken-ai/agents my-project --template starternpm create @kraken-ai/agents my-project --template starter
$ pnpm create @kraken-ai/agents my-project --template market-intelnpm create @kraken-ai/agents my-project --template market-intel
For the scaffolder’s full flag set, see the CLI reference.
#Starter template
The starter project demonstrates the core building blocks in isolation: a connector that perceives and acts, a skill that carries procedure, typed actions for structured output, a team that delegates, and client code that calls agents from your own application.
- researcher → summarizer team —
researcher.tsreads and analyzes files;summarizer.tsdeclaresresearcheras a team member and delegates file work to it, then synthesizes the findings. - Filesystem connector —
filesystem.tsexposesfs_read,fs_write, andfs_listtools scoped to a data directory, with path-traversal protection. - Skill —
research-guidelines/SKILL.mdis a versioned procedure the researcher loads on demand to follow a consistent methodology. - Actions —
approve.tsandreject.tsare typed structured outputs the reviewer emits; each has a Zod schema and a handler. - Clients —
chat.tsstreams a conversation with an agent;action-client.tsregisters typed action handlers and runs the reviewer, both viaPlatformClient.
How to run it:
$ cd my-project
$ cp .env.example .env # fill in your model provider key
$ pnpm dev # picks researcher / summarizer / reviewer
# Try the client examples
$ npx tsx src/clients/chat.ts
$ npx tsx src/clients/action-client.ts#Market intelligence template
The market-intelligence project is a pallet-liquidation workflow. A pure orchestrator with no direct tools follows a skill as a runbook: it prices a device pallet per market, scouts three marketplaces in parallel, picks the best market, sets a bid strategy, then submits a listing proposal that pauses for human approval.
- liquidator — the orchestrator. No direct tools; it only delegates to teammates and follows the urgent-liquidation-playbook skill. Carries a cron trigger so it runs hourly, and can also be run manually.
- pricing-analyst — looks up fair-market value per market and cosmetic grade through the Orakle connector and returns mix-weighted per-market averages.
- marketplace-scout — analyzes a single private-auction marketplace; the orchestrator delegates to three instances in parallel, one per city.
- bid-strategist — picks a starting-bid discount and a confidence score for clearing the pallet within the target window.
Team delegation and human approval. liquidator declares the three specialists as team members and issues parallel scout delegations in a single turn. Its final step calls the submit-deal action, which is gated by a governance policy: the run pauses, a reviewer receives an approval card, and the action handler runs only on approval. See Human-in-the-Loop and Governance & Policies.
Note
The Orakle connector falls back to per-market mock data when no provider key is set, so the workflow runs end to end out of the box. Set ORAKLE_API_KEY in .env to use live pricing.
#Running an example
#Next steps
- Quickstart — Go from an empty directory to a running agent, then deploy by connecting a repository.
- Agents — Define single agents and multi-agent teams, configure models, and wire in connectors, skills, and actions.
- CLI — Every command and flag for the kraken CLI and the create-agents scaffolder.