Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Index your code
hub
/
github.com/The-Swarm-Corporation/swarms-rs
/ functions
Functions
756 in github.com/The-Swarm-Corporation/swarms-rs
⨍
Functions
756
◇
Types & classes
155
↓ 203 callers
Method
clone
(&self)
swarms-rs/src/structs/agent.rs:288
↓ 175 callers
Method
build
(self)
swarms-rs/src/structs/agent.rs:129
↓ 88 callers
Method
add_agent
Add an agent to the rearrange configuration
swarms-rs/src/structs/rearrange.rs:93
↓ 80 callers
Method
add
(&self, task: impl Into<String>, metadata: MetadataSchema)
swarms-rs/src/structs/swarm.rs:29
↓ 72 callers
Method
agent_name
(mut self, name: impl Into<String>)
swarms-rs/src/structs/agent.rs:45
↓ 63 callers
Method
user_name
(mut self, name: impl Into<String>)
swarms-rs/src/structs/agent.rs:54
↓ 56 callers
Method
register_agent
Register an agent with the orchestrator
swarms-rs/src/structs/graph_workflow.rs:68
↓ 52 callers
Method
max_loops
(mut self, max_loops: u32)
swarms-rs/src/structs/agent.rs:69
↓ 48 callers
Method
connect_agents
Add a flow connection between two agents
swarms-rs/src/structs/graph_workflow.rs:83
↓ 48 callers
Method
system_prompt
Sets the system prompt that guides the agent's behavior. The system prompt is sent to the LLM before every interaction and defines the agent's role,
swarms-rs/src/agent/swarms_agent.rs:276
↓ 46 callers
Function
create_mock_agent
(id: &str, name: &str, desc: &str, response: &str)
swarms-rs/tests/test_utils.rs:49
↓ 45 callers
Method
temperature
(mut self, temperature: f64)
swarms-rs/src/structs/agent.rs:64
↓ 36 callers
Method
agent_builder
(&self)
swarms-rs/src/llm/provider/openai.rs:88
↓ 30 callers
Method
name
Set the name of the agent rearrange instance
swarms-rs/src/structs/rearrange.rs:81
↓ 26 callers
Method
run
Execute the agent rearrangement task This method processes a task through the configured flow of agents, supporting both sequential and parallel exec
swarms-rs/src/structs/rearrange.rs:438
↓ 24 callers
Method
enable_autosave
(mut self)
swarms-rs/src/structs/agent.rs:86
↓ 23 callers
Method
name
(&self)
swarms-rs/tests/test_sequential_workflow.rs:67
↓ 23 callers
Method
run
(&self, _task: String)
swarms-rs/tests/test_sequential_workflow.rs:32
↓ 22 callers
Method
save_state_dir
(mut self, dir: impl Into<String>)
swarms-rs/src/agent/swarms_agent.rs:580
↓ 21 callers
Method
set_model
(mut self, model: S)
swarms-rs/src/llm/provider/openai.rs:79
↓ 18 callers
Method
config
Sets a custom agent configuration. This replaces the default configuration with a custom one. Use this when you need fine-grained control over agent
swarms-rs/src/agent/swarms_agent.rs:247
↓ 17 callers
Method
description
(mut self, description: impl Into<String>)
swarms-rs/src/structs/agent.rs:59
↓ 17 callers
Method
flow
Set the flow pattern for task execution
swarms-rs/src/structs/rearrange.rs:106
↓ 15 callers
Method
execute_workflow
Execute the entire workflow starting from a specific agent
swarms-rs/src/structs/graph_workflow.rs:225
↓ 14 callers
Method
execute_batch
Executes a batch of tasks across all agents concurrently
swarms-rs/src/structs/execute_agent_batch.rs:115
↓ 14 callers
Method
query
Query a message in the conversation history.
swarms-rs/src/structs/conversation.rs:118
↓ 13 callers
Method
metadata_output_dir
Set the metadata output directory
swarms-rs/src/structs/rearrange.rs:142
↓ 13 callers
Method
name
(&self)
swarms-rs/tests/test_concurrent_workflow.rs:38
↓ 13 callers
Method
verbose
(mut self, verbose: bool)
swarms-rs/src/structs/agent.rs:119
↓ 12 callers
Method
add_stop_word
(mut self, stop_word: impl Into<String>)
swarms-rs/src/structs/agent.rs:106
↓ 11 callers
Method
agents
Set all agents at once
swarms-rs/src/structs/rearrange.rs:99
↓ 10 callers
Method
disable_task_complete_tool
(mut self)
swarms-rs/src/agent/swarms_agent.rs:596
↓ 10 callers
Method
retry_attempts
(mut self, retry_attempts: u32)
swarms-rs/src/structs/agent.rs:91
↓ 10 callers
Method
run
(&self, _task: String)
swarms-rs/tests/test_rearrange.rs:23
↓ 9 callers
Method
add_log
(&mut self, agent_name: String, task: String, response: String)
swarms-rs/src/structs/conversation.rs:251
↓ 9 callers
Method
output_type
Set the output format type
swarms-rs/src/structs/rearrange.rs:124
↓ 8 callers
Method
run
(&self, _task: String)
swarms-rs/tests/test_concurrent_workflow.rs:50
↓ 7 callers
Method
add_tool
Adds a native Rust tool to the agent's toolkit. Tools extend the agent's capabilities by allowing it to perform specific actions or access external d
swarms-rs/src/agent/swarms_agent.rs:355
↓ 7 callers
Method
completion
( &self, request: CompletionRequest, )
swarms-rs/src/llm/provider/openai.rs:96
↓ 7 callers
Function
create_mock_agent
(id: &str, name: &str, description: &str, response: &str)
swarms-rs/benches/concurrent_workflow_benchmarks.rs:15
↓ 7 callers
Function
create_mock_openai
Create a mock OpenAI provider for testing
swarms-rs/benches/agent_initialization_benchmarks.rs:31
↓ 7 callers
Method
max_concurrent_tasks
(mut self, max: usize)
swarms-rs/src/structs/execute_agent_batch.rs:54
↓ 7 callers
Function
save_to_file
Save the data to a file, if the file exists, it will be overwritten
swarms-rs/src/structs/persistence.rs:18
↓ 7 callers
Method
validate
Ensure that all preconditions are met.
swarms-rs/src/structs/swarms_router.rs:67
↓ 6 callers
Method
enable_plan
(mut self, planning_prompt: impl Into<Option<String>>)
swarms-rs/src/structs/agent.rs:79
↓ 6 callers
Method
search
Search for a message in the conversation history.
swarms-rs/src/structs/conversation.rs:123
↓ 5 callers
Method
add_stdio_mcp_server
Adds tools from an MCP server via stdio (standard input/output). This method launches an external process that implements the MCP protocol over stdio
swarms-rs/src/agent/swarms_agent.rs:466
↓ 5 callers
Function
create_simple_config
Create a simple agent configuration for benchmarking
swarms-rs/benches/agent_initialization_benchmarks.rs:15
↓ 5 callers
Method
execute_agent
Execute a specific agent
swarms-rs/src/structs/graph_workflow.rs:206
↓ 5 callers
Function
find_rust_files
(dir: &Path)
swarms-rs/tests/test_coverage_analysis.rs:200
↓ 5 callers
Function
init_logger
Initialize the logging system with environment variable support Reads SWARMS_LOG_LEVEL environment variable and sets up colorful logging
swarms-rs/src/logging.rs:8
↓ 5 callers
Method
max_tokens
(mut self, max_tokens: u64)
swarms-rs/src/structs/agent.rs:74
↓ 5 callers
Function
run_async
(future: F)
swarms-rs/benches/graph_workflow_benchmarks.rs:11
↓ 5 callers
Method
run_internal
Internal execution method with full parameter support
swarms-rs/src/structs/rearrange.rs:443
↓ 5 callers
Method
worker_threads
(mut self, threads: usize)
swarms-rs/src/structs/execute_agent_batch.rs:64
↓ 4 callers
Method
auto_cpu_optimization
(mut self, enable: bool)
swarms-rs/src/structs/execute_agent_batch.rs:59
↓ 4 callers
Method
description
(&self)
swarms-rs/benches/concurrent_workflow_benchmarks.rs:77
↓ 4 callers
Method
description
(&self)
swarms-rs/tests/test_rearrange.rs:60
↓ 4 callers
Method
execute_node
( &self, node_idx: NodeIndex, input: String, results: Arc<DashMap<String, Resu
swarms-rs/src/structs/graph_workflow.rs:262
↓ 4 callers
Function
execute_with_custom_async
Execute a list of callables using a custom async runtime
swarms-rs/examples/multiple_agent/test_concurrent.rs:165
↓ 4 callers
Function
execute_with_direct_threads
Execute a list of callables in parallel using thread::spawn directly
swarms-rs/examples/multiple_agent/test_concurrent.rs:91
↓ 4 callers
Function
execute_with_threads
Execute a list of callables in parallel using std::thread
swarms-rs/examples/multiple_agent/test_concurrent.rs:26
↓ 4 callers
Function
execute_with_tokio
Execute a list of callables using Tokio
swarms-rs/examples/multiple_agent/test_concurrent.rs:180
↓ 4 callers
Function
execute_with_tokio_channel
Execute a list of callables using Tokio with a channel
swarms-rs/examples/multiple_agent/test_concurrent.rs:201
↓ 4 callers
Function
has_valid_api_key
Helper function to check if we have a valid API key for integration tests
swarms-rs/tests/anthropic_tests.rs:151
↓ 4 callers
Function
load_from_file
Load the data from a file
swarms-rs/src/structs/persistence.rs:54
↓ 4 callers
Method
make_request_with_retry
( &self, url: &str, max_retries: u32, )
swarms-rs/examples/multiple_agent/gold_etf_analysis.rs:30
↓ 4 callers
Method
name
(&self)
swarms-rs/benches/concurrent_workflow_benchmarks.rs:73
↓ 4 callers
Method
remove_agent
Remove an agent from the swarm # Arguments `agent_name` - The name of the agent to be removed # Returns The removed agent if it existed, None othe
swarms-rs/src/structs/rearrange.rs:355
↓ 4 callers
Method
run
Execute a task on the selected swarm type with specified compute resources. # Params - task: The task to be executed by the swarm. # Returns: - T
swarms-rs/src/structs/swarms_router.rs:182
↓ 4 callers
Function
run_async
(future: F)
swarms-rs/benches/concurrent_workflow_benchmarks.rs:10
↓ 4 callers
Method
run_batch
Runs the workflow for a batch of tasks, executes agents concurrently for each task.
swarms-rs/src/structs/concurrent_workflow.rs:178
↓ 4 callers
Method
save
(&self)
swarms-rs/tests/autonomous_config.rs:93
↓ 4 callers
Method
save_task_state
(&self, task: String)
swarms-rs/src/agent/swarms_agent.rs:1556
↓ 3 callers
Function
append_to_file
Append the data to a file, if the file doesn't exist, it will be created
swarms-rs/src/structs/persistence.rs:34
↓ 3 callers
Method
build
(mut self)
swarms-rs/src/agent/swarms_agent.rs:487
↓ 3 callers
Method
call
(&self, args: Self::Args)
swarms-rs/tests/test_tool_simple.rs:71
↓ 3 callers
Method
clear
Clear the conversation history.
swarms-rs/src/structs/conversation.rs:131
↓ 3 callers
Method
clone_box
(&self)
swarms-rs/src/agent/swarms_agent.rs:1600
↓ 3 callers
Method
clone_for_task
Create a lightweight clone for task execution
swarms-rs/src/structs/rearrange.rs:717
↓ 3 callers
Method
compute_hash
Add a method to compute a hash for caching
swarms-rs/src/structs/agent.rs:202
↓ 3 callers
Method
description
(&self)
swarms-rs/tests/test_concurrent_workflow.rs:46
↓ 3 callers
Method
description
(&self)
swarms-rs/tests/test_sequential_workflow.rs:71
↓ 3 callers
Method
disconnect_agents
Remove an agent connection
swarms-rs/src/structs/graph_workflow.rs:171
↓ 3 callers
Function
ensure_logger_initialized
()
swarms-rs/tests/test_logger.rs:12
↓ 3 callers
Method
find_execution_paths
Helper method to find all possible execution paths
swarms-rs/src/structs/graph_workflow.rs:463
↓ 3 callers
Method
get_workflow_structure
Get the current workflow as a visualization-friendly format
swarms-rs/src/structs/graph_workflow.rs:399
↓ 3 callers
Method
name
(&self)
swarms-rs/src/agent/swarms_agent.rs:1592
↓ 3 callers
Method
rules
Set rules to be injected into all agents
swarms-rs/src/structs/rearrange.rs:148
↓ 3 callers
Method
run
(&self, _task: String)
swarms-rs/benches/concurrent_workflow_benchmarks.rs:39
↓ 3 callers
Function
scan_for_malicious_patterns
(dir: &Path, report: &mut HashMap<String, Vec<String>>)
swarms-rs/tests/test_security_safety.rs:210
↓ 3 callers
Method
update
Update a message in the conversation history.
swarms-rs/src/structs/conversation.rs:113
↓ 2 callers
Function
analyze_workflow_patterns
(dir: &Path, patterns: &mut HashMap<String, usize>)
swarms-rs/tests/test_integration_scaffolding.rs:209
↓ 2 callers
Method
call
(&self, args: String)
swarms-rs/src/structs/tool.rs:60
↓ 2 callers
Method
chat
Performs a single chat interaction with the agent. This method allows for direct conversation with the agent without the full autonomous task executi
swarms-rs/src/agent/swarms_agent.rs:944
↓ 2 callers
Method
clone_box
(&self)
swarms-rs/tests/test_rearrange.rs:64
↓ 2 callers
Method
count_messages_by_role
Count the number of messages by role
swarms-rs/src/structs/conversation.rs:186
↓ 2 callers
Function
create_failing_agent
(id: &str, name: &str, error_msg: &str)
swarms-rs/tests/test_utils.rs:92
↓ 2 callers
Function
create_tokio_runtime
Create and configure a Tokio runtime
swarms-rs/examples/multiple_agent/test_concurrent.rs:338
↓ 2 callers
Method
definition
(&self)
swarms-rs/src/structs/tool.rs:56
next →
1–100 of 756, ranked by callers