-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathagent_graph_runner.py
More file actions
28 lines (21 loc) · 951 Bytes
/
agent_graph_runner.py
File metadata and controls
28 lines (21 loc) · 951 Bytes
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
from typing import Protocol, runtime_checkable
from ldai.providers.types import AgentGraphRunnerResult
@runtime_checkable
class AgentGraphRunner(Protocol):
"""
CAUTION:
This feature is experimental and should NOT be considered ready for production use.
It may change or be removed without notice and is not subject to backwards
compatibility guarantees.
Runtime capability interface for multi-agent graph execution.
An AgentGraphRunner is a focused, configured object returned by
AIProvider.create_agent_graph(). It holds all provider wiring internally —
the caller just passes input.
"""
async def run(self, input: str) -> AgentGraphRunnerResult:
"""
Run the agent graph with the given input.
:param input: The string prompt to send to the agent graph
:return: AgentGraphRunnerResult containing the content, raw response, and AIGraphMetrics
"""
...