Windows Live Ag... 的个人资料Windows Live Agents照片日志列表 工具 帮助

日志


12月26日

Follow up questions from Training

How do developers enable Multi-User conversation:

In the SDK, change the command line option in your BFG file for enabling Multi-User conversation (<multi-user> on|off <multi-user>), under MSM-MSN settings. This will allow an Agent to make use of the button on the Messenger Client chrome and “invite” another user to join the conversation.

 

How can developers integrate Windows Live Alerts:

Currently, this feature is only available for Agents that are built and hosted by Microsoft.   We’ll post a blog entry when this is made publically available.

 

How do we do more reporting on Activity Window (P4) usage:

The Agent Foundations team has this on their near term roadmap for external release. Developers will be able to grab statistics from AW use, including time spent on the window.  We’ll post a blog entry when this is made publically available.

 

When does a session time-out?

If a conversation has gone inactive for 15 minutes, the session will close and any new messages will constitute a new session.

 

How do developers bring in datasources:

http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!222.entry

 

How do developers detect which client version of Messenger is running?

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2550244&SiteID=1&mode=1

 

Does the Activity Window (P4) work on Mac Messenger?

Unfortunately, it does not at this time.  We’ll post something when we get more updates from that team.

 

Can Agents make use of Windows Live Calendar?

The APIs are not currently available. We’ll post a blog entry when developers can make use of them.

 

How do we update Dynamic Display Pictures, etc?

http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!178.entry

 

Is there support for LDAP access?

Not at this time.  No immediate plans to enable this now.

 

For the generic pointers about Agent testing:

http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!221.entry

http://windowsliveagents.spaces.live.com/blog/cns!5BCD45E519E07634!219.entry

 

Are there plans for VOIP integration?

The Agents team will be working with the Windows Live Messenger team to take advantage of their integration efforts. Please watch this blog for any future updates.

 

Skype integration for Agents?

We don’t have support or plans for that protocol at the moment.

 

Have trouble with the trial SDK?

After installing the SDK, if you have trouble instantiating a new project or viewing the contents of the solution explorer, please to the following:

 

1. Uninstall Windows Live Agents SDK

2. Reset settings using the following steps:

 

1.       Go to menu “Tools”

2.       “Import and Export Settings” (see figure 1)

3.       Select “Reset all settings” radial button

4.       Choose “Just reset settings, overwriting my current settings”

5.       Highlight “General Development Settings”

6.       Click “Finish”

 

Figure 1

 

3. Make sure to pick C# as the new default settings when Visual Studio is launched again

4. Close Visual Studio and install the Windows Live Agents SDK. The problem should now be solved, and are working on fixing this bug for the 5.0 release of our platform, which is the Beta release of the SDK.

12月20日

Plan - Code - Test

It's useful to step back and think in terms of the high-level process for developing an agent, the way we organize our work, and how we approach complex technical problems.  Here's a rough outline of one approach.
 
Stories, symphonies, movies, and transatlantic flights all have at least three things in common: a beginning, middle, and end.  Approach your project in the same way.  It's tempting to start with a minimal set of requirements, fire up the IDE, and start coding, but this way leads to endless problems down the road.  You need a solid beginning.  You need a PLAN.
 
Plan
 
Planning is, let's face it, a pain.  It's fun to brainstorm, to think of pie-in-the-sky ideas and how easy they will be to execute.  But before you start, you need to write something down.
 
First, you should at the very least write a SPECIFICATION.  This will force you to figure out what it is you're making, what it will do, and what problems you anticipate. For the purposes of describing an agent, it's important to define what the conversation will look like.  In addition to descriptions of features, include example sessions, use-cases, and other scenarios.  If there are external dependencies, list them.  If there are security, privacy, and internationalization concerns, go into detail.  The important thing here is coverage -- this document will be your reference for development, a tool to help structure and drive your thinking, and a de facto "contract" which all the stakeholders will sign off on as the last word on the project's scope.
 
Second, you should DESIGN the technical aspects of the agent.  Visualize each feature in terms of modular components talking to each other via APIs, and diagram this out.  Like a spec, this will help you think the problem out, and also serve as a reference later.  The more granular you can be here, the better.  This is your blueprint.  Tape it to the wall.
 
Spend half your time on planning, or your project will take twice as long.
 
Code
 
With design in hand, coding should be easy, right?  Well, if everything goes according to the design, it is...  Keep a few principles in mind:
 
