Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
ABI-Core 1.11.5 documentation
ABI-Core 1.11.5 documentation

1. Fundamentals

  • Installation
  • What is ABI-Core?
  • Basic Concepts
  • Your First Project

2. Single Agents

  • Your First Agent
  • Simple Chatbot
  • Agents with Tools
  • Agents with Memory
  • Testing Agents

3. Multi-Agent Basics

  • Why Multiple Agents?
  • Agent Cards
  • Agent Communication (A2A)
  • Your First Multi-Agent System

4. Semantic Layer

  • What is the Semantic Layer?
  • Agent Discovery
  • Semantic Search
  • Extending the Semantic Layer
  • MCPToolkit

5. Advanced Orchestration

  • Planner & Orchestrator
  • Multi-Agent Workflows
  • Dependency Management
  • Result Synthesis

6. RAG & Knowledge

  • What is RAG?
  • Vector Databases
  • Embeddings & Search
  • Agents with RAG

7. Security & Policies

  • Guardian Service
  • OPA Policies
  • Policy Development
  • User Validation
  • Audit & Compliance
  • A2A Validation

8. Production

  • Model Serving
  • Monitoring & Logs
  • Troubleshooting
  • Deployment
  • Artifact Store (MinIO)

9. Reference

  • CLI Reference
  • API Reference
  • Environment Variables
  • Architecture

Additional Resources

  • Migrating to a2a-sdk 1.0
  • Changelog
  • Changelog
  • FAQ
  • Roadmap
Back to top
View this page

Semantic Search¶

The Semantic Layer doesn’t match keywords — it matches meaning.

How it’s different¶

Keyword search:

Query: "analyze sales"
Only finds agents with the exact words "analyze" AND "sales"

Semantic search:

Query: "examine revenue trends"
Finds the "sales analysis" agent because the meaning is similar

Under the hood¶

  1. Your query → embedding vector (via nomic-embed-text)

  2. Agent cards → embedding vectors (generated at startup)

  3. Cosine similarity → ranked results

The embedding model understands that “examine” ≈ “analyze” and “revenue” ≈ “sales”.

Tool cards too¶

The Semantic Layer also indexes tool cards. Search for tools by capability:

from abi_core.common.semantic_tools import tool_search_tools

tools = await tool_search_tools.ainvoke("search documents by content")
# Returns matching tool cards with name, description, and access_scope

What makes a good agent card for discovery¶

The more descriptive your card, the better the search works:

{
  "description": "Analyzes financial data including revenue, expenses, and profit margins",
  "supportedTasks": ["analyze_revenue", "calculate_margins", "forecast_trends"],
  "skills": [
    {
      "description": "Analyzes quarterly revenue data and identifies growth patterns",
      "tags": ["finance", "revenue", "analysis", "trends", "quarterly"]
    }
  ]
}

Tips:

  • Use natural language in description (not just keywords)

  • Be specific in supportedTasks

  • Add relevant tags to skills

  • Include synonyms in descriptions (“revenue/sales”, “analyze/examine”)

Next step¶

👉 Extending the Semantic Layer

Next
Extending the Semantic Layer
Previous
Agent Discovery
Copyright © 2025, José Luis Martínez
Made with Sphinx and @pradyunsg's Furo
On this page
  • Semantic Search
    • How it’s different
    • Under the hood
    • Tool cards too
    • What makes a good agent card for discovery
    • Next step