LinkedInAgent
What it is
A factory + thin agent class that assembles an IntentAgent configured to access LinkedIn data (via a LinkedIn integration), augment it with Google Search workflows, and expose a set of predefined intents for common LinkedIn-related requests.
Public API
-
create_agent(agent_shared_state: Optional[AgentSharedState] = None, agent_configuration: Optional[AgentConfiguration] = None) -> IntentAgent- Builds and returns a configured
LinkedInAgentinstance:- Loads LinkedIn + Google Search + Naas configuration from their respective
ABIModulesingletons. - Creates tool sets from:
- LinkedIn integration tools (
as_tools(...)) - Google Search workflows (profile/org page search)
- SPARQL templated query tools (a fixed set of LinkedIn-related query tools)
- LinkedIn integration tools (
- Registers a list of
Intentmappings to route common user requests to specific tools. - Renders the
SYSTEM_PROMPTby injecting tool descriptions and the user LinkedIn profile URL. - Applies default
AgentConfiguration(system_prompt=...)andAgentSharedState(thread_id="0")when not provided.
- Loads LinkedIn + Google Search + Naas configuration from their respective
- Builds and returns a configured
-
class LinkedInAgent(IntentAgent)- No additional behavior; inherits everything from
IntentAgent.
- No additional behavior; inherits everything from
Configuration/Dependencies
This agent relies on several modules being configured and available via get_instance():
-
naas_abi_marketplace.applications.linkedin.ABIModuleconfiguration.li_atconfiguration.JSESSIONIDconfiguration.linkedin_profile_url
-
naas_abi_marketplace.applications.google_search.ABIModuleconfiguration.google_custom_search_api_keyconfiguration.google_custom_search_engine_id
-
naas_abi_marketplace.applications.naas.ABIModuleconfiguration.naas_api_key
Tools/workflows/integrations used:
naas_abi_marketplace.applications.linkedin.integrations.LinkedInIntegrationLinkedInIntegrationConfiguration,as_tools(...)
naas_abi_marketplace.applications.google_search.integrations.GoogleProgrammableSearchEngineIntegrationGoogleProgrammableSearchEngineIntegrationConfiguration
naas_abi_marketplace.applications.google_search.workflows.*SearchLinkedInProfilePageWorkflowSearchLinkedInOrganizationPageWorkflow
naas_abi_core.modules.templatablesparqlquery.ABIModule- Adds tools for:
linkedin_search_connections_by_person_namelinkedin_count_connections_by_personlinkedin_get_connection_informationlinkedin_search_email_address_by_person_uri
- Adds tools for:
Model dependency:
naas_abi_marketplace.ai.chatgpt.models.gpt_4_1_mini.model
Usage
from naas_abi_marketplace.applications.linkedin.agents.LinkedInAgent import create_agent
agent = create_agent()
# The returned object is an IntentAgent configured with tools/intents/system prompt.
# How you run/chat with the agent depends on the IntentAgent interface in naas_abi_core.
print(agent.name) # "LinkedIn"
Caveats
- Requires valid configuration values to be present in the referenced
ABIModuleinstances (LinkedIn auth cookies, Google Search API credentials, Naas API key). - The
LinkedInAgentclass itself adds no behavior; all behavior comes fromIntentAgent, configured tools, and intents. - The system prompt enforces working only with valid LinkedIn URLs and instructs to defer unsupported requests to
[email protected].