sshuair09 4066b1d310 commit 2 週間 前
..
data 4066b1d310 commit 2 週間 前
fastapi_integration 4066b1d310 commit 2 週間 前
interactive 4066b1d310 commit 2 週間 前
utils 4066b1d310 commit 2 週間 前
README.md 4066b1d310 commit 2 週間 前
__init__.py 4066b1d310 commit 2 週間 前
agency_context.py 4066b1d310 commit 2 週間 前
agency_visualization.py 4066b1d310 commit 2 週間 前
agent_file_storage.py 4066b1d310 commit 2 週間 前
connectors.py 4066b1d310 commit 2 週間 前
custom_persistence.py 4066b1d310 commit 2 週間 前
custom_send_message.py 4066b1d310 commit 2 週間 前
guardrails_input.py 4066b1d310 commit 2 週間 前
guardrails_output.py 4066b1d310 commit 2 週間 前
handoffs.py 4066b1d310 commit 2 週間 前
mcp_servers.py 4066b1d310 commit 2 週間 前
message_attachments.py 4066b1d310 commit 2 週間 前
multi_agent_workflow.py 4066b1d310 commit 2 週間 前
multimodal_outputs.py 4066b1d310 commit 2 週間 前
observability.py 4066b1d310 commit 2 週間 前
streaming.py 4066b1d310 commit 2 週間 前
tools.py 4066b1d310 commit 2 週間 前
utils.py 4066b1d310 commit 2 週間 前
web_search.py 4066b1d310 commit 2 週間 前

README.md

Examples

This directory contains runnable examples demonstrating key features of Agency Swarm v1.x.

Core Functionality

  • multi_agent_workflow.py – Multi-agent collaboration with validation patterns
  • agency_context.py – Sharing data between agents using agency context
  • streaming.py – Real-time streaming responses
  • guardrails.py – Input and output guardrails
  • custom_persistence.py – Chat history persistence between sessions
  • tools.py – Tool patterns: BaseTool and @function_tool with validation

File Handling & Search

  • agent_file_storage.py – Vector store creation and FileSearch tool usage
  • message_attachments.py – File processing and message attachments
  • web_search.py – Domain-filtered WebSearchTool example with source URL extraction

Agent Communication

  • custom_send_message.py – Custom SendMessage configurations and patterns
  • interactive/hybrid_communication_flows.py – Combining SendMessage and handoffs in a software development workflow

User Interfaces

  • agency_visualization.py – Interactive HTML visualization
  • interactive/tui.py – Terminal UI chat interface (sets up the matching terminal app automatically on first run and shows a short setup message)
  • interactive/copilot_demo.py – Copilot UI chat interface

Integration & External Services

  • fastapi_integration/ – FastAPI server and client examples
    • server.py – FastAPI server with streaming support
    • client.py – Client examples for testing endpoints
  • mcp_servers.py – Using tools from MCP servers (local and hosted)
  • connectors.py – Google Calendar integration using OpenAI hosted tools

Model Providers

  • third_party_models.py – Using third-party models (Claude, Gemini, Grok) via LiteLLM

Observability

  • observability.py – OpenAI, Langfuse and AgentOps tracing integration

Run any file with python examples/<name>.py after setting your OPENAI_API_KEY.