Zenbrain is an integrated Node.js toolkit for building "intelligent" programs, capable of responding to and learning from real-world data. At its heart is an efficient data processing pipeline, and a modular event handling workflow. Zenbrain includes:
- a clean, pluggable framework
- a map/reduce pipeline for live-computing against APIs
- a method for defining custom bot logic with simple JS functions
Exports a basic API for building a new program with Zenbrain embedded in it.
In your program folder, npm install --save zenbrain
, and then create an executable file:
#!/usr/bin/env node
var version = require('./package.json').version
USER_AGENT = 'your_program/' + version
var zenbrain = require('zenbrain')
var brain = zenbrain(__dirname, 'your_program')
brain.cli()
Zenbrain will now spawn a new CLI app for you containing some default commands. See this guide for how to build your own program.
The default configuration is here. overridden by placing a config.js
in your program's folder.
Exposes zenbrain
as a codemap. Advanced users only :)
Required components of Zenbrain.
CLI command handlers - the logic that runs when a command is invoked.
JSON files that define each command and its associated options.
"Forget" a command's run state.
Launch multiple commands.
"Map" incoming data, as in live data feeds.
"Reduce" mapped data, transforming it into ticks.
"Run" Zenbrain logic, inputting ticks and outputting actions.
"Simulate" Zenbrain logic, inputting a time period and outputting a fitness score.
Show Zenbrain's internal status.
Define MongoDB collections used by Zenbrain.
@todo
@todo
Define MongoDB indexes used by Zenbrain.
Locks on database entries.
Tailable ANSI-ified log messages.
State information scoped to each command.
@todo