Files
KaifAhmad1andClaude Sonnet 4.6 62c7970b32 feat(integrations): add Agno agentic framework integration (#249)
Implements the full Semantica × Agno integration stack as described in
issue #249, wiring Semantica's semantic intelligence layer into Agno's
agent/team primitives via five focused components.

## New components

### integrations/agno/
- `AgnoContextStore`    — graph-backed MemoryDb (AgentMemory/storage)
- `AgnoKnowledgeGraph`  — relational AgentKnowledge with multi-hop GraphRAG
- `AgnoDecisionKit`     — Agno Toolkit: 6 decision-intelligence tools
- `AgnoKGToolkit`       — Agno Toolkit: 7 knowledge-graph tools
- `AgnoSharedContext`   — team-level shared ContextGraph with role scoping

### tests/integrations/agno/
- 110 tests, 0 failures
- conftest.py installs comprehensive agno stubs for offline testing
- Covers MemoryDb protocol, tool registration, shared memory pool,
  thread-safety, GraphRAG search, NER/relation extraction, and inference

### cookbook/integrations/
- agno_decision_intelligence.ipynb     (finance/loan underwriting)
- agno_graphrag_context.ipynb          (regulatory compliance GraphRAG)
- agno_multi_agent_shared_context.ipynb (multi-agent product strategy team)

### docs/integrations/agno.md
- Full reference documentation with examples for all 5 components

## pyproject.toml
- Added `agno = ["agno>=1.0.0"]` optional dependency
- Added agno to the `all` extra

## Design notes
- Zero breaking changes — fully additive
- Graceful degradation when agno is not installed
- Auto-creates VectorStore(backend="faiss") when none provided
- _tools always populated for inspection regardless of agno install state
- Works with both real agno package and offline stubs

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-18 03:25:14 +05:30

51 lines
1.5 KiB
Python
Raw Permalink Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""
Semantica × Agno Integration
=============================
First-class integration between the Semantica semantic intelligence stack and
the `Agno <https://github.com/agno-agi/agno>`_ agentic framework.
Public surface
--------------
AgnoContextStore — Graph-backed ``MemoryDb`` (drop-in for ``AgentMemory(db=…)``)
AgnoKnowledgeGraph — Relational ``AgentKnowledge`` with multi-hop GraphRAG
AgnoDecisionKit — Agno ``Toolkit`` exposing decision-intelligence tools
AgnoKGToolkit — Agno ``Toolkit`` exposing KG construction/query tools
AgnoSharedContext — Team-level shared ``ContextGraph`` with per-agent scoping
Quick start
-----------
pip install semantica[agno]
>>> from integrations.agno import (
... AgnoContextStore,
... AgnoKnowledgeGraph,
... AgnoDecisionKit,
... AgnoKGToolkit,
... AgnoSharedContext,
... )
Compatibility
-------------
Requires ``agno >= 1.0``. All five classes degrade gracefully when ``agno``
is not installed — they are still importable and carry the full Semantica API,
but cannot be passed directly to Agno ``Agent`` / ``Team`` constructors.
"""
from .context_store import AGNO_AVAILABLE, AgnoContextStore
from .decision_kit import AgnoDecisionKit
from .kg_toolkit import AgnoKGToolkit
from .knowledge_graph import AgnoKnowledgeGraph
from .shared_context import AgnoSharedContext
__all__ = [
"AgnoContextStore",
"AgnoKnowledgeGraph",
"AgnoDecisionKit",
"AgnoKGToolkit",
"AgnoSharedContext",
"AGNO_AVAILABLE",
]
__version__ = "0.3.0"