Back to Home

Getting Started with AgentsMCP

Quick start guide to get you up and running with ANNEM in minutes

1 Installation

Install AgentsMCP directly from GitHub using devtools:

# Install devtools if you don't have it
if (!require(devtools)) install.packages("devtools")

# Install AgentsMCP from GitHub
devtools::install_github("avishekb9/AgentsMCP")

# Load the package
library(AgentsMCP)
2 Basic Usage

Run your first ANNEM analysis with default parameters:

# Basic ANNEM analysis with default settings
results <- run_annem_analysis(
  symbols = c("AAPL", "MSFT", "GOOGL"),
  n_agents = 100,    # Number of agents
  n_steps = 50,      # Simulation steps
  verbose = TRUE     # Show progress
)

# View summary of results
annem_summary(results)
3 Understanding Results

The analysis returns a comprehensive list with multiple components:

# Access different parts of the results
names(results)
# [1] "market"                "simulation_results"    
# [3] "agent_performance"     "network_metrics"       
# [5] "benchmark_comparison"  "validation_results"    

# View agent performance by type
head(results$agent_performance)

# Check benchmark comparison
results$benchmark_comparison

# Network evolution metrics
head(results$network_metrics)
4 Visualization

Generate comprehensive visualizations of your results:

# Generate all visualizations
plots <- generate_annem_report(results, save_plots = TRUE)

# Create specific plots
agent_plots <- plot_agent_performance(results$agent_performance)
network_plots <- plot_network_evolution(results$network_metrics)
wealth_plots <- plot_wealth_dynamics(results$simulation_results)

# Display plots
print(agent_plots$performance_dist)
print(network_plots$evolution)
5 Advanced Configuration

Customize your analysis with advanced parameters:

# Advanced ANNEM analysis with custom settings
advanced_results <- run_annem_analysis(
  symbols = c("AAPL", "MSFT", "GOOGL", "TSLA", "NVDA"),
  n_agents = 1000,
  n_steps = 250,
  agent_distribution = list(
    neural_momentum = 0.25,
    contrarian_ai = 0.20,
    fundamentalist_ml = 0.20,
    adaptive_noise = 0.10,
    social_network = 0.15,
    meta_learning = 0.10
  ),
  save_results = TRUE,
  output_dir = "my_annem_results"
)

Working with Individual Components

Creating Agents

# Create individual agents
agent1 <- create_annem_agent("agent_001", "neural_momentum", 1000000)
agent2 <- create_annem_agent("agent_002", "contrarian_ai", 1500000)

# Create a market environment
market <- create_annem_market(n_agents = 500, symbols = c("AAPL", "MSFT"))

# Run simulation
sim_results <- market$run_simulation(n_steps = 100)

Performance Analysis

# Calculate performance metrics
returns <- rnorm(252, 0.08/252, 0.2/sqrt(252))
metrics <- calculate_performance_metrics(returns)

# Calculate Sharpe ratio
sharpe <- calculate_sharpe_ratio(returns)

# Benchmark comparison
predictions <- rnorm(100, 0.01, 0.02)
actual <- rnorm(100, 0.01, 0.03)
comparison <- compare_with_benchmarks(predictions, actual)

System Requirements

Important Notes:
  • R Version: 4.0.0 or higher required
  • Memory: 8GB RAM recommended for large simulations
  • Internet: Required for downloading market data
  • Dependencies: Will be installed automatically

Next Steps

Now that you have AgentsMCP running, explore these resources:

Getting Help

If you encounter issues or have questions: