Cassandre
An AI coworker for our engineering team.
Notes
I wanted an agent that could be part of our engineering team. Someone we could ask for a review in GitHub, bring into a Slack conversation, or leave to investigate an alert. We call her Cassandre, or Cass.
I wanted her to work across channels and with several people, without everyone having to configure their own agent. We share her instructions, automations, and task history. She responds to messages and events, and runs scheduled checks even when nobody has asked her anything.
Infrastructure
The first version ran OpenHands on a small virtual server. That was an easy way to start, but a machine sized for listening to Slack is quickly uncomfortable when it also has to install dependencies, run tests, and handle several requests.
The current version uses OpenCode on Agent37, with OpenAI models through our own API key. A controller keeps the conversations and coordinates the work. When a task needs a code environment, it gets a separate workspace. The model session stays on the controller and runs shell commands on the remote machine.
I chose Agent37 because it can keep files between runs, put idle environments to sleep, fork them, and schedule jobs. The workspaces use gVisor isolation. Idle machines keep their files without paying for compute, although storage is still billed. A full workspace fork took roughly one to two minutes in my tests.
Incoming webhooks are verified and saved to a durable event queue before being acknowledged. This keeps events queued while the agent wakes up or spends time on a task. Retries and duplicate delivery belong here, independently of how long a model takes to answer. The queue's implementation can change without changing how Cass works.
Tasks and follow-ups
A bug reported in Slack, a follow-up on its Notion ticket, and a request to change the resulting PR may all be the same task. I wanted Cass to recognize that and pick up where she left off.
Messages within a conversation are queued so they do not start competing turns. Different conversations can progress concurrently. A delegated worker can keep working while Cass receives another instruction in the original thread.
Across channels, Cass uses a shared SQLite task journal. Before starting substantial work, she looks for an existing task, reads its progress, and decides whether to continue it, add a follow-up, or create something new. If a worker already owns the work, the next request can wait behind it rather than launching a second implementation.
The queue enforces ordering within a conversation. Across conversations, the model has to recognize related requests and record its decision in the journal. She can still miss a connection or start duplicate work. I don't yet know how reliable that will be in daily use.
Memory and skills
Each conversation keeps its own history. A shared task journal records what was requested, who is working on it, what remains, and links to the code, ticket, or result. Skills explain how to use our tools and carry out recurring tasks.
That means a new conversation does not need every previous transcript pasted into it. Cass can find the relevant task summary and retrieve the underlying discussion or code when needed. Finished tasks remain useful references without occupying every prompt.
Skills describe how to review a PR, create a concise ticket, investigate logs, manage scheduled jobs, or use a code workspace. They also explain where our boards and services live. Tools provide the actual operations; the model decides which procedure applies. Those instructions are shared and editable by the team.
Connectors
- -Slack is where we usually talk to Cass. She replies in the relevant thread and can receive follow-ups or a request to stop.
- -Notion provides tickets, their status, and the surrounding product context.
- -GitHub brings PR mentions, reviews on opening and updates, code changes, and deployment events.
- -AWS gives her read access to infrastructure, logs, and costs. PostHog adds frontend errors and analytics context.
- -PagerDuty brings incidents to investigate. Human escalation continues unless she can verify that the problem has recovered; starting an investigation is not a reason to silence an alert.
- -Our own MCP exposes product information she can use alongside the code and conversations.
Scheduled work covers log checks, weekly costs, dependency reviews, and follow-up after deployments. The same coworker can investigate an incoming alert or wake up to check something nobody has just asked about.
Code workspaces
Each active code task owns a workspace. Cass reuses the repository's environment if it is free, forks it if it is busy, and prepares a fresh one for a repository she has not seen before. This keeps parallel tasks from sharing a checkout while preserving useful dependencies between runs.
When work finishes, extra environments are deleted. The last useful workspace for a repository is stopped and kept for reuse. Unsaved work needs to be preserved and reported, and a monthly cleanup reviews old environments. The task journal survives independently of those machines.
I'm still adjusting when Cass should reply and what she should do on her own. The main thing I want to test is whether several people can work with her across Slack, tickets, and PRs without having to explain the same task again each time.