import asynciofrom praisonaiagents import Agentfrom praisonai.integrations.managed_agents import ManagedAgent, ManagedConfigmanaged = ManagedAgent( provider="local", config=ManagedConfig( model="gpt-4o-mini", system="You are a computational scientist. Use Modal's serverless platform for intensive computations." ), compute="modal")agent = Agent(name="scientist", backend=managed)# Provision high-performance environmentinfo = asyncio.run(managed.provision_compute( packages=["numpy", "scipy", "matplotlib", "pandas", "scikit-learn"]))# LLM directs high-performance computingresult = agent.start("""Perform a Monte Carlo simulation to estimate π using 10 million random points.Show the convergence process and final estimate.""", stream=True)
import asynciofrom praisonaiagents import Agentfrom praisonai.integrations.managed_agents import ManagedAgent, ManagedConfigmanaged = ManagedAgent( provider="local", config=ManagedConfig( model="gpt-4o-mini", system="You are an ML engineer using Modal for scalable model training." ), compute="modal")agent = Agent(name="ml-engineer", backend=managed)# ML environment with GPU support (if available)info = asyncio.run(managed.provision_compute( packages=["torch", "scikit-learn", "numpy", "pandas"]))# Train models at scaleresult = agent.start("""Create and train a simple neural network on synthetic data:1. Generate 10,000 samples with 10 features2. Create a 3-layer neural network3. Train for 100 epochs4. Report final accuracy and training time""")
import asynciofrom praisonaiagents import Agentfrom praisonai.integrations.managed_agents import ManagedAgent, ManagedConfigmanaged = ManagedAgent( provider="local", config=ManagedConfig( model="gpt-4o-mini", system="You are a data engineer processing large datasets efficiently." ), compute="modal")agent = Agent(name="data-engineer", backend=managed)# Big data environmentinfo = asyncio.run(managed.provision_compute( packages=["pandas", "polars", "pyarrow", "dask"]))# Process large datasetsresult = agent.start("""Simulate processing a large dataset:1. Create a 1M row DataFrame with random data2. Perform groupby operations and aggregations3. Calculate percentiles and statistics4. Measure processing time and memory usage""")