OpenAlexAgent
What it is
- A thin wrapper around
IntentAgentthat defines an “OpenAlex” agent persona. - Provides general guidance about OpenAlex (no tools are configured; it does not fetch real OpenAlex data).
Public API
create_agent(agent_shared_state: Optional[AgentSharedState] = None, agent_configuration: Optional[AgentConfiguration] = None) -> IntentAgent- Factory to build and return an
OpenAlexAgentwith:- A predefined system prompt (
SYSTEM_PROMPT) - No tools (
tools = []) - A small set of RAW intents for informational responses
- Optional shared state and configuration (auto-created if not provided)
- A predefined system prompt (
- Factory to build and return an
class OpenAlexAgent(IntentAgent)- Concrete agent class; currently adds no behavior beyond
IntentAgent(inherits everything).
- Concrete agent class; currently adds no behavior beyond
Configuration/Dependencies
- Depends on
naas_abi_core.services.agent.IntentAgentfor:IntentAgent,AgentConfiguration,AgentSharedState,Intent,IntentType
- Uses the chat model imported from:
naas_abi_marketplace.ai.chatgpt.models.gpt_4_1(model.modelpassed aschat_model)
- Key constants:
NAME = "OpenAlex"DESCRIPTION = "Helps you interact with OpenAlex for academic research and publication data."SYSTEM_PROMPTdefines capabilities/constraints (notably: no OpenAlex tools available)
Usage
from naas_abi_marketplace.applications.openalex.agents.OpenAlexAgent import create_agent
agent = create_agent()
# Then use the agent via IntentAgent's interface (methods depend on IntentAgent implementation).
# Example (placeholder): agent.run("What is OpenAlex?")
Caveats
- No OpenAlex tools are configured (
tools = []), so the agent cannot retrieve or search real publication/author data. - The defined intents are informational and explicitly state tool access is unavailable.