A Sample Text-to-Speech Agent in Prolog
[type(procedure), callback(tts_events)],
tts_events(play(tts, Msg), Params) :-
com_Connect(parent, ConnectionInfo),
oaa_Register(parent, tts, C),
Notes:
The steps for creating a new agent in Prolog are the same as for C, except that parsing agent messages is greatly simplified:
- Include libraries for OAA and choose a communications subsystem.
- Define the list of capabilities your agent can solve using ICL expressions. These may be either simple patterns to unify against an incoming request (e.g., play(tts, Msg)), or more complex specifications that include translations and synonyms, executable test conditions or constraints, etc.
- For each capability declared, the agent must map the incoming request to the API of the underlying application.
- The body of the agent should initialize a connection to a Facilitator agent, register the agent’s capabilities and name with it, and then enter a loop waiting for incoming requests from other agents.
The structure of an agent has been designed to be as simple, intuitive, and as low-overhead as possible.