GemmaAgent
What it is
A thin IntentAgent wrapper that configures a local Gemma3 4B chat model (via the marketplace model module) with a predefined system prompt and a set of conversation/intention triggers.
Public API
-
Constants
NAME: Agent display name ("Gemma").DESCRIPTION: Short description of the agent/model.AVATAR_URL: Avatar image URL.SYSTEM_PROMPT: Default system prompt describing behavior/style.SUGGESTIONS: Empty list (no suggestions defined).
-
Functions
create_agent(agent_shared_state: Optional[AgentSharedState] = None, agent_configuration: Optional[AgentConfiguration] = None) -> IntentAgent- Builds and returns a configured
GemmaAgent. - Loads the chat model from
naas_abi_marketplace.ai.gemma.models.gemma3_4b. - Registers a set of
Intententries mapping various phrases tointent_target="call_model". - If not provided:
- Creates
AgentConfiguration(system_prompt=SYSTEM_PROMPT) - Creates
AgentSharedState(thread_id="0")
- Creates
- Builds and returns a configured
-
Classes
GemmaAgent(IntentAgent)- No additional behavior beyond
IntentAgent(empty subclass).
- No additional behavior beyond
Configuration/Dependencies
- Depends on core agent framework types:
IntentAgent,AgentConfiguration,AgentSharedState,Intent,IntentTypefromnaas_abi_core.services.agent.IntentAgent.
- Depends on the Gemma model module:
naas_abi_marketplace.ai.gemma.models.gemma3_4b(used asmodel.modelwhen passed tochat_model).
- Tools/agents/memory:
tools = [],agents = [],memory = None(no extensions configured in this file).
Usage
from naas_abi_marketplace.ai.gemma.agents.GemmaAgent import create_agent
agent = create_agent()
# Use `agent` according to the IntentAgent interface provided by naas_abi_core.
Caveats
- This module only constructs the agent; actual runtime behavior (e.g., how
call_modelis invoked, how intents are matched, and how the model is executed via Ollama) is handled byIntentAgentand the imported model module.