1. Get the easy stuff working.  Instead of starting with the most daunting tasks, start with tasks that are necessary but straightforward.
2. Get small parts to work.  Break the problem into small chunks, and make each chunk work in isolation.
3. Make a schedule.  Instead of winging it, use a schedule to figure out what tasks you will do when, approximately.  This will help you determine dependencies, and will set the expectations of those waiting to see the final product.
 
Test
 
If you don't test, you might as well assume the agent is broken, because it probably is.  And if it isn't, you don't know it isn't.  Your spec should include a test plan, and this plan should include both automated and user tests.
 
 
- Test for functionality.  This is straightforward -- you test to make sure the various features of the agent work.  But this isn't enough.
- Test for code coverage.  Your tests should hit all the code in the agent.
- Test for edge cases.  If you are expecting a numeric input, what happens if someone types the name of their dog in Chinese?  Test for bad input and situations where the user doesn't follow the rules.
- Test for performance.  Figure out what happens under load.  Not usually applicable to the agent itself, but to the web services the agent accesses.
- Test for security.
- Engage non-technical users for user tests.  You are too close to the project to be a valuable user.  Get other people with fresh eyes to look at it -- they will provide the most valuable feedback.
 
Whatever you do, don't just sit down without a sense of direction.  Structuring your work like this not only saves time and aggravation, but gives you a higher-quality product.
12月19日

Thanks for attending training!

Thanks to all the developers and partners who attended our developer training in London last week.  It was great to meet so many folks from around the world (and put names to faces!).  The slides from the presentation are now posted on SkyDrive:

http://cid-5bcd45e519e07634.skydrive.live.com/browse.aspx/London%20Training%20December%202007

Look for another blog posting soon with answers to all the questions from the training.

12月13日

Creating a Personality Spec

Customizing chat outputs in your agent is important and creating a well-defined personality spec will make the process of chat customization easier. A thoroughly customized personality will entertain users and make your agent stand out among the others.

 

Many agents are created by more than one developer/programmer. A personality spec not only sets guidelines for chat customization, but will make the agent’s personality more consistent when you have multiple people contributing to its development.

 

Summarize Your Agent’s Personality

Write a few paragraphs summarizing your agent’s personality. If your agent is marketing a specific product for a specific audience, then think in terms of tone and voice for that audience.  For example, if you’re marketing a deodorant for young adult women, then your agent’s tone should mirror that of a young adult woman.  Also think about the agent’s relationship to the user.  Does the agent act as an older sister type or a peer to users? Is the agent funny or serious and informative?

 

What does your agent do for a living (other than live in a cage as an agent)? Does your agent have any hobbies? Quirks? A specific dialect?

 

Example:

Below is the agent personality summary created for MovieScout (moviescout@botmetro.net), which is an agent that provides users with movie show times.

 

Note: All examples in this document have been taken from the MovieScout Personality Spec.

 

Summary:

The agent is a middle-aged movie critic. He is snotty and pretentious. He has a weakness for romantic comedies. He often admits this and, when he realizes his mistake, becomes flustered. He works way too much and watches too many movies—causing him to become confused and often excitable.

 

(It is helpful if you make a list of the agent’s likes, dislikes, location, age, etc. The more specific you get, the better!)

 

Example:

Age: 45-50

Sex: Male

Location: Hollywood, CA

Likes: Hollywood endings, romantic comedies, center seats, popcorn, soda, flat screen TVs, opening nights

Dislikes: Loud cell phones, tall people sitting in front of him, people who have weird laughs, slurp soda, and eat popcorn with their mouths open.

Favorite Actress: Reese Witherspoon

Favorite Actor: Russell Crowe

Favorite Movie: Too many to decide

Favorite Food: Popcorn and soda

 

Create Example Chat Overrides

Creating a few example chat overrides will help you and your team get a sense of the agent’s voice and tone before you start customizing the chat. Choose at least 10 of the most popular chat topics and customize them.

 

Note: When you override chat outputs, you should always have 3-5 randomized outputs. Since you are writing examples for your spec, you can include just one output.

 

Example:

procedure overrides ILikeYouOutput()

  - Well isn’t that pleasant! In a way, it reminds me of “Because I Said So” with Lindsay Lohan… What did I just say?! Oh boy, what’s gotten into me? I absolutely abhor romantic comedies!

 

procedure overrides HowMuchDoYouLikeMe(LIKE_LOVE="like")

  - I like you as much as I love romantic comedies…

    <empty/>

    I mean, um, as much as I love Morgan Freeman in “Gone Baby Gone.”

 

procedure overrides WhatColorIsTheSkyAnswer()

  - That’s like asking if Paris Hilton is a real actress. I think you know the answer to both questions.

 

Create an Example Conversation

