A tutorial implementation of an Anode runtime agent using Deno. This agent demonstrates the basic patterns for connecting to LiveStore and processing notebook cells.
- Code cells: Echoes back the input code as plain text
- AI cells: Responds with "Beep boop. You said '{input}'"
- Appears as "echo" kernel in the Anode notebook UI
- Demonstrates the LiveStore event-driven execution flow
NOTE: You must be running your own copy of anode with your own AUTH_TOKEN
env var set in the shell or in a .env
file. Alternatively, use --auth-token=YOUR_TOKEN
. Additionally, you may need to set the --sync-url
to your running anode instance.
-
Get notebook ID and token from your Anode UI
-
Run the agent:
deno run --allow-all --env-file main.ts --notebook=YOUR_NOTEBOOK_ID
- Or compile to binary:
deno compile --allow-all --env-file -o echo-agent main.ts
./echo-agent --notebook=YOUR_NOTEBOOK_ID
- Event-sourced: Everything flows through LiveStore events
- Reactive: Uses
queryDb()
subscriptions to keep up to date state
Fork this to build your own runtime agent:
- Execute actual JavaScript/TypeScript code
- Add rich output formatting (HTML, images, etc.)
- Integrate with databases, APIs, or AI services
- Add custom cell types and capabilities