AI Agent Developer
Goal: Develop and publish Agentic workflows
Highly valuable for businesses to make plug-and-play agents using BroadAI framework.
This will drive higher user adoption through AI applications.
Agents are the backbone of the BroadAI framework, and we've made it simple to create
and deploy them with a standardized approach. Think of it like a factory model, where
expert agents are built once and can be reused across different BroadAI MAS
applications.
Whether you're designing an agent for your unique needs or contributing to our Agent
Store for broader use, you'll enjoy a seamless and consistent experience in both
developing and utilizing agents. Build once, use anywhere—unlock the power of scalable
AI solutions with BroadAI.
Example:
Capability-specific agents, such as Hotel booking agent, Airlines booking agent, Cab
service booking agent etc., can be developed using BroadAI Agentic framework (and
published on Agent Store), which can be quickly integrated by application developers
in their application using BroadAI MAS framework.
To create an AI Agent using BroadAI Agentic Framework:
Get started with installating the
broadai npm
package.
npm install broadai --save
Import only the
agentic package into your application code as it provides
all the tooling to create an Agent.
const Agentic = require('broadai/agentic');
BroadAI Agents are created as NodeJS module. On a high-level there are two important
elements you should be aware of when creating your agent. These are:
1. You must define the register method which must accept the broadAI
instance and an optional agent configuration based on the requirement.
2. You must define the agent through a standardized JSON structure
describing its
capabilities and skills.
/* Create Agent module */
module.exports = {
register: (broadAI, agentConfig) =>{
agentic = new Agentic(broadAI); // create Agentic instance
config = agentConfig; // config
},
agent: {
// read further
}
};
The
agent is a well-defined structure as shown below where the
Researcher agent comprises of two skills, viz.
researchTopic and
findBusinesses, which further contains additional fields as shown in the
exmaple below.
module.exports = {
register: (broadAI, agentConfig) =>{ /* refer previous code snippet */ },
// shows an example of Researcher agent that provides two skills:
// - researchTopic : that searches internet
// - findBusinesses : that searches businesses in specific location
agent: {
"agent-name": "Researcher",
"capability": "Looks up information using external information providers",
"skills": [
{
"skill-name": "researchTopic",
"objective": "Search internet for information about the given topic",
"action": researchTopic, // implemented later as a function
"parameters": {
"topic": "string | topic that must be researched"
}
},
{
"skill-name": "findBusinesses",
"objective": "Search specific business type around a 10 mile radius of a given location",
"action": findBusinesses, // implemented later as a function
"parameters": {
"term": "string | business type, e.g. diner, coffee, tailor, etc.",
"location": "string | address or landmark within a city and state"
}
}
]
}
};
Finally, you must implement the functionality of the skills as functions where the
parameters must match with the agent definition. These
functions can utilize helper functions, such as
createPrompt() to create an
LLM prompt in a structured manner so that developers with basic GenAI training can
write effective prompts,
getGenAIResponse() to call the LLM in a simple step, and
callExternalResource() to just as simply also call external API endpoints,
for example for grounding your LLM prompts with contextual data.
module.exports = {
function researchTopic(topic) {
/* function definition */
};
function findBusinesses(term, location) {
/* function definition */
};
register: (broadAI, agentConfig) =>{ /* refer previous code snippet */ },
agent: { /* refer previous code snippet */ }
}