Skip to content
Open
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
26 changes: 26 additions & 0 deletions examples/examples/multi_agent_pipeline.py
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import os
import sys

SCRIPT_DIR = os.path.dirname(os.path.abspath(__file__))
if SCRIPT_DIR not in sys.path:
sys.path.insert(0, SCRIPT_DIR)
from json_agent import create_agent as create_json_agent
from summarizer_agent import create_agent as create_summarizer_agent

yaml_path = os.path.join(os.path.dirname(__file__), "test.yaml")
if not os.path.exists(yaml_path):
raise FileNotFoundError("test.yaml not found!")

with open(yaml_path, "r", encoding="utf-8") as f:
yaml_content = f.read()

json_agent = create_json_agent()
summarizer_agent = create_summarizer_agent()

json_output, _ = json_agent.send_message(yaml_content)
print("\n--- JSON Output ---\n")
print(json_output)

summary, _ = summarizer_agent.send_message(json_output)
print("\n--- Summary ---\n")
print(summary)
Loading