=====================
 Narval User Stories
=====================

A Narval agent can connect to a jabber server to exchange messages
and presence information using XMPP_. Here are user stories describing the
interaction between a Narval and a user.

.. _XMPP: http://www.jabber.org/protocol/


hello world
-----------

Let us begin with the simplest example of all. We have an agent named gizmo and
a user named Jean. ::

  DIALOG(jean,al)

  jean: hello
  al: hi



Note-taking
-----------

We are chatting with a Narval agent and we want it to remember some
of what we say. It could be for example that it records every sentence
that contains the word 'action'. ::

     DIALOG(jean,al)

     jean: hi
     al: hi
     jean: It is a nice day.
     jean: action: I will go for a hike.
     jean: and try not to forget my backpack
     jean: tell me about action
     al: jean: "action: I will go for a hike."
     jean: tell me about backpack
     al: nothing known about backpack.
     jean: tell me about hike
     al: jean "action: I will go for a hike."



Set-up jabber meeting
---------------------

Jean asks his agent to set up a jabber meeting. Al opens a forum
and invites participants. ::


     DIALOG(jean,al)

     jean: setup conf agents al jean

     
     FORUM(agents,jean,al)
     [al invites jean to forum agents]
     [jean accepts invitation to forum agents]
     [al is present in forum agents]
     jean: al: thanks
     al: jean: you are welcome

Syntax specifics
----------------

If you want to test a multiline response, replace the line breaks with
semicolons (;). This is a bit a hack for the moment since the parser
doesn't yet read multilines in dialogs. ::

     DIALOG(jean, al)
     
     jean: tell me a few things
     al: first line; second line; third line