-
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) · 976 Bytes
/
agent_graph_runner.py
File metadata and controls
28 lines (21 loc) · 976 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 Any, 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: Any) -> AgentGraphRunnerResult:
"""
Run the agent graph with the given input.
:param input: The input to the agent graph (string prompt or structured input)
:return: AgentGraphRunnerResult containing the content, raw response, and AIGraphMetrics
"""
...