> For the complete documentation index, see [llms.txt](https://made-is-docs.gitbook.io/made.is-docs/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://made-is-docs.gitbook.io/made.is-docs/readme.md).

# Introduction: MADE.is Serverless Agents

Introduction to MADE.is, explaining its purpose and features.

**What is MADE.is?**

MADE.is enables you to run Python agents in the cloud without managing servers. Agents can be executed via UI, REST API, and Python SDK.

**Key Features**

* Simplified agent execution
* Scalability
* Flexible integration via APIs and SDKs

**How MADE.is** **Works**

MADE.is simplifies the process of running Python agents in the cloud by providing a seamless platform that abstracts away the complexities of server management, deployment, and scaling. This allows developers to focus entirely on their logic and applications without worrying about infrastructure. Here’s a step-by-step explanation of how MADE.is operates under the hood.

**Agent Lifecycle**

The lifecycle of an agent in MADE.is consists of the following stages:

1. **Agent Creation**
   * Users define the core components of an agent:
     * **Script:** A Python script with a `main` function to handle execution logic.
     * **Requirements:** Any Python dependencies necessary for the script.
     * **Environment Variables:** Key-value pairs accessible by the script for runtime configuration.
   * These components are uploaded and validated via the UI, REST API, or SDK.
2. **Build Process**
   * After the agent is created, MADE.is automatically:
     * Installs the specified dependencies.
     * Configures the environment with the defined variables.
     * Packages the script into an isolated execution environment.
   * This ensures consistency and avoids dependency conflicts between different agents.
3. **Execution**
   * Once the build process is complete, the agent is ready to execute.
   * Execution can be triggered via:
     * The MADE.is UI.
     * REST API (programmatic interaction).
     * Python SDK (integrating execution into Python applications).
   * During execution, the script runs inside a containerized environment optimized for security and performance.
4. **Logs and Results**
   * MADE.is captures and stores logs generated during execution, including:
     * Output from the `print` function.
     * Logs from the `logging` module.
   * The final return value of the script (JSON-serializable) is also stored and can be accessed through the UI or APIs.

***

**2. Architecture of MADE.is**

MADE.is is designed as a cloud-native platform, leveraging modern technologies to ensure scalability, reliability, and efficiency. Here are the key architectural components:

1. **Frontend (UI)**
   * A user-friendly web interface where users can:
     * Create and manage agents.
     * Monitor executions.
     * View logs and results.
   * Provides visual insights into agent status, including build progress and execution history.
2. **Backend Services**
   * **API Layer:** Handles requests from the UI, REST API, and SDK. It validates inputs, triggers builds, and manages agent executions.
   * **Execution Manager:** Schedules and runs agents in isolated environments. Ensures that resources are efficiently allocated and execution is sandboxed for security.
   * **Logging and Monitoring:** Captures all logs, return values, and metrics for each execution. These logs are indexed and made available through the UI or API.
3. **Containerized Execution**
   * MADE.is uses containerization (e.g., Docker) to isolate each agent’s runtime environment.
   * Each container is preloaded with:
     * The required Python version.
     * The specified dependencies (installed during the build process).
     * Configured environment variables.
   * Containers are lightweight, secure, and ephemeral, meaning they are destroyed immediately after execution.
4. **Storage Systems**
   * **Code and Configuration Storage:** Scripts, requirements, and environment variables are securely stored and versioned.
   * **Execution Data Storage:** Logs, return values, and execution metadata are stored for retrieval and analysis.
5. **Scalability and Load Balancing**
   * MADE.is dynamically scales its infrastructure to handle high workloads, ensuring agents execute without delay.
   * A load balancer ensures even distribution of execution requests across multiple compute instances.

***

**3. Workflow Example**

Here’s an example of how a typical agent execution works:

1. **Agent Creation:**
   * You upload a Python script to the MADE.is platform via the UI or SDK.
   * Specify the following:
     * Python dependencies (e.g., `numpy`, `pandas`).
     * Environment variables (e.g., API keys).
2. **Build:**
   * MADE.is creates a containerized environment.
   * The Python environment is prepared by installing the dependencies.
   * Any configuration (e.g., environment variables) is applied.
3. **Execution Request:**
   * You initiate execution through one of the following methods:
     * **UI:** Click the “Run” button.
     * **API:** Send a POST request with the agent ID and payload.
     * **SDK:** Call the `execute` method of the agent object.
4. **Processing:**
   * MADE.is allocates a container for the agent.
   * The script is executed, and logs are streamed in real-time.
5. **Results Retrieval:**
   * Upon completion, you can retrieve:
     * **Logs:** Debugging and informational messages.
     * **Return Value:** The output of the script.

***

**4. Key Features of the MADE.is Workflow**

1. **Isolation:** Each agent runs in its own isolated environment, preventing interference between agents and ensuring security.
2. **Scalability:** MADE.is automatically scales its resources to handle increased workloads.
3. **Flexibility:**
   * Supports various execution methods (UI, REST API, SDK).
   * Compatible with any JSON-serializable input and output.
4. **Monitoring:**
   * Real-time logs and execution statuses available through the UI or API.
   * Centralized logging for easy debugging.

***

**5. Advantages of Using MADE.is**

1. **No Server Management:** Eliminate the need to manage cloud infrastructure for running scripts.
2. **Rapid Deployment:** Create, build, and execute agents in minutes.
3. **Secure Execution:** Containerized environments ensure isolation and data security.
4. **Integration-Friendly:** MADE.is REST API and Python SDK allow seamless integration with existing workflows and systems.
