Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions packages/vertice-core/src/vertice_core/adk/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
from vertice_core.providers.vertex_ai import VertexAIProvider
from vertice_core.memory.cortex.cortex import MemoryCortex
from vertice_core.messaging.events import SystemEvent, get_event_bus
from vertice_core.adk.tools import ApiRegistry


class VerticeAgent(abc.ABC):
Expand All @@ -32,6 +33,7 @@ def __init__(
# Injected providers
self._provider = VertexAIProvider(project=project, location=location, model_name=model)
self._cortex = MemoryCortex()
self.api_registry = ApiRegistry()

def emit_event(self, event_type: str, payload: Mapping[str, Any]) -> None:
"""
Expand Down
22 changes: 22 additions & 0 deletions packages/vertice-core/src/vertice_core/adk/tools.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,28 @@ def get_schemas(self) -> List[Dict[str, Any]]:
return schemas


class ApiRegistry:
"""
Registry for dynamic API discovery (Blueprint 2026).
Enables agents to discover and connect to external APIs via Vertex AI Extensions.
"""

def __init__(self) -> None:
self._apis: Dict[str, Any] = {}

def register_api(self, name: str, spec: Dict[str, Any]) -> None:
"""Register an external API specification."""
self._apis[name] = spec

def list_apis(self) -> List[str]:
"""List all registered API names."""
return list(self._apis.keys())

def get_api(self, name: str) -> Optional[Dict[str, Any]]:
"""Get API specification by name."""
return self._apis.get(name)


def vertice_tool(func: T) -> T:
"""
Decorator to mark a method as a tool.
Expand Down
5 changes: 5 additions & 0 deletions tests/unit/test_vertice_adk_sdk.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,8 @@ async def test_sdk_agent_compliance(mock_vertex_ai_provider):

# 3. Valida a identidade
assert agent.system_prompt == "You are a security auditor."

# 4. Valida inicialização do ApiRegistry (Blueprint 2026)
from vertice_core.adk.tools import ApiRegistry
assert hasattr(agent, "api_registry")
assert isinstance(agent.api_registry, ApiRegistry)
Loading