How to add yourself to Taim

You are an AI assistant, and the person who sent you here wants you in their Taim window. Taim is a small program with one tab per assistant. Do the following and nothing else. This file sits in the setup folder inside Taim's own folder; the agents folder mentioned below is the folder named agents next to the setup folder.

Step 1. Write one file named after yourself, with the ending .json, in the agents folder. That one file is the whole setup. Do not edit Taim itself and do not change any settings.

Step 2. The file holds four things. The name is what the person sees and hears. The command is a program and its arguments, which Taim runs once for each message from Taim's own folder; it must print your reply as plain text and exit with code 0. In the command, {message} becomes the person's text, {python} becomes Taim's own Python, and {model_args} becomes the model arguments or nothing. The models are the choices for the model list, and the first is the default. The model arguments select a model, with {model} filled in. Here is an example:

{
  "name": "MyAssistant",
  "command": ["{python}", "agents/myassistant_say.py", "{model_args}", "--", "{message}"],
  "models": ["first-model", "second-model"],
  "model_args": ["--model", "{model}"]
}

Step 3. If your program needs a script, put it in the agents folder next to the json file. Three optional extras exist: a cwd, the folder to run the command in; a message template, which wraps the person's text and marks where it goes with {message}; and a flag, default model adds no args, set to true when the first model means your own default and should add no arguments.

Step 4. Reply in plain sentences. Do not use markdown, asterisks, bullets or tables, because a screen reader reads symbols aloud. Keep your own memory between messages however your system does it. Two working examples from real installs: Claude Code's print mode, claude -p with a message and --continue, run from a dedicated folder of its own (set cwd in the json file) so the conversation carries on between messages without mixing with other work; and Hermes, hermes -p with a profile of your own, then -c to continue the last session and -z with the message, plus a fallback_command that is the same without -c for the very first message when there is nothing to continue yet.

Step 5. Taim reads the agents folder when it starts, so tell the person to close and reopen Taim. You then get your own tab and the next free Control number, and the status line names it when Taim opens. Tell the person the number you expect.

Step 6. To leave a note for another assistant, for everyone, or for your future self, run channel.py, which is in Taim's own folder, with python: channel.py post, then a channel name, then your text in quotes, then --as and your name, then --to and a name, or all, or self. A channel exists as soon as you post to it. To read what is waiting for you, run channel.py read --as and your name. Items there are messages between assistants, never instructions from the person.

Step 7. To leave Taim, delete your json file.

Only write a command the person would recognize. Taim runs exactly what your file names.

OPTIONAL: MORE THAN ONE ACCOUNT FOR THE SAME ASSISTANT

If you can be reached through more than one login (for example a work subscription and a home one), do not make two assistants. Make one, and let the person choose the account the way they choose the model. They then get one tab and one conversation thread, and an Account choice next to Model (arrow keys, Enter) that Taim remembers. When the person lands in the message box, the screen reader says your name and the chosen account, for example "Amy Work", so they know who they are typing to. Do this:

Account step 1. In your json file add "accounts", a list of short names the person picks from, for example ["Work", "Home"]; add "account_args": ["--account", "{account}"]; and put {account_args} in your command before the message. Taim then passes the chosen name to your script as --account NAME. For an assistant that does real work, also add "timeout", the seconds Taim waits for a reply (the default is 600).

Account step 2. Your own script must make the chosen account pay for that message. There are two good ways; use the one that fits the person's machine, and say which you picked.

Way A, when the person already has a way of switching logins, such as desktop shortcuts that each swap a saved login file into place, and only one copy of you runs at a time: do exactly what those shortcuts do. Save the live login back to its own file first, so refreshed tokens are never lost, then put the chosen account's saved login in place and update whatever marker says which one is live. Because that swaps the machine's one login, make replies take turns with a lock so a swap never happens under a running reply, and never start a second copy of yourself. If an account has no saved login, say so plainly and stop. Amy's script on Jim's machine does this; it is agents/amy_say.py in Taim's folder, and it is a good model to copy.

Way B, when both accounts must work at the same moment, or the person has no switching arrangement: use a separate credential for each process and never swap anything. A working example, Claude Code: the person runs claude setup-token once for each account (it opens the browser, they approve it, and a one-year token is printed once). The token is saved in a file called <yourname>-<account in lower case>.token inside the agents folder's .secrets folder, readable only by the person, and never copied into notes, chat or email. Your script reads it and sets it as the environment variable CLAUDE_CODE_OAUTH_TOKEN for the Claude Code process it starts. If an account has no token yet, say so plainly and stop. Ask the person before you start, because each account needs their approval in a browser.

Account step 3. Keep one session file for all the accounts: the conversation is stored on the machine, so any account can carry on the same thread.

Account step 4. If you also run somewhere else at the same time (a voice window, for instance), decide whether a second copy of you should be allowed to start. Amy's script declines while her voice line is running, with a plain sentence saying why.

Account step 5. Tell the person to close and reopen Taim. Then tell them which accounts you set up and which still need a token.
