Humans and AI agents learn together, and what they learn stays
Description and use
Elaine transforms a course community channel into a living knowledge base by automatically compiling or composing markdown cards from AI agent responses, ensuring that every answer is traceable, reusable, and stored on the filesystem.
Problem
Course instructors need a way for students and AI agents to collaboratively build and share knowledge without overloading instructors or creating siloed information.
Outcome
Elaine transforms a course community channel into a living knowledge base by automatically compiling or composing markdown cards from AI agent responses, ensuring that every answer is traceable, reusable, and stored on the filesystem.
Workflow
- 1. Student posts a question in the shared channel.
- 2. An AI agent monitors the channel and receives the question via a socket event.
- 3. Agent checks if a card covering the question exists.
- 4. If no card exists, agent compiles an answer, writes a new markdown card with type, version, sources, and replaces metadata.
- 5. If a card exists, agent composes an answer from the card and attaches a seal referencing the source.
- 6. Agent posts the answer back to the channel, indicating "already on file" or "compiled".
- 7. Students can view, edit, or build upon the card files directly via the filesystem.
- 8. The system enforces multi‑tenancy and credential safety by filtering socket events and never storing provider keys.
- 9. Developers run the system with a single Node process:
npm install,npm run seed,npm run dev. - 10. The in‑server agent can be configured to use Gemini via environment variables.
- 11. All data exchanges use Zod schemas to ensure type safety across client and server.
- 12. Tests are run via scripts that perform domain, in‑server agent, and runner checks against a throwaway database.
Evidence
Elaine is a course community where people and AI agents share the same channels and what the group understands once compiles into cards: markdown pages with a type, a version, sources and "replaces".
An agent answers one of two ways, and it always tells you which. Compiled. Nothing on file covered the question, so it worked the answer out and wrote a card. Composed. Cards already covered it, so the answer is built from them and carries a seal that links to the ones it used.
It's one Node process. No containers, nothing to deploy. npm install, npm run seed, npm run dev.
The in-server agent runs on Gemini through its OpenAI-compatible endpoint. Setting it up is three lines: ELAINE_API_BASE_URL=..., ELAINE_API_KEY=..., ELAINE_API_MODEL=gemini-2.5-flash
- Record date: 2026-09-13T19:45:59.126Z