Overview
Actions extend your Guru’s capabilities by executing custom Python code or making external API calls. When users ask questions that require real-time data or custom processing, your Guru can automatically trigger these actions to fetch information and provide up-to-date responses.
- Python Code: Execute custom Python scripts in isolated containers for data processing, API integrations, and custom logic.
- API Call: Make HTTP requests to external APIs and services.
- fetch real-time data
- process data with custom scripts
- retrieve current information
- integrate with third-party tools
How Actions Work
Actions use an intelligent trigger system:- When to Trigger This Action: The Guru checks if the user’s question matches your defined conditions
- Parameter Extraction: Parameters are extracted from the user’s question based on your descriptions
- Execution Decision: The action runs only if all required parameters can be extracted (or have default values)
- Execution: Python code runs in an isolated container, or an API call is made to the configured endpoint
- Response Handling: The Usage Instructions guide the AI on how to interpret and present the results
Creating an Action

- Basic Information and Parameters
- Action Type Configuration (Python Code or API Call)
- Usage Instructions and Testing
Basic Information and Parameters

- Action Name: Provide a descriptive name that appears in your actions list
- When to Trigger This Action: Be specific about keywords, patterns, or user intents to ensure it only runs when appropriate (e.g., “When the user wants to guess the secret number”)

- API Call: Use them in your API endpoint, headers, body using
{parameter_name}syntax - Python Code: Use them as environment variables via
os.environ.get()
- Name: Use only letters and underscores (e.g.,
username,user_id). Cannot conflict with secret names. - Type: Choose from String (text), Number (numeric), or Boolean (true/false)
- What to Extract: Clear description for parameter extraction from user questions
- Required: Check if essential for the action to work
- Default Value: Optional fallback when parameter can’t be extracted
Usage Instructions and Testing

- Usage Instructions: Provide instructions for how the AI should interpret and use the response data (API response or Python stdout)
- Example: “Use stdout to decide if the guess was correct”
- Example: “Extract the user’s name and bio from the JSON response and present this information in a clear summary”
- Testing: Use the “Test Action” button to verify your configuration
- If required parameters exist, you’ll be prompted to provide test values
- Test results show success status, response data, and execution details
Action Types
When creating an action, choose between:- Python Code: Execute custom Python scripts in isolated containers
- API Call: Make HTTP requests to external APIs and services
Python Code Actions

os.environ.get().
Key Features:
- Isolated execution: Each execution runs in a fresh container that is destroyed after use
- Pre-installed libraries: Popular data science and HTTP libraries ready to use
- Results via stdout: Your code’s
print()output is captured and returned to the Guru - Secrets protection: All secrets are masked in output (supports plain text, base64, hex, and URL-encoded detection)
Sandbox Environment
Python code runs inside an isolated sandbox container with the following specifications: Base Image:python:3.13-slim with git and curl installed
Pre-installed Python Packages:
You cannot install additional packages at runtime. The container filesystem is
read-only. If you need a package that isn’t listed, contact
us.
Execution Limits
| Resource | Limit |
|---|---|
| Memory | 512MB |
| CPU | 1 core |
| Max Processes | 128 |
| Timeout | 30 seconds |
Temp Storage (/tmp) | 100MB |
Security Restrictions:
- Read-only filesystem (only
/tmpis writable) /tmpmounted withnoexecflag (cannot execute binaries)- All Linux capabilities dropped
- Network access allowed (for API calls)
os.environ.get():
Examples
Example 1: Simple calculation with parametersAdd the following Parameters:
GUESS, SECRET_NUMBERAdd the following Secrets:
WEATHER_API_KEY (get your free API key from weatherapi.com)Optionally add Parameters: CITY (defaults to “London” if not provided)Add the following Secrets:
OPENAI_API_KEY (get your API key from
OpenAI)API Call Actions


- HTTP Method: Select from
GET,POST,PUT,PATCH,DELETE - Endpoint URL: Enter the API endpoint. Use
{parameter_name}or{SECRET_NAME}to insert parameter/secret values- Example:
https://api.github.com/users/{username}
- Example:
- Headers: Configure authentication or content type using
{parameter_name}or{SECRET_NAME}syntax- Example:
Authorization: Bearer {API_KEY}
- Example:
- Request Body: For
POST,PUT, andPATCHmethods, include JSON payload supporting{parameter_name}or{SECRET_NAME}syntax:
Managing Actions

- View all configured actions with their name, type (“Python Code” or “API Call”), and status (Enabled/Disabled)
-
Use the top action bar:
- History: View execution history of all actions
- Import: Import an action from a JSON configuration file (exported from another action)
- Create an Action: Create a new action from scratch
-
Click the menu icon (⋮) next to any action to:
- Edit: Modify the action’s configuration
- Export: Download the action configuration as a JSON file
- Trigger Action: Manually run the action immediately
- Disable: Temporarily disable without deleting
- Delete: Permanently remove the action
- Enable or disable actions at any time
- Disabled actions won’t be triggered by user questions
- Note: If a secret used by an action is deleted, that action will be automatically disabled
Usage in the Answer
Actions used in the answer are shown with the action name:
Secrets Management
Secrets are encrypted credentials (API keys, tokens, passwords) configured in Guru Settings → Secrets. They can be used in both Python Code and API Call actions.
- Secrets are encrypted at rest (AES-256) and masked in all output
- Access secrets in Python via
os.environ.get('SECRET_NAME') - Use secrets in API calls with
{SECRET_NAME}syntax - Secret names cannot conflict with parameter names
- Deleting a secret automatically disables all actions using it
- Python:
api_key = os.environ.get('STRIPE_API_KEY') - API Call:
Authorization: Bearer {STRIPE_API_KEY}
Common Mistakes to Avoid
| Mistake | ❌ Avoid | ✅ Do Instead |
|---|---|---|
| Vague Condition Prompts | ”When asking about data" | "When asking about current weather conditions for a specific location” |
| Inadequate Parameter Descriptions | Parameter: id, Description: “The ID” | Parameter: user_id, Description: “The unique identifier for the GitHub user whose profile information is being requested” |
| Incomplete Usage Instructions | ”Use the response data" | "Extract the user’s name, bio, and public repository count from the JSON response and present this information in a clear, formatted summary” |
| Not Testing Actions | Enabling actions without testing them first | Always test actions with various parameter combinations before enabling |
| Overly Complex Actions | Creating actions that try to do too many things at once | Keep actions focused on a single, specific task |