### Install Davia (Bash) Source: https://github.com/davialabs/davia/blob/main/README.md Installs the Davia package using pip. For LangGraph specific features, optional dependencies including langgraph and langgraph-api are also installed. ```bash pip install davia pip install davia langgraph "langgraph-api==0.0.38" ``` -------------------------------- ### Run a Basic Davia App (Python) Source: https://github.com/davialabs/davia/blob/main/README.md Demonstrates how to create a simple Davia application instance and define a basic task function. The application can then be run using the Davia CLI. ```python from davia import Davia app = Davia() # Define your tasks and AI agents here # For example: @app.task def my_python_function(name: str) -> str: return f"Hello, {name}!" # To run this app, save it as my_app.py and execute: # davia run my_app.py ``` -------------------------------- ### Define Tasks with Pydantic Models (Python) Source: https://github.com/davialabs/davia/blob/main/README.md Shows how to define complex input and output types for Davia tasks using Pydantic models. This enhances code clarity and ensures smooth integration with the generated frontend. ```python from pydantic import BaseModel from typing import List from davia import Davia app = Davia() class UserInput(BaseModel): name: str age: int preferences: List[str] @app.task def calculate_user_score(input_data: UserInput) -> int: """ Calculate a user's score based on their profile information. The score is computed using the following formula: - Base score: 10 points per character in the name - Age bonus: 2 points per year of age - Preferences bonus: 5 points per preference Args: input_data (UserInput): User profile containing name, age, and preferences Returns: int: The calculated user score """ # Example calculation based on user data base_score = len(input_data.name) * 10 age_bonus = input_data.age * 2 preferences_bonus = len(input_data.preferences) * 5 return base_score + age_bonus + preferences_bonus ``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.