repo
stringlengths
7
90
file_url
stringlengths
81
315
file_path
stringlengths
4
228
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 14:38:15
2026-01-05 02:33:18
truncated
bool
2 classes
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/memory/strategies/base.py
libs/agno/agno/memory/strategies/base.py
from abc import ABC, abstractmethod from typing import List from agno.db.schemas import UserMemory from agno.models.base import Model from agno.utils.tokens import count_text_tokens class MemoryOptimizationStrategy(ABC): """Abstract base class for memory optimization strategies. Subclasses must implement op...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/guardrails/prompt_injection.py
libs/agno/agno/guardrails/prompt_injection.py
from typing import List, Optional, Union from agno.exceptions import CheckTrigger, InputCheckError from agno.guardrails.base import BaseGuardrail from agno.run.agent import RunInput from agno.run.team import TeamRunInput class PromptInjectionGuardrail(BaseGuardrail): """Guardrail for detecting prompt injection a...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/guardrails/__init__.py
libs/agno/agno/guardrails/__init__.py
from agno.guardrails.base import BaseGuardrail from agno.guardrails.openai import OpenAIModerationGuardrail from agno.guardrails.pii import PIIDetectionGuardrail from agno.guardrails.prompt_injection import PromptInjectionGuardrail __all__ = ["BaseGuardrail", "OpenAIModerationGuardrail", "PIIDetectionGuardrail", "Prom...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/guardrails/pii.py
libs/agno/agno/guardrails/pii.py
from re import Pattern from typing import Dict, Optional, Union from agno.exceptions import CheckTrigger, InputCheckError from agno.guardrails.base import BaseGuardrail from agno.run.agent import RunInput from agno.run.team import TeamRunInput class PIIDetectionGuardrail(BaseGuardrail): """Guardrail for detectin...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/guardrails/base.py
libs/agno/agno/guardrails/base.py
from abc import ABC, abstractmethod from typing import Union from agno.run.agent import RunInput from agno.run.team import TeamRunInput class BaseGuardrail(ABC): """Abstract base class for all guardrail implementations.""" @abstractmethod def check(self, run_input: Union[RunInput, TeamRunInput]) -> None...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/guardrails/openai.py
libs/agno/agno/guardrails/openai.py
from os import getenv from typing import Any, Dict, List, Literal, Optional, Union from agno.exceptions import CheckTrigger, InputCheckError from agno.guardrails.base import BaseGuardrail from agno.run.agent import RunInput from agno.run.team import TeamRunInput from agno.utils.log import log_debug from agno.utils.ope...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/whatsapp.py
libs/agno/agno/utils/whatsapp.py
import os from typing import Optional, Union import httpx import requests from agno.utils.log import log_debug, log_error def get_access_token() -> str: access_token = os.getenv("WHATSAPP_ACCESS_TOKEN") if not access_token: raise ValueError("WHATSAPP_ACCESS_TOKEN is not set") return access_token...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/prompts.py
libs/agno/agno/utils/prompts.py
import json from typing import Type, Union from pydantic import BaseModel from agno.utils.log import log_warning def get_json_output_prompt(output_schema: Union[str, list, dict, BaseModel]) -> str: """Return the JSON output prompt for the Agent. This is added to the system prompt when the output_schema is ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/response_iterator.py
libs/agno/agno/utils/response_iterator.py
class ResponseIterator: def __init__(self): self.items = [] self.index = 0 def add(self, item): self.items.append(item) def __iter__(self): return self def __next__(self): if self.index >= len(self.items): raise StopIteration item = self.ite...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/shell.py
libs/agno/agno/utils/shell.py
from typing import List from agno.utils.log import log_debug, log_info, logger def run_shell_command(args: List[str], tail: int = 100) -> str: log_info(f"Running shell command: {args}") import subprocess try: result = subprocess.run(args, capture_output=True, text=True) log_debug(f"Resu...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/enum.py
libs/agno/agno/utils/enum.py
from enum import Enum from typing import Any, List, Optional class ExtendedEnum(Enum): @classmethod def values_list(cls: Any) -> List[Any]: return list(map(lambda c: c.value, cls)) @classmethod def from_str(cls: Any, str_to_convert_to_enum: Optional[str]) -> Optional[Any]: """Convert ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/string.py
libs/agno/agno/utils/string.py
import hashlib import json import re import uuid from typing import Optional, Type from uuid import uuid4 from pydantic import BaseModel, ValidationError from agno.utils.log import logger def is_valid_uuid(uuid_str: str) -> bool: """ Check if a string is a valid UUID Args: uuid_str: String to c...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/http.py
libs/agno/agno/utils/http.py
import asyncio import logging import threading from time import sleep from typing import Optional import httpx logger = logging.getLogger(__name__) DEFAULT_MAX_RETRIES = 3 DEFAULT_BACKOFF_FACTOR = 2 # Exponential backoff: 1, 2, 4, 8... # Global httpx clients for resource efficiency # These are shared across all mo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/common.py
libs/agno/agno/utils/common.py
from dataclasses import asdict from typing import Any, List, Optional, Set, Type, Union, get_type_hints def isinstanceany(obj: Any, class_list: List[Type]) -> bool: """Returns True if obj is an instance of the classes in class_list""" for cls in class_list: if isinstance(obj, cls): return ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/response.py
libs/agno/agno/utils/response.py
from typing import List, Set, Union from agno.exceptions import RunCancelledException from agno.models.response import ToolExecution from agno.reasoning.step import ReasoningStep from agno.run.agent import RunOutput, RunOutputEvent, RunPausedEvent from agno.run.team import TeamRunOutput, TeamRunOutputEvent def creat...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/format_str.py
libs/agno/agno/utils/format_str.py
from typing import Optional def remove_indent(s: Optional[str]) -> Optional[str]: """ Remove the indent from a string. Args: s (str): String to remove indent from Returns: str: String with indent removed """ if s is not None and isinstance(s, str): return "\n".join([l...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/audio.py
libs/agno/agno/utils/audio.py
import base64 import os import wave from agno.utils.log import log_info def write_audio_to_file(audio, filename: str): """ Write base64 encoded audio file to disk. :param audio: Base64 encoded audio file :param filename: The filepath or filename to save the audio to """ wav_bytes = base64.b6...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/timer.py
libs/agno/agno/utils/timer.py
from time import perf_counter from typing import Optional class Timer: """Timer class for timing code execution""" def __init__(self): self.start_time: Optional[float] = None self.end_time: Optional[float] = None self.elapsed_time: Optional[float] = None @property def elapsed...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/web.py
libs/agno/agno/utils/web.py
import webbrowser from pathlib import Path from agno.utils.log import logger def open_html_file(file_path: Path): """ Opens the specified HTML file in the default web browser. :param file_path: Path to the HTML file. """ # Resolve the absolute path absolute_path = file_path.resolve() if ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/serialize.py
libs/agno/agno/utils/serialize.py
"""JSON serialization utilities for handling datetime and enum objects.""" from datetime import date, datetime, time from enum import Enum from typing import Any def json_serializer(obj: Any) -> Any: """Custom JSON serializer for objects not serializable by default json module. Handles: - datetime, date...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/tools.py
libs/agno/agno/utils/tools.py
from typing import Any, Dict, Optional from agno.models.response import ToolExecution from agno.tools.function import Function, FunctionCall from agno.utils.functions import get_function_call def get_function_call_for_tool_call( tool_call: Dict[str, Any], functions: Optional[Dict[str, Function]] = None ) -> Opti...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/knowledge.py
libs/agno/agno/utils/knowledge.py
from typing import Any, Dict, List, Optional, Union from agno.filters import FilterExpr from agno.utils.log import log_info def get_agentic_or_user_search_filters( filters: Optional[Dict[str, Any]], effective_filters: Optional[Union[Dict[str, Any], List[FilterExpr]]] ) -> Dict[str, Any]: """Helper function t...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/log.py
libs/agno/agno/utils/log.py
import logging from functools import lru_cache from os import getenv from typing import Any, Literal, Optional from rich.logging import RichHandler from rich.text import Text LOGGER_NAME = "agno" TEAM_LOGGER_NAME = f"{LOGGER_NAME}-team" WORKFLOW_LOGGER_NAME = f"{LOGGER_NAME}-workflow" # Define custom styles for diff...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/merge_dict.py
libs/agno/agno/utils/merge_dict.py
from typing import Any, Dict, List def merge_dictionaries(a: Dict[str, Any], b: Dict[str, Any]) -> None: """ Recursively merges two dictionaries. If there are conflicting keys, values from 'b' will take precedence. Args: a (Dict[str, Any]): The first dictionary to be merged. b (Dict[s...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/events.py
libs/agno/agno/utils/events.py
from typing import Any, Dict, List, Optional, Union from agno.media import Audio, Image from agno.models.message import Citations from agno.models.response import ToolExecution from agno.reasoning.step import ReasoningStep from agno.run.agent import ( MemoryUpdateCompletedEvent, MemoryUpdateStartedEvent, O...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/dttm.py
libs/agno/agno/utils/dttm.py
from datetime import datetime, timezone from typing import Union def current_datetime() -> datetime: return datetime.now() def current_datetime_utc() -> datetime: return datetime.now(timezone.utc) def current_datetime_utc_str() -> str: return current_datetime_utc().strftime("%Y-%m-%dT%H:%M:%S") def ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/mcp.py
libs/agno/agno/utils/mcp.py
import json from functools import partial from uuid import uuid4 from agno.utils.log import log_debug, log_exception try: from mcp import ClientSession from mcp.types import CallToolResult, EmbeddedResource, ImageContent, TextContent from mcp.types import Tool as MCPTool except (ImportError, ModuleNotFoun...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/location.py
libs/agno/agno/utils/location.py
from typing import Any, Dict import requests from agno.utils.log import log_warning def get_location() -> Dict[str, Any]: """Get approximate location using IP geolocation.""" try: response = requests.get("https://api.ipify.org?format=json", timeout=5) ip = response.json()["ip"] respo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/message.py
libs/agno/agno/utils/message.py
from copy import deepcopy from typing import Dict, List, Union from pydantic import BaseModel from agno.models.message import Message from agno.utils.log import log_debug def filter_tool_calls(messages: List[Message], max_tool_calls: int) -> None: """ Filter messages (in-place) to keep only the most recent ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/team.py
libs/agno/agno/utils/team.py
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from agno.agent import Agent from agno.media import Audio, File, Image, Video from agno.run.agent import RunOutput from agno.run.team import TeamRunOutput from agno.utils.log import log_debug from agno.utils.string import is_valid_uuid, url_safe_string...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/cryptography.py
libs/agno/agno/utils/cryptography.py
from cryptography.hazmat.primitives import serialization from cryptography.hazmat.primitives.asymmetric import rsa def generate_rsa_keys(): """Generate RSA key pair for RS256 JWT signing/verification.""" private_key = rsa.generate_private_key(public_exponent=65537, key_size=2048) # Private key PEM (used ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/os.py
libs/agno/agno/utils/os.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/__init__.py
libs/agno/agno/utils/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/remote.py
libs/agno/agno/utils/remote.py
import json from typing import Any, Dict, List, Union from pydantic import BaseModel from agno.models.message import Message def serialize_input( input: Union[str, Dict[str, Any], List[Any], BaseModel, List[Message]], ) -> str: """Serialize the input to a string.""" if isinstance(input, str): re...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/safe_formatter.py
libs/agno/agno/utils/safe_formatter.py
import string class SafeFormatter(string.Formatter): def get_value(self, key, args, kwargs): """Handle missing keys by returning '{key}'.""" if key not in kwargs: return f"{key}" return kwargs[key] def format_field(self, value, format_spec): """ If Python s...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/pprint.py
libs/agno/agno/utils/pprint.py
import json from typing import AsyncIterable, Iterable, Union, get_args from pydantic import BaseModel from agno.run.agent import RunOutput, RunOutputEvent from agno.run.team import TeamRunOutput, TeamRunOutputEvent from agno.run.workflow import WorkflowRunOutput, WorkflowRunOutputEvent from agno.utils.log import log...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/certs.py
libs/agno/agno/utils/certs.py
from pathlib import Path import requests def download_cert(cert_url: str, filename: str = "cert.pem"): """ Downloads a CA certificate bundle if it doesn't exist locally. Returns: str: Path to the certificate file """ cert_dir = Path("./certs") cert_path = cert_dir / filename # C...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/functions.py
libs/agno/agno/utils/functions.py
import json from typing import Any, Callable, Dict, Optional, TypeVar from agno.tools.function import Function, FunctionCall from agno.utils.log import log_debug, log_error T = TypeVar("T") def get_function_call( name: str, arguments: Optional[str] = None, call_id: Optional[str] = None, functions: O...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/streamlit.py
libs/agno/agno/utils/streamlit.py
from datetime import datetime from typing import Any, Callable, Dict, List, Optional try: from agno.agent import Agent from agno.db.base import SessionType from agno.models.anthropic import Claude from agno.models.google import Gemini from agno.models.openai import OpenAIChat from agno.utils.lo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/pickle.py
libs/agno/agno/utils/pickle.py
from pathlib import Path from typing import Any, Optional from agno.utils.log import logger def pickle_object_to_file(obj: Any, file_path: Path) -> Any: """Pickles and saves object to file_path""" import pickle _obj_parent = file_path.parent if not _obj_parent.exists(): _obj_parent.mkdir(par...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/agent.py
libs/agno/agno/utils/agent.py
from asyncio import Future, Task from typing import TYPE_CHECKING, Any, AsyncIterator, Callable, Dict, Iterator, List, Optional, Sequence, Type, Union from pydantic import BaseModel from agno.media import Audio, File, Image, Video from agno.models.message import Message from agno.models.metrics import Metrics from ag...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/yaml_io.py
libs/agno/agno/utils/yaml_io.py
from pathlib import Path from typing import Any, Dict, Optional from agno.utils.log import log_debug, logger def read_yaml_file(file_path: Optional[Path]) -> Optional[Dict[str, Any]]: if file_path is not None and file_path.exists() and file_path.is_file(): import yaml log_debug(f"Reading {file_p...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/json_schema.py
libs/agno/agno/utils/json_schema.py
from enum import Enum from typing import Any, Dict, Optional, Union, get_args, get_origin from pydantic import BaseModel from agno.utils.log import logger def is_origin_union_type(origin: Any) -> bool: import sys if sys.version_info.minor >= 10: from types import UnionType # type: ignore ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/media.py
libs/agno/agno/utils/media.py
import base64 import time from enum import Enum from pathlib import Path from typing import List, Optional import httpx from agno.media import Audio, File, Image, Video from agno.utils.log import log_info, log_warning class SampleDataFileExtension(str, Enum): DOCX = "docx" PDF = "pdf" TXT = "txt" JS...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/hooks.py
libs/agno/agno/utils/hooks.py
from copy import deepcopy from typing import Any, Callable, Dict, List, Optional, Union from agno.eval.base import BaseEval from agno.guardrails.base import BaseGuardrail from agno.hooks.decorator import HOOK_RUN_IN_BACKGROUND_ATTR from agno.utils.log import log_warning # Keys that should be deep copied for backgroun...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/code_execution.py
libs/agno/agno/utils/code_execution.py
"""Utils for our multiple integrations with external code execution environments.""" import re def prepare_python_code(code: str) -> str: """Fix common problems with LLM-generated Python code.""" python_keywords = {"true": "True", "false": "False", "none": "None"} for lowercase, capitalized in python_key...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/openai.py
libs/agno/agno/utils/openai.py
import base64 import mimetypes from pathlib import Path from typing import Any, Dict, List, Optional, Sequence, Union from agno.media import Audio, File, Image from agno.utils.log import log_error, log_warning # Ensure .webp is recognized mimetypes.add_type("image/webp", ".webp") def audio_to_message(audio: Sequenc...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/tokens.py
libs/agno/agno/utils/tokens.py
import json import math from functools import lru_cache from pathlib import Path from typing import Any, Dict, List, Optional, Sequence, Tuple, Type, Union from pydantic import BaseModel from agno.media import Audio, File, Image, Video from agno.models.message import Message from agno.tools.function import Function f...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/reasoning.py
libs/agno/agno/utils/reasoning.py
from typing import TYPE_CHECKING, List, Optional, Tuple, Union from agno.models.message import Message from agno.models.metrics import Metrics from agno.reasoning.step import ReasoningStep if TYPE_CHECKING: from agno.run.agent import RunOutput from agno.team.team import TeamRunOutput def extract_thinking_co...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/gemini.py
libs/agno/agno/utils/gemini.py
from pathlib import Path from typing import Any, Dict, List, Optional, Type, Union from pydantic import BaseModel from agno.media import Image from agno.utils.log import log_error, log_warning try: from google.genai.types import ( FunctionDeclaration, Schema, Tool, ) from google.g...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/env.py
libs/agno/agno/utils/env.py
from os import getenv from typing import Optional def get_from_env(key: str, default: Optional[str] = None, required: bool = False) -> Optional[str]: """Get the value for an environment variable. Use default if not found, or raise an error if required is True.""" value = getenv(key, default) if value is ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/ai_foundry.py
libs/agno/agno/utils/models/ai_foundry.py
from typing import Any, Dict from agno.models.message import Message from agno.utils.log import log_warning from agno.utils.openai import images_to_message def format_message(message: Message, compress_tool_results: bool = False) -> Dict[str, Any]: """ Format a message into the format expected by OpenAI. ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/llama.py
libs/agno/agno/utils/models/llama.py
from typing import Any, Dict from agno.agent import Message from agno.utils.log import log_warning from agno.utils.openai import process_image ROLE_MAP = { "user": "user", "assistant": "assistant", "system": "system", "tool": "tool", } TOOL_CALL_ROLE_MAP = { "user": "user", "assistant": "assi...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/claude.py
libs/agno/agno/utils/models/claude.py
import json from dataclasses import dataclass, field from typing import Any, Dict, List, Optional, Tuple, Union from agno.media import File, Image from agno.models.message import Message from agno.utils.log import log_error, log_warning try: from anthropic.types import ( TextBlock, ToolUseBlock, ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/openai_responses.py
libs/agno/agno/utils/models/openai_responses.py
from pathlib import Path from typing import Any, Dict, List, Optional, Sequence, Union from agno.media import Image from agno.utils.log import logger def _process_bytes_image(image: bytes) -> Dict[str, Any]: """Process bytes image data.""" import base64 base64_image = base64.b64encode(image).decode("utf...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/schema_utils.py
libs/agno/agno/utils/models/schema_utils.py
""" Utility functions for handling JSON schemas across different model providers. This module provides model-agnostic schema transformations and validations. """ from typing import Any, Dict, Type from pydantic import BaseModel def is_dict_field(schema: Dict[str, Any]) -> bool: """ Check if a schema represe...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/watsonx.py
libs/agno/agno/utils/models/watsonx.py
from typing import Any, Dict, List, Sequence from agno.media import Image from agno.models.message import Message from agno.utils.log import log_error, log_warning def format_images_for_message(message: Message, images: Sequence[Image]) -> Message: """ Format an image into the format expected by WatsonX. ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/cohere.py
libs/agno/agno/utils/models/cohere.py
from pathlib import Path from typing import Any, Dict, List, Sequence from agno.media import Image from agno.models.message import Message from agno.utils.log import log_error, log_warning def _format_images_for_message(message: Message, images: Sequence[Image]) -> List[Dict[str, Any]]: """ Format an image i...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/__init__.py
libs/agno/agno/utils/models/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/models/mistral.py
libs/agno/agno/utils/models/mistral.py
from typing import Any, List, Optional, Union from agno.media import Image from agno.models.message import Message from agno.utils.log import log_error, log_warning try: # TODO: Adapt these imports to the new Mistral SDK versions from mistralai.models import ( # type: ignore AssistantMessage, # type...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/print_response/team.py
libs/agno/agno/utils/print_response/team.py
import json from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Set, Union, get_args from pydantic import BaseModel from agno.filters import FilterExpr from agno.media import Audio, File, Image, Video from agno.models.message import Message from agno.models.response import ToolExecution from agno.r...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/print_response/__init__.py
libs/agno/agno/utils/print_response/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/print_response/workflow.py
libs/agno/agno/utils/print_response/workflow.py
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Union from pydantic import BaseModel from rich.console import Group from rich.live import Live from rich.markdown import Markdown from rich.status import Status from rich.text import Text from agno.media import Audio, File, Image, Video from agno.models.mes...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/utils/print_response/agent.py
libs/agno/agno/utils/print_response/agent.py
import json import warnings from collections.abc import Set from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Union, cast, get_args from pydantic import BaseModel from rich.console import Group from rich.json import JSON from rich.live import Live from rich.markdown import Markdown from rich.statu...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/anthropic.py
libs/agno/agno/reasoning/anthropic.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.utils.log import logger def is_anthropic_reasoning_model(reasoning_model: Model) -> bool: """Check if the model is an Anthropi...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/deepseek.py
libs/agno/agno/reasoning/deepseek.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.utils.log import logger def is_deepseek_reasoning_model(reasoning_model: Model) -> bool: return reasoning_model.__class__.__na...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/ollama.py
libs/agno/agno/reasoning/ollama.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.utils.log import logger def is_ollama_reasoning_model(reasoning_model: Model) -> bool: return reasoning_model.__class__.__name...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/default.py
libs/agno/agno/reasoning/default.py
from __future__ import annotations from textwrap import dedent from typing import Any, Callable, Dict, List, Literal, Optional, Union from agno.models.base import Model from agno.reasoning.step import ReasoningSteps from agno.tools import Toolkit from agno.tools.function import Function def get_default_reasoning_ag...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/groq.py
libs/agno/agno/reasoning/groq.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.utils.log import logger def is_groq_reasoning_model(reasoning_model: Model) -> bool: return reasoning_model.__class__.__name__...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/helpers.py
libs/agno/agno/reasoning/helpers.py
from typing import Any, Dict, List, Literal, Optional from agno.models.base import Model from agno.models.message import Message from agno.reasoning.step import NextAction, ReasoningStep from agno.run.messages import RunMessages from agno.utils.log import logger def get_reasoning_agent( reasoning_model: Model, ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/__init__.py
libs/agno/agno/reasoning/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/vertexai.py
libs/agno/agno/reasoning/vertexai.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.utils.log import logger def is_vertexai_reasoning_model(reasoning_model: Model) -> bool: """Check if the model is a VertexAI m...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/azure_ai_foundry.py
libs/agno/agno/reasoning/azure_ai_foundry.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.utils.log import logger def is_ai_foundry_reasoning_model(reasoning_model: Model) -> bool: return reasoning_model.__class__.__...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/step.py
libs/agno/agno/reasoning/step.py
from enum import Enum from typing import List, Optional from pydantic import BaseModel, Field class NextAction(str, Enum): CONTINUE = "continue" VALIDATE = "validate" FINAL_ANSWER = "final_answer" RESET = "reset" class ReasoningStep(BaseModel): title: Optional[str] = Field(None, description="A ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/manager.py
libs/agno/agno/reasoning/manager.py
""" ReasoningManager - Centralized manager for all reasoning operations. This module consolidates reasoning logic from the Agent class into a single, maintainable manager that handles: - Native reasoning models (DeepSeek, Anthropic, OpenAI, Gemini, etc.) - Default Chain-of-Thought reasoning - Both streaming and non-st...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/openai.py
libs/agno/agno/reasoning/openai.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.models.openai.like import OpenAILike from agno.utils.log import logger def is_openai_reasoning_model(reasoning_model: Model) -> bo...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/reasoning/gemini.py
libs/agno/agno/reasoning/gemini.py
from __future__ import annotations from typing import AsyncIterator, Iterator, List, Optional, Tuple from agno.models.base import Model from agno.models.message import Message from agno.utils.log import logger def is_gemini_reasoning_model(reasoning_model: Model) -> bool: """Check if the model is a Gemini model...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/api.py
libs/agno/agno/api/api.py
from typing import Dict from httpx import AsyncClient as HttpxAsyncClient from httpx import Client as HttpxClient from httpx import Response from agno.api.settings import agno_api_settings class Api: def __init__(self): self.headers: Dict[str, str] = { "user-agent": f"{agno_api_settings.app_...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/team.py
libs/agno/agno/api/team.py
from agno.api.api import api from agno.api.routes import ApiRoutes from agno.api.schemas.team import TeamRunCreate from agno.utils.log import log_debug def create_team_run(run: TeamRunCreate) -> None: """Telemetry recording for Team runs""" with api.Client() as api_client: try: response = ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/evals.py
libs/agno/agno/api/evals.py
from agno.api.api import api from agno.api.routes import ApiRoutes from agno.api.schemas.evals import EvalRunCreate from agno.utils.log import log_debug def create_eval_run_telemetry(eval_run: EvalRunCreate) -> None: """Telemetry recording for Eval runs""" with api.Client() as api_client: try: ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/settings.py
libs/agno/agno/api/settings.py
from __future__ import annotations from importlib import metadata from pydantic import field_validator from pydantic_core.core_schema import ValidationInfo from pydantic_settings import BaseSettings, SettingsConfigDict from agno.utils.log import logger class AgnoAPISettings(BaseSettings): app_name: str = "agno...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/os.py
libs/agno/agno/api/os.py
from agno.api.api import api from agno.api.routes import ApiRoutes from agno.api.schemas.os import OSLaunch from agno.utils.log import log_debug def log_os_telemetry(launch: OSLaunch) -> None: """Telemetry recording for OS launches""" with api.Client() as api_client: try: response = api_cl...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/__init__.py
libs/agno/agno/api/__init__.py
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/workflow.py
libs/agno/agno/api/workflow.py
from agno.api.api import api from agno.api.routes import ApiRoutes from agno.api.schemas.workflows import WorkflowRunCreate from agno.utils.log import log_debug def create_workflow_run(workflow: WorkflowRunCreate) -> None: """Telemetry recording for Workflow runs""" with api.Client() as api_client: tr...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/routes.py
libs/agno/agno/api/routes.py
from dataclasses import dataclass @dataclass class ApiRoutes: """API routes for telemetry recordings""" # Runs RUN_CREATE: str = "/telemetry/runs" EVAL_RUN_CREATE: str = "/telemetry/evals" # OS launch AGENT_OS_LAUNCH: str = "/telemetry/os"
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/agent.py
libs/agno/agno/api/agent.py
from agno.api.api import api from agno.api.routes import ApiRoutes from agno.api.schemas.agent import AgentRunCreate from agno.utils.log import log_debug def create_agent_run(run: AgentRunCreate) -> None: """Telemetry recording for Agent runs""" with api.Client() as api_client: try: api_cl...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/response.py
libs/agno/agno/api/schemas/response.py
from pydantic import BaseModel class ApiResponseSchema(BaseModel): status: str = "fail" message: str = "invalid request"
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/utils.py
libs/agno/agno/api/schemas/utils.py
from enum import Enum class TelemetryRunEventType(str, Enum): AGENT = "agent" EVAL = "eval" TEAM = "team" WORKFLOW = "workflow" def get_sdk_version() -> str: """Return the installed agno SDK version from package metadata. Falls back to "unknown" if the package metadata isn't available. ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/team.py
libs/agno/agno/api/schemas/team.py
from typing import Any, Dict, Optional from pydantic import BaseModel, Field from agno.api.schemas.utils import TelemetryRunEventType, get_sdk_version class TeamRunCreate(BaseModel): """Data sent to API to create a Team Run""" session_id: str run_id: Optional[str] = None data: Optional[Dict[Any, An...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/evals.py
libs/agno/agno/api/schemas/evals.py
from typing import Any, Dict, Optional from pydantic import BaseModel, Field from agno.api.schemas.utils import get_sdk_version from agno.db.schemas.evals import EvalType class EvalRunCreate(BaseModel): """Data sent to the telemetry API to create an Eval run event""" run_id: str eval_type: EvalType ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/os.py
libs/agno/agno/api/schemas/os.py
from typing import Any, Dict, Optional from pydantic import BaseModel, Field from agno.api.schemas.utils import get_sdk_version class OSLaunch(BaseModel): """Data sent to API to create an OS Launch""" os_id: Optional[str] = None data: Optional[Dict[Any, Any]] = None sdk_version: str = Field(defaul...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/__init__.py
libs/agno/agno/api/schemas/__init__.py
from enum import Enum from agno.api.schemas.agent import AgentRunCreate from agno.api.schemas.evals import EvalRunCreate from agno.api.schemas.os import OSLaunch from agno.api.schemas.team import TeamRunCreate from agno.api.schemas.workflows import WorkflowRunCreate __all__ = ["AgentRunCreate", "OSLaunch", "EvalRunCr...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/agent.py
libs/agno/agno/api/schemas/agent.py
from typing import Any, Dict, Optional from pydantic import BaseModel, Field from agno.api.schemas.utils import TelemetryRunEventType, get_sdk_version class AgentRunCreate(BaseModel): """Data sent to API to create an Agent Run""" session_id: str run_id: Optional[str] = None data: Optional[Dict[Any,...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/api/schemas/workflows.py
libs/agno/agno/api/schemas/workflows.py
from typing import Any, Dict, Optional from pydantic import BaseModel, Field from agno.api.schemas.utils import TelemetryRunEventType, get_sdk_version class WorkflowRunCreate(BaseModel): """Data sent to API to create a Workflow Run""" session_id: str run_id: Optional[str] = None data: Optional[Dict...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/team/team.py
libs/agno/agno/team/team.py
from __future__ import annotations import asyncio import contextlib import json import time import warnings from collections import ChainMap, deque from concurrent.futures import Future from copy import copy from dataclasses import dataclass from os import getenv from textwrap import dedent from typing import ( An...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
true
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/team/__init__.py
libs/agno/agno/team/__init__.py
from agno.run.team import ( MemoryUpdateCompletedEvent, MemoryUpdateStartedEvent, ReasoningCompletedEvent, ReasoningStartedEvent, ReasoningStepEvent, RunCancelledEvent, RunCompletedEvent, RunContentEvent, RunErrorEvent, RunStartedEvent, TeamRunEvent, TeamRunOutput, Te...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/team/remote.py
libs/agno/agno/team/remote.py
import json import time from typing import TYPE_CHECKING, Any, AsyncIterator, Dict, List, Literal, Optional, Sequence, Tuple, Union, overload from pydantic import BaseModel from agno.media import Audio, File, Image, Video from agno.models.base import Model from agno.models.message import Message from agno.remote.base...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/session/summary.py
libs/agno/agno/session/summary.py
from dataclasses import dataclass from datetime import datetime from textwrap import dedent from typing import TYPE_CHECKING, Any, Dict, List, Optional, Type, Union from pydantic import BaseModel, Field from agno.models.base import Model from agno.models.utils import get_model from agno.run.agent import Message from ...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/session/team.py
libs/agno/agno/session/team.py
from __future__ import annotations from dataclasses import asdict, dataclass from typing import Any, Dict, List, Mapping, Optional, Tuple, Union from pydantic import BaseModel from agno.models.message import Message from agno.run.agent import RunOutput, RunStatus from agno.run.team import TeamRunOutput from agno.ses...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false
agno-agi/agno
https://github.com/agno-agi/agno/blob/26b9daa0fb760c3ad8384e1ba9218b1bce854535/libs/agno/agno/session/__init__.py
libs/agno/agno/session/__init__.py
from typing import Union from agno.session.agent import AgentSession from agno.session.summary import SessionSummaryManager from agno.session.team import TeamSession from agno.session.workflow import WorkflowSession Session = Union[AgentSession, TeamSession, WorkflowSession] __all__ = ["AgentSession", "TeamSession",...
python
Apache-2.0
26b9daa0fb760c3ad8384e1ba9218b1bce854535
2026-01-04T14:41:49.609528Z
false