//
Agents, Personas and People

So far in this Deep Dive series into the Document API we’ve looked at the State API and Activity Profile API. The Agent Profile API is similar to the Activity Profile API, but instead of Documents relating to Activities, it’s used to store Documents relating to Agents, such as the learner. Documents can be stored and retrieved for Agents across Activities, allowing sharing of items such as personal information, user settings, etc. The Agent Profile API can also store Documents such as a reflective learning journal, career plan or development goals. Because this generic information can be shared by multiple Activity Providers, it may be of use even in cases where the Activity Provider has its own data store.

Like the Activity Profile API, the Agent Profile API includes a readonly endpoint for getting information about a particular person. This is known as the Agent Profile Combined Information resource. Agents in xAPI are always a persona, a particular identity. andrew.downes@tincanapi.com, @mrdownes on Twitter and garemoko on GitHub are all separate personas of the same person. See the ‘Gotchas’ section of Brian Miller’s Deep Dive: Actor/Agent for more details. Given that an Agent is only one persona of a person, it may be helpful for an Activity Provider to know if their learner has any other personas the LRS knows about. Maybe @mrdownes has already completed half the learning experience as garemoko; I don’t want to have to start again from scratch!

The Agent Profile Combined Information resource allows an Activity Provider to send the LRS an Agent object and then get back a special Person object that contains all of the identifiers the LRS knows relate to the same person. So for example, if an Activity Provider requested combined information about an agent identified by the e-mail address andrew.downes@tincanapi.com it might get back the following Person object with multiple names, email addresses and accounts:

{
objectType: "Person"
name:[
"Andrew Downes",
"Andy Downes",
"Garemoko"
],
mbox:[
"mailto:andrew.downes@tincanapi.com",
"mailto:andrew.downes@rusticisoftware.com",
]
account:[
{
homePage: "https://twitter.com",
name: "mrdownes"
},
{
homePage: "https://github.com",
name: "garemoko"
}
]
}

The specification doesn’t require the LRS to link up personas representing a single person or specify how an LRS should do this if it does. If an LRS does link personas in some way though, this is how an Activity Provider can get at that information. This resource is read-only; Activity Providers can get this information from the LRS, but cannot set it.

The Agent Profile API, and the Person object in particular, is an area where we get a lot of questions. I hope this deep dive has answered some of them, but if you have more questions then please get in touch.

Go now, store Documents!