PumasAide
PumasAide is a bridge between AI assistants and Pumas. You describe analyses in natural language; the AI uses Pumas tools on your behalf and returns results.
Jump straight to NCA Analysis Walkthrough or Population PK Walkthrough to see PumasAide in action, then return here to learn more.
What Can You Do with PumasAide?
Here are examples of what you can ask:
- Load and transform data: "Load the PK data from study_data.csv and show me the first few rows"
- Build models: "Create a two-compartment model with first-order absorption"
- Fit models: "Fit this model to my data using FOCE"
- Run NCA: "Calculate AUC, Cmax, and half-life for each subject"
- Simulate: "Simulate 100 subjects at 50mg, 100mg, and 200mg doses"
- Visualize: "Create a VPC plot comparing predictions to observations"
Every action generates reviewable Julia code, so you learn Pumas syntax while getting results.
How It Works
When you make a request, the AI assistant reads the relevant documentation and workflow guides, then writes Julia code to perform the analysis. Each step produces a script saved to the programs/ directory.
For example, when you ask "Load my PK data from study.csv", the AI:
- Looks up the data loading API documentation
- Writes a Julia script to
programs/01-data/01-load-pk-data.jl:
using CSV, DataFrames
pk_data = CSV.read("../../datasets/study.csv", DataFrame; missingstring = ["NA", ".", ""])- Executes the script, making
pk_dataavailable in the workspace - Shows you the result and a preview URL
This approach gives you:
- Traceable actions: Every operation produces an executable Julia script
- Reviewable code: You see what the AI writes before it runs, and can edit scripts directly
- Reproducibility: Scripts in
programs/can be re-run independently, version controlled, and shared - Learning opportunity: Watch how natural language maps to Pumas code
Persistent workspace: Objects (DataFrames, models, fit results) stay in memory across tool calls, so each step builds on previous results naturally.
Live preview: View plots, tables, and results at http://localhost:8081/preview while working.
The generated code uses standard Pumas packages (Pumas, NCA, Bioequivalence, AlgebraOfGraphics, SummaryTables), so everything you learn transfers directly to manual Pumas workflows.
In AI terminology, a "tool" is a function the AI can call to perform actions. PumasAide provides three tools: pumas_knowledge for looking up documentation and API references, include_julia_file for executing scripts, and eval_julia_code for quick inspection. The AI writes standard Julia code against Pumas packages—there are no special abstractions to learn.
Capabilities
- Load and transform pharmacometric data
- Perform non-compartmental analysis (NCA)
- Build and fit population PK/PD models
- Run simulations for dose selection and trial design
- Generate publication-quality plots and tables
- Create formal analysis reports
See the NCA Analysis Walkthrough and Population PK Walkthrough for complete worked examples.
Why Use It
- Natural language interface: Describe goals instead of writing code
- Guided workflows: Built-in steps for data preparation, model specification, and quality checks
- Reproducible output: Every step generates Julia code saved to
programs/ - Standard Pumas packages: Generated code uses Pumas, NCA, AlgebraOfGraphics, SummaryTables—transferable to manual workflows
- Learn while doing: Review the Julia code the AI writes to learn Pumas patterns naturally. Use
pumas_knowledgeto look up any function you're curious about.
Data Privacy
Your data flows only to your chosen LLM provider (Anthropic, OpenAI, Google, etc.). No analysis data is sent to PumasAI. You control your data and can select providers that meet your compliance requirements.
Suggested Learning Path
Beginner:
- Start with the interactive tutorial: ask "Walk me through an NCA analysis with sample data"
- Follow the NCA Analysis Walkthrough or Population PK Walkthrough
- Try basic visualizations with your own data
Intermediate:
- Build a PopPK model from scratch using natural language
- Review the generated code in
programs/to understand Pumas syntax - Use Workflows for structured analyses
Advanced:
- Configure Organization Rules for your team's thresholds and methodology
- Edit generated code directly for specialized needs
- Combine PumasAide sessions with manual Pumas coding
Next Steps
- Getting Started with installation and configuration
- Workflows for guided analysis procedures
- Tools Reference for comprehensive tool documentation
- Tutorials: NCA Analysis Walkthrough, Population PK Walkthrough, Simulation Walkthrough