GrokAgent
What it is
A thin wrapper around naas_abi_core.services.agent.IntentAgent that instantiates a “Grok” intent-based agent with a predefined system prompt, metadata, and a set of intents that route to call_model.
Public API
-
Constants
NAME: Agent display name ("Grok").DESCRIPTION: Human-readable description.AVATAR_URL: URL to an avatar image.SYSTEM_PROMPT: Long-form system prompt that defines behavior/style.SUGGESTIONS: Empty list placeholder.
-
Functions
create_agent(agent_configuration: Optional[AgentConfiguration] = None, agent_shared_state: Optional[AgentSharedState] = None) -> IntentAgent- Builds and returns a configured
GrokAgent. - Loads the chat model from
naas_abi_marketplace.ai.grok.models.grok_4. - Creates a fixed set of
Intententries whoseintent_targetis"call_model".
- Builds and returns a configured
-
Classes
class GrokAgent(IntentAgent)- No additional behavior; inherits all functionality from
IntentAgent.
- No additional behavior; inherits all functionality from
Configuration/Dependencies
-
Dependencies
naas_abi_core.services.agent.IntentAgent:AgentConfiguration,AgentSharedState,Intent,IntentAgent,IntentType
- Chat model import (required at runtime):
from naas_abi_marketplace.ai.grok.models.grok_4 import model
-
Default configuration
- If
agent_configurationis not provided:AgentConfiguration(system_prompt=SYSTEM_PROMPT)
- If
agent_shared_stateis not provided:AgentSharedState(thread_id="0")
- If
-
Tools/Agents/Memory
tools: empty listagents: empty listmemory:None
Usage
from naas_abi_marketplace.ai.grok.agents.GrokAgent import create_agent
agent = create_agent()
# Interact using IntentAgent's interface (methods depend on IntentAgent implementation).
# Example placeholder:
# response = agent.call_model("search news about space missions")
# print(response)
Caveats
- This module does not implement any custom logic in
GrokAgent; all behavior depends onIntentAgentand the importedmodel. - The listed intents route to the target string
"call_model"; actual dispatch behavior depends onIntentAgent’s implementation.