Before you start
- You completed 3. Build a knowledge base.
- To post to Slack, the agent needs Slack tools: a Slack MCP server credential in the vault the agent uses. With workspace defaults, that is the Default vault. See Vault and Tools to add it.
1. Create the agent
- Click Agents on the left navigation rail, then Create New.
- Enter an Agent name and a Description.
- Leave the Runtime fields — Vault, Tool bundle, Default model and Sandbox environment — at their defaults.
- Click Create & open builder.
2. Connect the model and the knowledge base
Open the Config tab on the left.1
Connect the knowledge base
Under Knowledge bases, open Pick a context…, select the knowledge base from part 3, and click +. The agent can now read it, mounted read-only in its sandbox.
2
Connect the analytic model
Under Analytic models, open Pick models…, select the model from part 1, and click Connect model. Only published, materialized models can be connected.
3
Save
Click Save config. Connections apply from the agent’s next turn.
3. Write the agent’s instructions
In the builder chat, describe what the agent does. The builder writes the agent’s instructions and files in the sandbox; you can see them in Sandbox files.Example prompt
4. Test it
Click Test run in the header. The Test run tab runs the unpublished draft, so you can check answers before anyone else sees the agent. Try questions that need both the model and the knowledge base:Example questions
5. Publish
Click Publish in the header. In Publish this agent, add Release notes (optional) and click Publish. Publishing saves a version and deploys the agent: the agent is enabled and appears in Chat. To ask it questions any time, click Chat on the navigation rail, choose the agent with Select an agent, and type your question.6. Schedule the weekly report
1
Open Automations
Open the agent’s detail page — click Agent at the top left of the builder — and go to the Automations tab. Click New Automation.
2
Describe the job
Enter a Name, for example
Weekly report. In What should it do?, describe the report and where to post it:What should it do?
3
Add a weekly trigger
Under Triggers, click Add trigger and choose Scheduled. Set Frequency to Every week, pick the Day of week and Time, and set Time zone to your team’s time zone.
4
Save
Click Create.
5
Try it now
Click Run now on the automation’s row instead of waiting for the schedule. Check the Slack channel for the report.
The automation posts to Slack through the Slack tools in the agent’s vault, because the prompt asks for it. To chat with the agent inside Slack instead — mention it and get an answer in the thread — give it its own Slack bot on the Channels tab. See Channels.
What you built
- A published agent that answers questions from the analytic model and the knowledge base.
- A weekly automation that writes a report and posts it to Slack.
Previous: Build a knowledge base
Turn the documents into a versioned knowledge base.
Next: Ship an app
Build a marimo dashboard and share it with your team.