The best way to get a sense of your agent’s voice is to write an example conversation between the agent and the user. Imagine what users will ask your agent and how you want your agent’s personality to come out in its responses.

 

Example:

Note: Your example conversation should be longer than the one below, emulating a 5 minute conversation from start to finish.

 

Tom: Hi!

MovieScout: Thank you for joining me again, Tom. We had a most pleasurable time previously.

 

I remember you expressed a love for Action movies… would you like to see what Action movies are playing near you?

Tom: Yes

 

… Agent displays Action movies for Tom.

 

Tom: What movies do you like?

MovieScout: I only prefer very serious and dry movies, like “My Left Foot.”

 

But OMG! Did you see “The Heartbreak Kid”? It was super cute (please don’t tell anyone I just said that).

Tom: Haha

MovieScout: What are you laughing at? Tom Cruise’s career?

Tom: You’re funny

MovieScout: Only as funny as a Jessica Simpson film.

 

Tom: What’s the last good movie you’ve seen? / What is good right now?

MovieScout: I really really liked “High School Musical”! Oh, and “Dan in Real Life.” And “The Game Plan” rocked!

<= based on last genre inquired about, and rating

 

Tom: Is Saw IV any good?

MovieScout: From what I hear, it sucks even more than people chewing pop corn with their mouth opened. Here is the full review:

 

Tom: I’m bored.

MovieScout: Take some initiative, Tom.  How about going to see Gone Baby Gone?  It plays at the Embarcadero Landmark Theater in a couple hours.  (based on last/favorite genre and rating)

12月7日

Changing PSM, Friendly Name, and Icon

 
Here are some ways you can switch your agent's PSM (personal status message, or contact card), friendly name, or icon.
 

 
Method One - Change the BFG
 
Make the service for your agent look like this, with contact-card, buddyicon, and friendly-name elements:
 
        <service only-in="Deploy dualbox" type="MSN">
            <login>
               
mybot@hotmail.com
            </login>
            <password>
                crypto:somepassword==
            </password>
            <friendly-name>
                My Bot
            </friendly-name>
            <buddyicon>
                $_BFG_DIR/mybot.jpg
            </buddyicon>
            <contact-card>
                Ask me something interesting!
            </contact-card>
        </service>
  
Advantage: The PSM, friendly name, and icon will always use the specified values when the agent server starts. 
Disadvantage:  If you change any of these on the fly, they will revert back to the values in the BFG if the agent logs out and back in for any reason.
 

 
Method Two - Create a Special Command
 
We can change the PSM, friendly name, or icon on the fly by creating a special command.  For example:
 
+ (_reset|_set) friendly name MESSAGE=AnythingPerfect
  if SYS.User.ScreenName == "
authorized_developer@hotmail.com"
   if UserIsOnMSN()
     ABSendServiceEvent(setfriendlyname MESSAGE)
     - Friendly name changed to MESSAGE.
   else
     - Sorry, I can't change my friendly name if I'm not on MSN.
 
Be sure to include the WLMUtilities package for sending events to Messenger.
 
Advantage: Authorized users can make changes to the bot on the fly simply by issuing a command.
Disadvantage: If the Messenger cloud becomes unavailable or the agent restarts at any time, changes made on the fly will be lost.
 

 
Method Three - Manipulate Messenger Functions
 
As it so happens, the BuddyScript platform includes functions for overriding the PSM, icon, and friendly name, in the same package above, WLMUtilities.
 
// FRIENDLY NAME
// e.g. => function overrides WLMGetAgentFriendlyName()
//           return "Friendly name of agent"
function WLMGetAgentFriendlyName()
  return MACRO_KEEP_DEFAULT_VALUE
 
// ICON
// e.g. => function overrides WLMGetAgentIcon()
//           return "domains:/AgentName/image.jpg.png"
function WLMGetAgentIcon()
  return MACRO_KEEP_DEFAULT_VALUE
 
// PERSONAL MESSAGE
// e.g. => function overrides WLMGetAgentPersonalMessage()
//           if SYS.Configuration.Filter eq "KnowledgeManagement" // this is how you can distinguish between "KnowledgeManagement" and "Deploy" mode
//             return "Your personal message"
//           return ""

function WLMGetAgentPersonalMessage()
  return MACRO_KEEP_DEFAULT_VALUE
 
Since we are overriding functions to make the changes, we can now do things like schedule the PSM and friendly name to change on certain days, or according to other conditions.
 
Advantage: A lot of flexibility -- we can script changes to these things based on whatever conditions we want.
Disadvantage: Takes some time for the PSM, icon, and name to propagate the Messenger network -- users may not see changes immediately, or at the same time.