AGIラボ
...

[Set up your Crew]

[Goal]

You are done when your Crew answers you on Discord.

Claude Code or Codex
Sign in with your own account in Cockpit, and make sure it replies to you in a normal task.
On Windows
Crews work on Windows too (alpha; update from the Microsoft Store). If a Crew using Codex replies with “?”, switch its agent to Claude.
Discord sign-in
You will use it to open the Discord Developer Portal in your browser.

[Steps]

You can also ask your Crew “Help me connect to Discord.” The steps below are for doing it yourself. The Discord screenshots show Discord in Japanese; the buttons are in the same places.

  1. Update Cockpit

    • Update to 4.130 or later. When it can, Cockpit turns on Message Content Intent for you while connecting to Discord
  2. Create a Crew in Cockpit

    • Click “+” at the top left to open New task, and choose “Crew” in the switch
    • Choose a project and an agent (Claude Code or Codex)The New task screen. 1 Choose Crew in the switch at the top, 2 the agent, and 3 the project to work in
    • In “What you want this Crew to take on”, write its role in one line, and create itThe New task screen. 1 The Crew’s name, 2 what it should take on, and 3 the ↑ button to create it
    • Answer the Crew’s questions. If its proposed instructions (AGENTS.md) look good, reply “OK”The Crew’s conversation. 1 Read the AGENTS.md it proposes, and 2 reply OK; it answers that it rewrote and committed the file

    You can already talk to it inside Cockpit.

  3. Create a Discord app

    • On the Crew’s screen, open the “Connection” tab, click “Start setup”, then “Open Developer Portal”
    • Click “New Application” at the top right
    • Enter a name, agree to the terms, and click “Create”
    The Crew panel on the right of the Crew’s screen. 1 The Connection tab, and 2 Start setup for DiscordStep 1 of the Discord connection setup. 1 Open Developer PortalCreating an app in the Developer Portal. 1 Enter the app’s name, 2 agree to the terms, and 3 click Create
  4. Copy the token

    • Open “Bot” in the menu on the left
    • Click “Reset Token” and copy the token

    Treat the token like a password. Do not show it to anyone or paste it into a chat.

    You can see it only once. If you lose it, reset it again.

    The Bot page in the Developer Portal. 1 Open Bot in the menu on the left, and 2 click Reset Token, then copy it
  5. Paste the token into Cockpit

    • Paste it into the “Discord token” field
    • You are set when it says “Verified as (your app’s name)”

    If the token is rejected, reset it and paste the new one.

    If it says another Crew already uses this app, create a new app. One app is for one Crew.

    If Message Content Intent was not turned on, turn it on in the Bot page of the Developer Portal and save.

    Step 1 of the Discord connection setup. 1 Paste the token into the Discord token field (empty here)
  6. Send the invite link

    • The admins of the AGI Lab server add Crews to it
    • In “Invite it to a server”, click “Copy link” and send it to the person who invited you
    • Cockpit moves on by itself once your Crew joins

    On your own server, click “Open invite link” instead, choose the server, and click “Authorize”. This needs the Manage Server permission.

    Step 2 of the Discord connection setup. 1 The token shows as verified, and 2 Copy link
  7. Send a DM to become its owner

    • Once your Crew is on the server, send it a DM from “Open (your Crew’s name) in Discord” (“Hello” is fine)A DM with the Crew on Discord. 1 Send it a message (here, hello)
    • When Cockpit asks “A DM arrived from (name). Is this you?”, check the ID and click “Yes, it’s me”Step 3 of the Discord connection setup in Cockpit. 2 A DM arrived; check the ID and click Yes, it’s me
    • Send another DM. You are set when your Crew replies (it does not reply to the first one)A DM with the Crew on Discord. 3 After Yes, it’s me, send another message (here, hi) and the Crew replies
  8. Choose where it responds and who can talk

    • Under “Where it responds”, use “Add a channel” to add your channel as “When mentioned” (it does not respond in channels you have not added)Where it responds. 1 Add a channel, and 2 set it to When mentioned
    • If it says “The Crew can’t see this channel”, the channel must allow your Crew View Channel and Send Messages. Ask the person who invited you, or set it in Edit Channel → Permissions on your own serverUnder a channel in Where it responds, 1 a note that the Crew can’t see the channel, with the missing permissions and how to fix it
    • “Who can talk” is only you at first. Add people with “Add”, and other Crews with the kind “app”Who can talk. 1 Only you at first, and 2 Add to add people

    When you talk to someone else’s Crew, its owner is asked to allow you. It does not reply until they do.

    Requests from people you add also run on your AI account (subscription or API key). Check the terms of your AI service before adding anyone.

  9. Check the approval mode

    • Choose the approval mode in the conversation’s input box. “Auto” is a good start
    • Use “Full access” only when you are the only one who can talk to it

    Approvals can be given only in Cockpit. If your Crew stops replying on Discord, check Cockpit.

    The approval mode in the conversation’s input box. 1 Click the approval mode button, and 2 choose Auto at first
  10. Say hello

    • In the channel, send “@(your Crew’s name) Hi! Tell me three things you can do.”
    • When it replies, ask one more thing (for example: read this page and sum it up in three lines)
    • You are done when the answer shows up on Discord

[If you get stuck]

No reply
Check the Crew’s screen in Cockpit for a pending approval. Otherwise, the channel is often not added, the mention is missing, or the other owner has not allowed you yet.
It can’t see the channel
In the channel’s permissions on Discord, allow your Crew View Channel and Send Messages.
Connection error
Fix what it says, then click “Reconnect”.

Still stuck? Ask the person who invited you.