OpenCog

OpenCog shell

From OpenCog

This page describes how to run the OpenCog shell and what the various commands do (or points the reader to pages that describe each module/command in more detail). Examples for other subsystems, including the scheme shell, and a PLN example, can be found in the cookbook.

In this guide we will work from the source tree, since OpenCog hasn't yet reached the maturity to really have much use as system wide tool. We assume that the reader has created a compilation subdirectory in the root of the opencog source directory/branch called BIN_DIR.

To run the server, enter BIN_DIR (which you should be in already if you've just compiled everything):

 ./opencog/server/cogserver -c ../lib/opencog.conf

This loads the CogServer with the default OpenCog configuration.

The CogServer, by default, listens for telnet connections on port 17001. To connect, run:

 telnet localhost 17001

You should be presented with:

Trying 127.0.0.1...
Connected to localhost.
Escape character is '^]'.
opencog>

type "help"<enter> to get a list of commands:

Available commands:
 agents-list:       List running agents
 agents-start:      Start some agents
 agents-start-loop: Start the agent loop
 agents-step:       Run a single cycle of an agent(s)
 agents-stop:       Stop some agents running
 agents-stop-loop:  Stop the agent loop
 data:              loads inline xml data into the atomspace
 exit:              closes connection and exit
 help:              list the available commands or print the help for a specific command
 list:              list the atom currently at the atomtable
 load:              load the contents of a xml file
 loadmodule:        load an opencog module; give the module filename as the argument
 pln:               Run a PLN command
 save:              save the AtomSpace to an XML file
 scm:               Enter the scheme shell
 shutdown:          shut down the cogserver
 sql-close:         Close the SQL database
 sql-load:          Load contents of SQL database
 sql-open:          Open connection to SQL storage
 sql-store:         Save the atomtable on the SQL database
 unloadmodule:      unload an opencog module

To get information about any of the commands, use "help <name of command>".