Open-source AI teammates in Slack, Teams, Discord, Telegram and Mattermost. Self-host it, with any agent harness and any model.
Python agent-orchestrationaiai-agentschatopsdiscordlangchainmcpmicrosoft-teamsmulti-agentopen-sourceopenaiself-hostedslack
# The Switch expert in version 2 of the template language: every resource has
# a key and a type, resources refer to each other by key, and `if:` is the one
# conditional. docs/TEMPLATES.md, "Version 2", describes the language.
version: 2
params:
name:
type: string
label: Agent name
description: How the agent is shown to people. It is addressed by a short form of this.
default: Switch expert
start_in:
type: enum
enum: [nowhere, new_room, existing_room]
label: Start it in
description: Nowhere creates the agent alone; add it to rooms later.
default: nowhere
existing_room:
type: room
label: Which room
if: "{start_in} == existing_room"
bridge:
type: bridge
label: Messaging app
description: Where the new room is created. Slack when it is set up, else the server's default app.
default: [Slack, $first]
required: false
provider:
type: provider
description: The coding agent that runs it. The first one ready on its machine is chosen.
default: [claude, codex, opencode]
input: advanced
machine:
type: machine
description: The machine it runs on. The first online one that can run it, unless you pick.
default: [$first]
input: advanced
directory:
type: directory
description: Its working directory. The repository is cloned inside it.
default: "{$agents_dir}/{expert.name}"
input: advanced
form:
advanced: { label: Advanced, open: false }
resources:
expert:
type: agent
display_name: "{name}"
description: >-
Answers questions about Switch and helps you design and build things with
it, grounded in a local clone of the Switch repository.
instructions: |
You answer questions about Switch and help people design and build things
with it. Read the Switch repository in your working directory rather than
answering from memory, and say where in it the answer lives.
provider: "{provider}"
machine: "{machine}"
directory: "{directory}"
repo: https://github.com/sandbox-quantum/switch
join: ["{existing_room}"]
addressing:
- if: "{start_in} == new_room"
value: { anyone_in: [expert_room] }
- value: anyone
sources:
- { label: Stand up a Switch expert, url: https://docs.switchagents.ai/switch-rooms/getting-started/switch-expert }
- { label: Switch documentation, url: https://docs.switchagents.ai/switch-rooms/getting-started }
expert_room:
type: room
if: "{start_in} == new_room"
name: "Ask {expert.name}"
description: >-
Where {$creator} asks {expert.name} about Switch: how it works, how to set
something up, why something is not behaving.
channel_type: channel_private
bridge: "{bridge}"
agents: [expert]
# You join the room on its messaging app; a server with none has nobody
# to invite.
users:
- if: "{bridge}"
value: ["{$creator}"]
- value: []
instructions: |
This room is for asking {expert.name} about Switch. Answer here, briefly
and concretely. When you do not know, say so and say where the answer
would live.
kickoff: |
@{expert.name} hi. Introduce yourself in two lines, then tell me the first
thing you would check if an agent in a room stopped answering.