sshuair09 4066b1d310 commit před 2 týdny
..
data 4066b1d310 commit před 2 týdny
fastapi_integration 4066b1d310 commit před 2 týdny
interactive 4066b1d310 commit před 2 týdny
utils 4066b1d310 commit před 2 týdny
README.md 4066b1d310 commit před 2 týdny
__init__.py 4066b1d310 commit před 2 týdny
agency_context.py 4066b1d310 commit před 2 týdny
agency_visualization.py 4066b1d310 commit před 2 týdny
agent_file_storage.py 4066b1d310 commit před 2 týdny
connectors.py 4066b1d310 commit před 2 týdny
custom_persistence.py 4066b1d310 commit před 2 týdny
custom_send_message.py 4066b1d310 commit před 2 týdny
guardrails_input.py 4066b1d310 commit před 2 týdny
guardrails_output.py 4066b1d310 commit před 2 týdny
handoffs.py 4066b1d310 commit před 2 týdny
mcp_servers.py 4066b1d310 commit před 2 týdny
message_attachments.py 4066b1d310 commit před 2 týdny
multi_agent_workflow.py 4066b1d310 commit před 2 týdny
multimodal_outputs.py 4066b1d310 commit před 2 týdny
observability.py 4066b1d310 commit před 2 týdny
streaming.py 4066b1d310 commit před 2 týdny
tools.py 4066b1d310 commit před 2 týdny
utils.py 4066b1d310 commit před 2 týdny
web_search.py 4066b1d310 commit před 2 týdny

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.