MCPcopy Index your code

hub / github.com/VRSEN/agency-swarm / functions

Functions3,224 in github.com/VRSEN/agency-swarm

↓ 497 callersMethodget
(self, name: str)
src/agency_swarm/tools/mcp_manager.py:210
↓ 484 callersMethodget
(self, name: str)
tests/test_agent_modules/test_mcp_manager.py:333
↓ 121 callersMethodget
(self, run_id: str)
src/agency_swarm/integrations/fastapi_utils/endpoint_handlers.py:586
↓ 85 callersFunctionapply_openai_client_config
Apply custom OpenAI client configuration to all agents in the agency. Creates a new AsyncOpenAI client with the provided base_url and/or api_key,
src/agency_swarm/integrations/fastapi_utils/endpoint_handlers.py:461
↓ 83 callersMethodget_response
Initiates an interaction with a specified agent within the agency. This method resolves the target agent, validates if it's a design
src/agency_swarm/agency/core.py:230
↓ 75 callersFunction_build_openclaw_config
(tmp_path: Path)
tests/integration/fastapi/_openclaw_test_support.py:12
↓ 73 callersMethodjson
(self)
tests/integration/tools/test_openapi_schema_agent.py:24
↓ 56 callersMethodpost
(self, url: str, *, headers: dict[str, str], json: dict[str, Any])
tests/integration/fastapi/test_openclaw_proxy_requests.py:126
↓ 53 callersFunctionhandler
({ themeColor })
src/agency_swarm/ui/demos/copilot/app/copilotkit/page.tsx:18
↓ 51 callersMethodget_all_messages
(self)
tests/integration/ui/test_compact_client_passthrough.py:139
↓ 51 callersFunctionrun_fastapi
Serve this agency via the FastAPI integration. Parameters ---------- host, port, app_token_env : str Standard FastAPI configurati
src/agency_swarm/agency/helpers.py:33
↓ 46 callersMethodensure_layout
(self)
src/agency_swarm/integrations/openclaw.py:334
↓ 46 callersMethodget
Helper method to access user_context fields with a default.
src/agency_swarm/context.py:57
↓ 45 callersMethodset
Helper method to set user_context fields.
src/agency_swarm/context.py:61
↓ 45 callersMethodwrite
(self, text: str)
src/agency_swarm/ui/demos/agentswarm_cli.py:389
↓ 43 callersMethodget_response
Runs the agent's turn in the conversation loop, handling both user and agent-to-agent interactions. This method serves as the primar
src/agency_swarm/agent/core.py:379
↓ 36 callersFunctionbuild_openrouter_chat_model
Build an OpenAI-compatible Chat Completions model for OpenRouter.
src/agency_swarm/utils/openrouter.py:122
↓ 36 callersMethodon_invoke_tool
(self, context, input_json: str)
tests/test_fastapi_utils_modules/test_tool_endpoints.py:40
↓ 34 callersMethodget_all_messages
Get all messages in the store. Returns: list[TResponseInputItem]: All messages in semantic order (insertion order)
src/agency_swarm/utils/thread.py:198
↓ 33 callersFunctionadd_agent_name_to_event
Non-destructively add agent/caller and attach run/call IDs to an event. - Does NOT overwrite existing `agent`/`callerAgent` (preserves SDK attrib
src/agency_swarm/streaming/utils.py:18
↓ 33 callersFunctionattach_openclaw_to_fastapi
Attach OpenClaw proxy routes and runtime lifecycle to a FastAPI app.
src/agency_swarm/integrations/openclaw.py:1227
↓ 32 callersFunction_build_message
( *, role: str | None, message_origin: str | None = None, parent_run_id: str | None = None,
tests/test_agent_modules/test_execution_streaming.py:4
↓ 32 callersMethodget_agent_runtime_state
Return the runtime state container for the specified agent.
src/agency_swarm/agency/core.py:224
↓ 29 callersFunction_field
(value: Any, key: str)
src/agency_swarm/utils/openrouter_reasoning.py:452
↓ 29 callersMethodrun
(self)
src/agency_swarm/tools/built_in/IPythonInterpreter.py:373
↓ 28 callersMethodget_response
( self, message, sender_name=None, context_override: dict[str, str] | None = N
tests/integration/fastapi/test_fastapi_user_context.py:51
↓ 28 callersMethodopenai_to_agui_events
Convert a single OpenAI Agents SDK *StreamEvent* into one or more AG-UI events.
src/agency_swarm/ui/core/agui_adapter.py:63
↓ 28 callersMethodrun
(self)
tests/test_agent_modules/test_base_tool.py:14
↓ 25 callersFunctioncreate_agent_template
Create an agent template with the specified structure. Returns ------- bool ``True`` when the template is created successfully, `
src/agency_swarm/utils/create_agent_template.py:9
↓ 23 callersFunctionload_cached_starter
( agent_name: str, starter: str, *, expected_fingerprint: str | None = None, )
src/agency_swarm/agent/conversation_starters_cache.py:291
↓ 22 callersFunction_serialize_value
(value: Any)
src/agency_swarm/agent/conversation_starters_cache.py:563
↓ 22 callersFunction_sleep_between_events
()
src/agency_swarm/agent/conversation_starters_streaming.py:643
↓ 22 callersMethodadd_message
Add a single message and trigger save. Args: message: The message to add
src/agency_swarm/utils/thread.py:151
↓ 22 callersMethodcreate_task
(self, coro: Any)
tests/test_agent_modules/test_mcp_manager.py:247
↓ 22 callersFunctionget_openrouter_model_name
Return the original ``openrouter/...`` model alias from a wrapped model.
src/agency_swarm/utils/openrouter.py:58
↓ 21 callersMethodget_conversation_history
(self, agent: str, caller_agent: str | None = None)
tests/test_agent_modules/test_execution_stream_persistence_fake_id.py:31
↓ 20 callersFunctioncompute_starter_cache_fingerprint
( agent: Agent, runtime_state: AgentRuntimeState | None = None, shared_instructions: str | None =
src/agency_swarm/agent/conversation_starters_cache.py:74
↓ 19 callersFunctionbuild_openclaw_responses_model
Build an OpenAIResponsesModel that targets the mounted OpenClaw proxy.
src/agency_swarm/integrations/openclaw.py:1314
↓ 19 callersFunctionget_usage_tracking_model_name
Extract the model name that should be used for usage pricing. Some proxy-backed models expose a stable public alias (for example ``openclaw:m
src/agency_swarm/utils/model_utils.py:40
↓ 19 callersFunctionmake_response_endpoint
( request_model, agency_factory: Callable[..., Agency], verify_token, allowed_local_dirs: Sequ
src/agency_swarm/integrations/fastapi_utils/endpoint_handlers.py:844
↓ 19 callersMethodopenai_to_message_output
(self, event: Any, recipient_agent: str)
src/agency_swarm/ui/core/console_event_adapter.py:78
↓ 19 callersMethodstart
Start watching for ESC key in background thread. Gracefully degrades in test environments where stdin is mocked.
src/agency_swarm/ui/demos/terminal.py:120
↓ 18 callersFunction_model_call_roles
(agent: Agent, run_config: RunConfig | None)
tests/test_fastapi_utils_modules/_codex_input_role_boundary_helpers.py:137
↓ 18 callersMethodrun
(self)
examples/tools.py:52
↓ 18 callersFunctionrun_mcp
Launch a FastMCP server exposing BaseTool and FunctionTool instances. Args: tools: List of BaseTool/FunctionTool classes or path to d
src/agency_swarm/integrations/mcp_server.py:68
↓ 17 callersMethodget_agent_context
Return the agency context for an agent, optionally with a run-scoped thread manager.
src/agency_swarm/agency/core.py:207
↓ 17 callersMethodget_all_messages
(self)
tests/test_agent_modules/test_execution_stream_persistence_fake_id.py:28
↓ 17 callersMethodget_response_stream
Initiates a streaming interaction with a specified agent within the agency. Returns a :class:`StreamingRunResponse` wrapper that mir
src/agency_swarm/agency/core.py:312
↓ 17 callersFunctionraw_event
(data_type: str, **kwargs)
tests/test_agent_modules/test_console_event_adapter.py:7
↓ 17 callersMethodrun
Returns a dict containing file metadata and any errors encountered.
src/agency_swarm/tools/built_in/PresentFiles.py:130
↓ 16 callersFunction_agency
(agent: object)
tests/test_fastapi_utils_modules/test_openai_hosted_tool_compat.py:7
↓ 16 callersMethodget_response_stream
( self, message, sender_name=None, context_override: dict[str, str | Streaming
tests/integration/fastapi/test_fastapi_user_context.py:94
↓ 16 callersMethodis_lock_active
Check if the one-call lock is currently active. Returns: Tuple of (is_active, owner_name)
src/agency_swarm/tools/concurrency.py:30
↓ 16 callersMethodprepare_history_for_runner
Prepare conversation history for the runner.
src/agency_swarm/messages/message_formatter.py:257
↓ 16 callersMethodreset
(self)
tests/integration/fastapi/test_fastapi_user_context.py:33
↓ 15 callersFunction_normalize_event
(normalizer: StreamIdNormalizer, event: Any)
src/agency_swarm/agent/conversation_starters_streaming.py:648
↓ 15 callersFunction_reasoning_details
()
tests/test_agent_modules/test_openrouter_reasoning.py:999
↓ 15 callersMethodadd_messages
(self, messages: list[dict])
tests/test_agent_modules/test_execution_stream_persistence_fake_id.py:41
↓ 15 callersMethodget_active_count
Get the current number of active tool executions.
src/agency_swarm/tools/concurrency.py:52
↓ 15 callersMethodrun
Execute the shell command and return output.
src/agency_swarm/tools/built_in/PersistentShellTool.py:22
↓ 15 callersMethodrun
(self)
tests/integration/mcp/test_mcp_server.py:387
↓ 15 callersFunctionupload_from_urls
Upload files from URLs or local absolute paths to OpenAI. Args: file_map: {"filename": "url_or_absolute_path"} allowed_local
src/agency_swarm/integrations/fastapi_utils/file_handler.py:25
↓ 15 callersMethodwait_for
(self, predicate)
tests/test_fastapi_utils_modules/test_openai_client_config_request_state.py:394
↓ 14 callersMethod_resolve_final_result
(self, result: RunResultStreaming | None)
src/agency_swarm/agent/execution_stream_response.py:175
↓ 14 callersFunction_roles
(messages: list[dict[str, Any]])
tests/test_fastapi_utils_modules/_codex_input_role_boundary_helpers.py:115
↓ 14 callersMethodget_response
( self, system_instructions: str | None, input: str | list[TResponseInputItem],
tests/integration/agent/test_additional_instructions.py:20
↓ 14 callersMethodget_response_sync
Synchronous wrapper around :meth:`get_response`.
src/agency_swarm/agency/core.py:284
↓ 14 callersFunctionmake_raw_event
(data)
tests/test_agent_modules/test_agui_adapter.py:43
↓ 14 callersFunctionstart_terminal
Run the terminal demo: input loop, slash commands, and streaming output. Args: agency_instance: The Agency instance to run. show_
src/agency_swarm/ui/demos/terminal.py:339
↓ 13 callersFunction_application_factory
Return a PromptToolkit Application stub that replays provider inputs.
tests/integration/ui/test_terminal_demo.py:42
↓ 13 callersFunction_make_stub_agent
(name: str, response: str = "ack")
tests/test_agent_modules/send_message/test_extra_params.py:14
↓ 13 callersMethodclear
Remove all messages from the store.
src/agency_swarm/utils/thread.py:102
↓ 13 callersFunctionmake_stream_endpoint
( request_model, agency_factory: Callable[..., Agency], verify_token, run_registry: ActiveRunR
src/agency_swarm/integrations/fastapi_utils/endpoint_handlers.py:940
↓ 13 callersMethodretrieve
(self, file_id: str)
tests/test_agent_modules/test_file_sync.py:25
↓ 12 callersFunction_build_message_response
(text: str, model_name: str)
tests/deterministic_model.py:133
↓ 12 callersFunction_is_litellm_model
Check if a model name is a LiteLLM model (uses litellm/ prefix).
src/agency_swarm/integrations/fastapi_utils/endpoint_handlers.py:2065
↓ 12 callersMethodclear
(self)
tests/integration/ui/test_compact_client_passthrough.py:145
↓ 12 callersMethodensure_connected
(self, server: Any)
src/agency_swarm/tools/mcp_manager.py:103
↓ 12 callersFunctionextract_final_output_text
(items: list[TResponseInputItem])
src/agency_swarm/agent/conversation_starters_cache.py:425
↓ 12 callersFunctionmake_tool_endpoint
(tool, verify_token, context=None)
src/agency_swarm/integrations/fastapi_utils/tool_endpoints.py:16
↓ 12 callersFunctionnormalize_starter_text
(text: str)
src/agency_swarm/agent/conversation_starters_cache.py:53
↓ 12 callersFunctionsanitize_store_false_responses_input
Drop reasoning items that cannot be replayed without server-side state.
src/agency_swarm/messages/response_input_sanitizer.py:24
↓ 12 callersMethodshutdown
Cleanup all persistent servers and clear the registry.
src/agency_swarm/tools/mcp_manager.py:148
↓ 11 callersFunction_agent
(name: str)
tests/test_agent_modules/test_agent_flow.py:11
↓ 11 callersFunction_build_minimal_context
(agent: Agent, shared_instructions: str | None)
tests/test_agent_modules/test_conversation_starters_cache.py:117
↓ 11 callersMethodcreate_handoff
(self, recipient_agent: Agent)
tests/test_agency_modules/test_agent_flow_integration.py:38
↓ 11 callersMethodget_http_client
Create an HTTP client with proper timeout configuration.
tests/integration/fastapi/test_fastapi_file_processing.py:63
↓ 11 callersMethodget_id_from_file
Get file id from file name
src/agency_swarm/agent/file_manager.py:199
↓ 11 callersMethodget_response_stream
Runs the agent's turn in streaming mode. Args: message: The input message or list of message items sender_name: Name
src/agency_swarm/agent/core.py:429
↓ 11 callersMethodset_chats_dir
Set directory where chats are stored as JSON files.
src/agency_swarm/ui/demos/launcher.py:50
↓ 11 callersMethodupload_file
Upload a local file and optionally associate it with the agent's vector store; returns file_id.
src/agency_swarm/agent/file_manager.py:56
↓ 10 callersFunction_chunk
(chunk_id: str, delta: ChoiceDelta)
tests/test_agent_modules/test_openrouter_reasoning.py:1116
↓ 10 callersFunction_clear_openclaw_env
(monkeypatch: pytest.MonkeyPatch)
tests/integration/fastapi/test_openclaw_current_app_defaults.py:26
↓ 10 callersFunctionbuild_request_model
( parameters: dict[str, Any], tool_name: str, *, strict: bool = False, )
src/agency_swarm/integrations/fastapi_utils/tool_request_models.py:10
↓ 10 callersMethodcancel
Signal cancellation to the underlying stream. After calling cancel(), continue consuming the stream to allow the cancellation to comp
src/agency_swarm/agent/execution_stream_response.py:69
↓ 10 callersMethoddelete
(self, *, file_id: str)
tests/test_agent_modules/test_file_sync.py:21
↓ 10 callersMethodextract_hosted_tool_results
Extract hosted tool results (FileSearch, WebSearch) from assistant message content and create special assistant messages to capture s
src/agency_swarm/messages/message_formatter.py:491
↓ 10 callersFunctionextract_usage_from_run_result
Extract usage information from a RunResult or RunResultStreaming object. Aggregates usage from: 1. Main agent via context_wrapper.usage 2
src/agency_swarm/utils/usage_tracking.py:289
↓ 10 callersFunctionget_model_pricing
Get pricing information for a specific model. Handles model name variations and provider prefixes: - Exact match first (e.g., "azure/gpt-4o",
src/agency_swarm/utils/usage_tracking.py:144
↓ 10 callersFunctionprune_guardrail_messages
Remove descendant message branches recorded after an input guardrail trip. Algorithm (evidence of multi-level flows): 1. Identify every
src/agency_swarm/agent/execution_streaming.py:63
next →1–100 of 3,224, ranked by callers