AI Agents

Astronomy AI Agent

📄 43 pages
📅 Published March 2026
SimuPro Data Solutions
View Guide Summary & Sample on SimuPro → 📋 Browse Complete Guide Index →

What This Guide Covers

From a bare Ubuntu 22.04 shell to a fully running web application — two complete AI agent codebases, six astronomy tools, and a real NASA API integration, all explained line by line with zero framework abstraction.

2
Agent Architectures
6
Astronomy Tools
5
Scaling Levels
43
Pages

Topics Covered in This Guide

Read the Full Guide + Download Free Sample

43 pages · Instant PDF download · Available in the SimuPro Knowledge Store

View Guide Summary & Sample on SimuPro → 📋 Browse Complete Guide Index →

Frequently Asked Questions

What are the two AI agent architectures covered in the guide?
The guide builds two complete architectures side by side. Plan-and-Execute separates planning from execution: a Planner decomposes the query into an ordered task list, an Executor dispatches each task to the appropriate tool with a 3-stage retry mechanism, and a Synthesizer assembles the results into a polished answer. ReAct interleaves reasoning and action in a loop: the agent reasons about what to do next, acts by calling a tool, observes the result, and repeats until it can produce a final answer. Plan-and-Execute is more predictable and token-efficient for well-scoped queries; ReAct is more adaptive when the next step depends on intermediate results.
What are the six astronomy tools the agent uses?
The six tools are: (1) Planet Data — physical and orbital properties for any solar system planet; (2) Kepler Orbitals — orbital period, velocity, and distance using Kepler’s Third Law; (3) Distance Conversion — converts between astronomical units, light-years, parsecs, and kilometres; (4) Star Lookup — luminosity, spectral class, and distance for named stars; (5) Galaxy Lookup — type, distance, and key properties for named galaxies; (6) NASA APOD API — live integration with NASA’s Astronomy Picture of the Day API returning the current image, title, and explanation.
How does the guide approach deployment to production?
Deployment proceeds in three stages. First, a systemd service runs the agent as a persistent background process on Ubuntu. Second, a FastAPI application adds REST and WebSocket endpoints — WebSocket streaming lets the frontend display token-by-token responses in real time. Third, nginx is configured as a reverse proxy with Let’s Encrypt HTTPS termination. A gunicorn worker configuration handles concurrency. The complete nginx configuration, systemd unit file, and a production security checklist are all provided.
What does the five-level scaling roadmap cover?
Level 1 is a single-developer local setup. Level 2 adds a production server with systemd and nginx. Level 3 introduces horizontal scaling with multiple gunicorn workers behind a load balancer. Level 4 moves to containerised deployment with Docker and a managed database for conversation state. Level 5 is a full Kubernetes deployment with auto-scaling, rolling updates, and centralised observability. Each level includes the specific configuration changes and infrastructure additions required to move from the previous level.
How does the guide handle security for production deployments?
The security section covers four areas: prompt injection protection (input validation and system prompt hardening to prevent users overriding agent instructions); API key management (environment variable injection with key rotation guidance); rate limiting (nginx rate limiting directives and per-user request quotas); and a production hardening checklist covering HTTPS enforcement, CORS configuration, error message sanitisation, and structured audit logging of all agent tool calls for traceability.

Brief Summary

From a bare Ubuntu 22.04 shell to a fully running web application — two complete AI agent codebases, six astronomy tools, and a real NASA API integration, all explained line by line with zero framework abstraction.

Every architectural secret is exposed: watch a Planner decompose an astronomy query into atomic tasks, a 3-stage retry Executor dispatch Kepler’s orbital mechanics, and a Synthesizer turn raw JSON into an expert answer in under two seconds.

Production-grade from page one: systemd service, FastAPI WebSocket streaming, nginx + HTTPS deployment, a three-level pytest suite, a five-tier Kubernetes scaling roadmap, and a hardened security checklist — in a single reference.

Extended Summary

What if building a production-grade AI Agent from scratch required nothing more than pure Python — no LangChain, no CrewAI, no black boxes — just clean, debuggable code you control and understand completely?

This guide constructs two complete agent architectures side by side: the predictable Plan-and-Execute pipeline (Planner → Executor → Synthesizer) versus the adaptive ReAct loop (Reason → Act → Observe), both battle-tested against a rich astronomy domain covering planetary data, stellar distances, galaxy catalogues, and live NASA feeds.

You will follow a real multi-step query as it decomposes into atomic tasks, calls Kepler’s Third Law, star-luminosity tools, and a retry-safe dispatcher — returning a polished expert answer complete with a full execution trace and structured audit log.

The guide then takes you from terminal to the open web: FastAPI REST and WebSocket endpoints, a dependency-free HTML frontend, nginx reverse proxy with Let’s Encrypt HTTPS, and a gunicorn worker configuration — all backed by a five-level scaling roadmap stretching from a single developer PC to enterprise Kubernetes.

Whether you want to understand how autonomous agents really work under the hood, build one for your own domain, or deploy and harden one at production scale, every decision is explained inline — architecture comparisons, per-query cost tables, six live tool implementations, and a prioritised security checklist hand you the complete blueprint.

SimuPro Data Solutions
SimuPro Data Solutions
Cloud Data Engineering & AI Consultancy  ·  AWS  ·  Azure  ·  GCP  ·  Databricks  ·  Ysselsteyn, Netherlands  ·  simupro.nl
SimuPro is your end-to-end cloud data solutions partner — from in-depth consultancy (research, architecture design, platform selection, optimization, management, team support) to tailor-made development (proof-of-concept, build, test, deploy to production, scale, automate, extend). We engineer robust data platforms on AWS, Azure, Databricks & GCP — covering data migration, big data engineering, BI & analytics, and ML models, AI agents & intelligent automation — secure, scalable, and tailored to your exact business goals.
Data-DrivenAI-PoweredValidated ResultsConfident DecisionsSmart Outcomes

Related Guides in the SimuPro Knowledge Store

SimuPro Data Solutions — Cloud Data Engineering & AI Consultancy

Expert PDF guides · End-to-end consultancy · AWS · Azure · Databricks · GCP

Visit simupro.nl →
📋 Browse All Guides — Complete Index →