Multi-agent orchestrator and knowledge graph management system for AI orchestration, providing comprehensive coordination of specialized AI agents and semantic data management capabilities
pip install naas-abi==2.93.1 Copy PIP instructions
naas-abi is the central coordination hub for the ABI (Agentic Brain Infrastructure) ecosystem. It provides:
pip install naas-abi Core Components ABIModule The ABIModule is the main module that orchestrates the entire ABI system. It automatically loads marketplace modules (AI agents, applications, domain experts) and provides the core infrastructure.
modules: - module: naas_abi enabled: true config: datastore_path: "abi" workspace_id: "{{ secret.WORKSPACE_ID }}" storage_name: "{{ secret.STORAGE_NAME }}" Dependencies:
The module automatically loads marketplace modules as soft dependencies (optional):
The main multi-agent orchestrator that coordinates specialized agents.
from naas_abi.agents.AbiAgent import create_agent agent = create_agent() response = agent.invoke("Route this to the best AI for code generation") Routing Priorities:
Extracts entities from natural language and generates SPARQL queries.
from naas_abi.agents.EntitytoSPARQLAgent import create_agent agent = create_agent() response = agent.invoke( "Extract entities from: 'John works at Microsoft as a software engineer'" ) KnowledgeGraphBuilderAgent Provides complete CRUD operations for the knowledge graph.
from naas_abi.agents.KnowledgeGraphBuilderAgent import create_agent agent = create_agent() response = agent.invoke( "Add a new organization called 'NaasAI' to the knowledge graph" ) OntologyEngineerAgent Specialized agent for BFO ontology engineering and management.
from naas_abi.agents.OntologyEngineerAgent import create_agent agent = create_agent() response = agent.invoke( "Create a new ontology class for 'SoftwareProject' with properties" ) Workflows AgentRecommendationWorkflow Recommends the best AI agent for a given intent using SPARQL queries.
from naas_abi.workflows.AgentRecommendationWorkflow import ( AgentRecommendationWorkflow, AgentRecommendationConfiguration, AgentRecommendationParameters ) workflow = AgentRecommendationWorkflow( AgentRecommendationConfiguration(queries_file_path="path/to/queries.ttl") ) result = workflow.run(AgentRecommendationParameters( intent_description="I need help with code generation", provider_preference="openai" )) ArtificialAnalysisWorkflow Fetches and stores AI model data from the Artificial Analysis API.
from naas_abi.workflows.ArtificialAnalysisWorkflow import ( ArtificialAnalysisWorkflow, ArtificialAnalysisWorkflowConfiguration, ArtificialAnalysisWorkflowParameters ) workflow = ArtificialAnalysisWorkflow( ArtificialAnalysisWorkflowConfiguration( api_key="your_api_key", base_url="https://artificialanalysis.ai/api/v2" ) ) result = workflow.run(ArtificialAnalysisWorkflowParameters( endpoint="models", validate_agents_only=True )) SearchIndividualWorkflow Searches for individuals (entities) in the knowledge graph.
Retrieves the graph structure for a specific subject (entity).
Retrieves object properties for a given ontology class.
Adds new individuals (entities) to the knowledge graph.
Generates AI agent ontologies from Artificial Analysis data.
Inserts data into the knowledge graph using SPARQL INSERT queries.
Merges duplicate individuals in the knowledge graph.
Removes individuals from the knowledge graph.
Specialized pipelines for updating specific entity types:
The module includes a comprehensive ontology structure organized in a 4-level hierarchy:
The module supports multiple AI model configurations:
# Set environment variable AI_MODE=cloud # or "airgap" or "local" CLI Tools The module provides CLI commands for creating new components:
# Create a new module python -m naas_abi.cli create-module # Create a new agent python -m naas_abi.cli create-agent # Create a new integration python -m naas_abi.cli create-integration # Create a new workflow python -m naas_abi.cli create-workflow # Create a new pipeline python -m naas_abi.cli create-pipeline # Create a new ontology python -m naas_abi.cli create-ontology Each command provides an interactive wizard to guide you through the creation process.
from naas_abi_core.engine.Engine import Engine # Initialize engine engine = Engine() engine.load(module_names=["naas_abi"]) # Get AbiAgent from naas_abi.agents.AbiAgent import create_agent agent = create_agent() # Interact with agent response = agent.invoke("What agents are available?") print(response) Knowledge Graph Operations from naas_abi.agents.KnowledgeGraphBuilderAgent import create_agent kg_agent = create_agent() # Add an organization kg_agent.invoke("Add organization 'NaasAI' with website 'https://naas.ai'") # Search for entities from naas_abi.workflows.SearchIndividualWorkflow import ( SearchIndividualWorkflow, SearchIndividualWorkflowConfiguration, SearchIndividualWorkflowParameters ) workflow = SearchIndividualWorkflow( SearchIndividualWorkflowConfiguration( triple_store=engine.services.triple_store ) ) results = workflow.run(SearchIndividualWorkflowParameters( search_term="NaasAI" )) Workflow Execution from naas_abi.workflows.AgentRecommendationWorkflow import ( AgentRecommendationWorkflow, AgentRecommendationConfiguration, AgentRecommendationParameters ) workflow = AgentRecommendationWorkflow( AgentRecommendationConfiguration( queries_file_path="path/to/queries.ttl" ) ) recommendations = workflow.run(AgentRecommendationParameters( intent_description="I need help with data analysis", provider_preference="anthropic" )) Pipeline Execution from naas_abi.pipelines.AddIndividualPipeline import ( AddIndividualPipeline, AddIndividualPipelineConfiguration, AddIndividualPipelineParameters ) pipeline = AddIndividualPipeline( AddIndividualPipelineConfiguration( triple_store=engine.services.triple_store, search_individual_configuration=SearchIndividualWorkflowConfiguration( triple_store=engine.services.triple_store ) ) ) graph = pipeline.run(AddIndividualPipelineParameters( individual_label="New Company", individual_type="CommercialOrganization" )) Configuration Environment Variables Variable Values Default Description AI_MODE cloud | airgap | local cloud Model deployment mode OPENAI_API_KEY API key Required (cloud) For cloud models NAAS_API_KEY API key Optional For production triggers ENV dev | prod dev Environment mode Module Configuration modules: - module: naas_abi enabled: true config: datastore_path: "abi" workspace_id: "{{ secret.WORKSPACE_ID }}" storage_name: "{{ secret.STORAGE_NAME }}" Key Features 🔄 Context-Aware Orchestration Preserves active conversations while enabling intelligent agent transitions.
Native French/English code-switching with cultural awareness.
Sophisticated hierarchy for optimal agent selection based on request type.
Direct access to SPARQL querying and semantic data exploration.
Choice between cloud (OpenAI) and airgap (Docker Model Runner) models.
Direct consultation capabilities for business and technical guidance.
Event-driven triggers, comprehensive testing, and error resilience.
naas_abi/ ├── agents/ # Agent implementations │ ├── AbiAgent.py │ ├── EntitytoSPARQLAgent.py │ ├── KnowledgeGraphBuilderAgent.py │ └── OntologyEngineerAgent.py ├── workflows/ # Business logic workflows │ ├── AgentRecommendationWorkflow.py │ ├── ArtificialAnalysisWorkflow.py │ ├── SearchIndividualWorkflow.py │ ├── GetSubjectGraphWorkflow.py │ └── GetObjectPropertiesFromClassWorkflow.py ├── pipelines/ # Data processing pipelines │ ├── AddIndividualPipeline.py │ ├── AIAgentOntologyGenerationPipeline.py │ ├── InsertDataSPARQLPipeline.py │ ├── MergeIndividualsPipeline.py │ └── Update*Pipeline.py ├── ontologies/ # Ontology definitions ├── models/ # Model configurations ├── cli.py # CLI commands └── __init__.py # Module initialization Testing # Run all tests pytest naas_abi/ -v # Test specific agent pytest naas_abi/agents/AbiAgent_test.py -v # Test workflows pytest naas_abi/workflows/ -v # Test pipelines pytest naas_abi/pipelines/ -v See Also ABI Main README - Complete ABI framework documentation naas-abi-core - Core engine documentation naas-abi-cli - CLI tool documentation naas-abi-marketplace - Marketplace modules License MIT License
All 2 files in this release have provenance metadata.
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Oct 27, 2026.
All 2 files in this release have been uploaded with provenance metadata.
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.




