-
Notifications
You must be signed in to change notification settings - Fork 17
Expand file tree
/
Copy path__init__.py
More file actions
43 lines (37 loc) · 1.26 KB
/
__init__.py
File metadata and controls
43 lines (37 loc) · 1.26 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
"""Tools — the ctx-aware capabilities the agent can invoke.
``build_default_tools`` assembles the V1 tool set. Tools that need only ports
read them from the live :class:`HarnessContext`; tools backed by a service
(remember, ingest_doc) take it by injection here so the wiring stays in one
place (the ContextConcierge calls this).
"""
from __future__ import annotations
from ..core.ports.ingestion import DocExtractorPort, SourcePort
from ..core.ports.tool import ToolPort
from ..ingestion.pipeline import IngestionPipeline
from ..memory.service import MemoryService
from .ask_user import AskUser
from .define_metric import DefineMetric
from .explore_schema import ExploreSchema
from .ingest_doc import IngestDoc
from .remember import Remember
from .run_sql import RunSQL
__all__ = [
"build_default_tools",
"RunSQL", "ExploreSchema", "DefineMetric", "Remember", "AskUser", "IngestDoc",
]
def build_default_tools(
*,
memory: MemoryService,
ingestion: IngestionPipeline,
source: SourcePort,
extractor: DocExtractorPort,
) -> list[ToolPort]:
"""The six V1 tools (v4.1 §4.1)."""
return [
RunSQL(),
ExploreSchema(),
DefineMetric(),
AskUser(),
Remember(memory),
IngestDoc(ingestion, source, extractor),
]