Recipes
A recipe is a bot to share: a file another Huskarl can make the same bot from. It holds what the bot is, and nothing of the person who made it.
| In a recipe | Never in a recipe |
|---|---|
| name, role and instructions | memories |
| agent and model | logins and connections (mail, the browser's profile) |
| rules: classes and domains | the conversation and the transcript |
| token budget per run and daily budget | a webhook's token: a new one is made on import |
| the browser's sites, and Chief on or off | the ids of your other bots |
| routines: name, prompt, schedule and condition |
A routine that runs when another bot finishes names that bot. On import it is kept only if you have a bot by that name; otherwise it is left out, and the thread says so.
The ones that come with Huskarl
The new-bot page has four to start from, under "Or start from one that comes with Huskarl". They open in the same preview as an imported recipe, with what they ask for, and start in rehearsal:
| Recipe | What it does | Routine |
|---|---|---|
| Inbox Manager | archives newsletters and notifications, drafts replies as proposals, lists what needs you | every 15 minutes when new mail has come |
| Expense Manager | reads each receipt dropped in ~/Huskarl/Utlegg, adds a line to Utlegg YYYY-MM.csv in its folder, moves the receipt to Done |
every 5 minutes when files have come |
| Meeting Briefs | writes a brief of at most ten lines before each meeting, from the invitation and the mail with the attendees | every 5 minutes, 15 minutes before a meeting |
| Dev Desk | triages new issues (duplicates, labels, what a bug report lacks), sums up pull requests that wait for review, drafts release notes as a draft release, with Elyra Workspace connected hands a small, understood bug to a coding agent there, and with Félagi connected reminds you of your tasks that are due and asks what hours to log. Needs GitHub | weekdays at 08:30, and at 15:30 for hours |
They live in recipes/ in the repository, as ordinary recipe files.
Exporting
In the bot's settings, Export as recipe… saves it as
<name>.huskarl.json, in Downloads unless you choose otherwise. From the
terminal:
huskarld export <bot> inbox.huskarl.json
Without a file name, the recipe is printed.
Importing
On the new-bot page, Import a recipe… opens a file. Before anything is made, Huskarl shows what the bot asks for beyond the defaults, the way an app lists the permissions it wants:
- Sends mail to firma.no without asking you (logged)
- Does «Change internally» without asking you, and without logging it
- Opens these sites in its own browser: tripletex.no
- Gives your other bots tasks
- Runs «Morning sort» by itself, every weekday at 07:00
- Can be started from this Mac through «Orders»'s webhook
- Reads the files you put in ~/Huskarl/Utlegg
- No limit on what its routines spend in a day
The instructions are shown in full too: they are someone else's words, and they will be the bot's. Rules for money and deleting are not shown, because no rule can loosen them.
Make the bot creates it. Start in rehearsal is on to begin with: the new bot reads for real and only writes down what it would do (see Rehearsal). Look at what it would have done, connect its mail in the settings, and turn rehearsal off when you trust it. A bot whose name is taken gets a number: "Inbox 2".
From the terminal, import shows the same list and makes nothing until it is
run again with --yes. --live makes it without rehearsal:
huskarld import inbox.huskarl.json
huskarld import inbox.huskarl.json --yes
The format
JSON, with "huskarl_recipe": 1. A Huskarl reads the versions it knows and
refuses newer ones ("a recipe of version 2; this Huskarl reads version 1").
The fields are those of update_bot,
plus routines:
{
"huskarl_recipe": 1,
"name": "Expense Manager",
"role": "Enters receipts",
"instructions": "…",
"agent": "claude",
"model": null,
"policy": {"rules": [{"class": "send", "recipient_domain": "firma.no", "decision": "allow_logged"}]},
"run_token_budget": 1000000,
"daily_budget_usd": 1.0,
"browser_domains": ["tripletex.no"],
"delegates": false,
"routines": [
{"name": "Receipts", "prompt": "Enter the new receipts",
"schedule": {"kind": "interval", "minutes": 5},
"condition": {"kind": "new_files", "folder": "Utlegg"}}
]
}
Not yet
- A catalogue of recipes to pick from, for example for accounting firms.
- Signed recipes, to know who made one.