Tool services - dynamically pluggable tool implementations for agent frameworks (#658)

* New schema

* Tool service implementation

* Base class

* Joke service, for testing

* Update unit tests for tool services
This commit is contained in:
cybermaggedon 2026-03-04 14:51:32 +00:00 committed by GitHub
parent 0b83c08ae4
commit a38ca9474f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
13 changed files with 1396 additions and 45 deletions

View file

@ -12,4 +12,5 @@ from .structured_query import *
from .rows_query import *
from .diagnosis import *
from .collection import *
from .storage import *
from .storage import *
from .tool_service import *

View file

@ -0,0 +1,25 @@
from dataclasses import dataclass
from ..core.primitives import Error
@dataclass
class ToolServiceRequest:
"""Request to a dynamically configured tool service."""
# User context for multi-tenancy
user: str = ""
# Config values (collection, etc.) as JSON
config: str = ""
# Arguments from LLM as JSON
arguments: str = ""
@dataclass
class ToolServiceResponse:
"""Response from a tool service."""
error: Error | None = None
# Response text (the observation)
response: str = ""
# End of stream marker for streaming responses
end_of_stream: bool = False