sample_id stringlengths 21 196 | text stringlengths 105 936k | metadata dict | category stringclasses 6
values |
|---|---|---|---|
agno-agi/agno:libs/agno/tests/integration/models/ollama/test_thinking.py | import json
import os
import tempfile
import pytest
from agno.agent import Agent
from agno.db.json import JsonDb
from agno.models.message import Message
from agno.models.ollama import Ollama
from agno.run.agent import RunOutput
api_key = os.getenv("OLLAMA_API_KEY")
def _get_thinking_agent(**kwargs):
"""Create ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/models/ollama/test_thinking.py",
"license": "Apache License 2.0",
"lines": 106,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/tests/unit/tools/test_scrapegraph.py | """Unit tests for ScrapeGraphTools class."""
import json
import os
from unittest.mock import Mock, patch
import pytest
from agno.tools.scrapegraph import ScrapeGraphTools
@pytest.fixture
def mock_scrapegraph_client():
"""Create a mock ScrapeGraph client."""
mock_client = Mock()
# Simple mock responses... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/unit/tools/test_scrapegraph.py",
"license": "Apache License 2.0",
"lines": 159,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/agno/tools/mcp_toolbox.py | from typing import Any, Callable, Dict, List, Literal, Optional, Union
from warnings import warn
from agno.tools.function import Function
from agno.tools.mcp import MCPTools
from agno.utils.log import logger
try:
from toolbox_core import ToolboxClient # type: ignore
except ImportError:
raise ImportError("`to... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/tools/mcp_toolbox.py",
"license": "Apache License 2.0",
"lines": 245,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/tests/integration/teams/test_reasoning_content_default_COT.py | """Test for reasoning_content generation in different Agent configurations.
This test verifies that reasoning_content is properly populated in the RunOutput
for various Agent configurations, including:
- reasoning=True (with default model)
- reasoning_model=specified model
- streaming and non-streaming modes
"""
from... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/teams/test_reasoning_content_default_COT.py",
"license": "Apache License 2.0",
"lines": 131,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/tests/unit/db/test_sessions.py | from agno.session.agent import AgentSession
from agno.session.team import TeamSession
def test_agent_session_serialization_empty_runs():
sess1 = AgentSession(session_id="s3", runs=[])
dump = sess1.to_dict()
sess2 = AgentSession.from_dict(dump)
assert sess1 == sess2
def test_team_session_serializatio... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/unit/db/test_sessions.py",
"license": "Apache License 2.0",
"lines": 12,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/agno/models/cometapi/cometapi.py | from dataclasses import dataclass, field
from os import getenv
from typing import Any, Dict, List, Optional
import httpx
from agno.exceptions import ModelAuthenticationError
from agno.models.openai.like import OpenAILike
from agno.utils.log import log_debug
@dataclass
class CometAPI(OpenAILike):
"""
The Com... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/models/cometapi/cometapi.py",
"license": "Apache License 2.0",
"lines": 60,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/tests/integration/models/cometapi/test_basic.py | """Integration tests for CometAPI model provider."""
import pytest
from pydantic import BaseModel, Field
from agno.agent import Agent, RunOutput
from agno.db.sqlite import SqliteDb
from agno.models.cometapi import CometAPI
def _assert_metrics(response: RunOutput):
"""Helper function to assert response metrics a... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/models/cometapi/test_basic.py",
"license": "Apache License 2.0",
"lines": 247,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/tests/integration/knowledge/filters/test_agentic_filtering.py | import tempfile
from pathlib import Path
import pytest
from pydantic import BaseModel
from agno.agent import Agent
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.csv_reader import CSVReader
from agno.models.anthropic.claude import Claude
from agno.models.google.gemini import Gemini
from agn... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/knowledge/filters/test_agentic_filtering.py",
"license": "Apache License 2.0",
"lines": 191,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/agno/models/llama_cpp/llama_cpp.py | from dataclasses import dataclass
from agno.models.openai.like import OpenAILike
@dataclass
class LlamaCpp(OpenAILike):
"""
A class for interacting with LLMs using Llama CPP.
Attributes:
id (str): The id of the Llama CPP model. Default is "ggml-org/gpt-oss-20b-GGUF".
name (str): The name... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/models/llama_cpp/llama_cpp.py",
"license": "Apache License 2.0",
"lines": 16,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
agno-agi/agno:libs/agno/tests/integration/os/test_custom_fastapi_app.py | """Integration tests for custom FastAPI app scenarios with AgentOS."""
from contextlib import asynccontextmanager
from unittest.mock import Mock, patch
import pytest
from fastapi import FastAPI, HTTPException
from fastapi.testclient import TestClient
from starlette.middleware.cors import CORSMiddleware
from agno.age... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/os/test_custom_fastapi_app.py",
"license": "Apache License 2.0",
"lines": 671,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/tests/unit/knowledge/chunking/test_semantic_chunking.py | """Tests for SemanticChunking wrapper that adapts Agno embedders to chonkie."""
from dataclasses import dataclass
from types import SimpleNamespace
from typing import List
from unittest.mock import patch
import pytest
from agno.knowledge.chunking.semantic import SemanticChunking
from agno.knowledge.document.base imp... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/unit/knowledge/chunking/test_semantic_chunking.py",
"license": "Apache License 2.0",
"lines": 152,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/agno/models/nexus/nexus.py | from dataclasses import dataclass
from agno.models.openai.like import OpenAILike
@dataclass
class Nexus(OpenAILike):
"""
A class for interacting with LLMs using Nexus.
Attributes:
id (str): The id of the Nexus model to use. Default is "openai/gpt-4".
name (str): The name of this chat mod... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/models/nexus/nexus.py",
"license": "Apache License 2.0",
"lines": 16,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
agno-agi/agno:libs/agno/agno/tools/file_generation.py | import csv
import io
import json
from pathlib import Path
from typing import Any, Dict, List, Optional, Union
from uuid import uuid4
from agno.media import File
from agno.tools import Toolkit
from agno.tools.function import ToolResult
from agno.utils.log import log_debug, logger
try:
from reportlab.lib.pagesizes ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/tools/file_generation.py",
"license": "Apache License 2.0",
"lines": 292,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/tests/integration/agent/test_tool_hooks.py | from typing import Any, Callable, Dict
from unittest.mock import patch
import pytest
from agno.agent import Agent
from agno.run.agent import RunOutput
from agno.tools.decorator import tool
from agno.utils.log import logger
# --- Hooks Definition ---
def logger_hook(
function_name: str,
function_call: Calla... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/agent/test_tool_hooks.py",
"license": "Apache License 2.0",
"lines": 105,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/agno/os/routers/home.py | from typing import TYPE_CHECKING
from fastapi import APIRouter
if TYPE_CHECKING:
from agno.os.app import AgentOS
def get_home_router(os: "AgentOS") -> APIRouter:
router = APIRouter(tags=["Home"])
@router.get(
"/",
operation_id="get_api_info",
summary="API Information",
d... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/os/routers/home.py",
"license": "Apache License 2.0",
"lines": 44,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/models/siliconflow/siliconflow.py | from dataclasses import dataclass
from os import getenv
from typing import Any, Dict, Optional
from agno.exceptions import ModelAuthenticationError
from agno.models.openai.like import OpenAILike
@dataclass
class Siliconflow(OpenAILike):
"""
A class for interacting with Siliconflow API.
Attributes:
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/models/siliconflow/siliconflow.py",
"license": "Apache License 2.0",
"lines": 35,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/tests/integration/agent/test_dependencies.py | import json
from agno.agent import Agent, RunOutput
from agno.db.in_memory import InMemoryDb
from agno.models.openai.chat import OpenAIChat
from agno.run.base import RunContext
def test_dependencies():
agent = Agent(
model=OpenAIChat(id="gpt-4o-mini"),
dependencies={"robot_name": "Anna"},
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/agent/test_dependencies.py",
"license": "Apache License 2.0",
"lines": 265,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/tests/integration/agent/test_storage.py | import uuid
import pytest
from agno.agent.agent import Agent
from agno.models.openai.chat import OpenAIChat
from agno.run.base import RunStatus
@pytest.fixture
def agent(shared_db):
"""Create an agent with db and memory for testing."""
return Agent(
model=OpenAIChat(id="gpt-4o"),
db=shared_d... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/agent/test_storage.py",
"license": "Apache License 2.0",
"lines": 28,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/tests/integration/teams/test_dependencies.py | import json
from agno.agent import Agent
from agno.db.in_memory import InMemoryDb
from agno.models.openai.chat import OpenAIChat
from agno.run.base import RunContext
from agno.team import Team, TeamRunOutput
def test_dependencies():
team = Team(
members=[],
model=OpenAIChat(id="gpt-4o-mini"),
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/integration/teams/test_dependencies.py",
"license": "Apache License 2.0",
"lines": 310,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/tests/unit/agent/test_input_schema.py | from typing import List, Optional, TypedDict
import pytest
from pydantic import BaseModel, ConfigDict, Field
from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.utils.agent import validate_input
# TypedDict schemas
class ResearchTopicDict(TypedDict):
topic: str
focus_areas: List... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/tests/unit/agent/test_input_schema.py",
"license": "Apache License 2.0",
"lines": 358,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | test |
agno-agi/agno:libs/agno/agno/os/routers/health.py | from datetime import datetime, timezone
from fastapi import APIRouter
from agno.os.schema import HealthResponse
def get_health_router(health_endpoint: str = "/health") -> APIRouter:
router = APIRouter(tags=["Health"])
started_at = datetime.now(timezone.utc)
@router.get(
health_endpoint,
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/os/routers/health.py",
"license": "Apache License 2.0",
"lines": 24,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/tools/memory.py | import json
from textwrap import dedent
from typing import Any, List, Optional
from uuid import uuid4
from agno.db.base import BaseDb
from agno.db.schemas import UserMemory
from agno.run import RunContext
from agno.tools import Toolkit
from agno.utils.log import log_debug, log_error
class MemoryTools(Toolkit):
d... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/tools/memory.py",
"license": "Apache License 2.0",
"lines": 345,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/tools/workflow.py | import json
from textwrap import dedent
from typing import Any, Dict, Optional
from pydantic import BaseModel, Field
from agno.run import RunContext
from agno.tools import Toolkit
from agno.utils.log import log_debug, log_error
from agno.workflow.workflow import Workflow, WorkflowRunOutput
class RunWorkflowInput(Ba... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/tools/workflow.py",
"license": "Apache License 2.0",
"lines": 246,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno: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... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/api/os.py",
"license": "Apache License 2.0",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno: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... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/api/schemas/os.py",
"license": "Apache License 2.0",
"lines": 8,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno: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.
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/api/schemas/utils.py",
"license": "Apache License 2.0",
"lines": 15,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno: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... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/api/settings.py",
"license": "Apache License 2.0",
"lines": 37,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno: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... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/api/workflow.py",
"license": "Apache License 2.0",
"lines": 24,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/cloud/aws/base.py | from typing import Any, Optional
from pydantic import BaseModel, ConfigDict
from agno.cloud.aws.s3.api_client import AwsApiClient
from agno.utils.log import logger
class AwsResource(BaseModel):
"""Base class for AWS Resources."""
# Resource name (required)
name: str
# Resource type
resource_ty... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/cloud/aws/base.py",
"license": "Apache License 2.0",
"lines": 166,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/cloud/aws/s3/bucket.py | from typing import Any, Dict, List, Optional
from typing_extensions import Literal
from agno.cloud.aws.base import AwsResource
from agno.cloud.aws.s3.api_client import AwsApiClient
from agno.cloud.aws.s3.object import S3Object
from agno.utils.log import logger
class S3Bucket(AwsResource):
"""
Reference:
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/cloud/aws/s3/bucket.py",
"license": "Apache License 2.0",
"lines": 169,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/cloud/aws/s3/object.py | from pathlib import Path
from typing import Any, Optional
from agno.cloud.aws.base import AwsResource
from agno.cloud.aws.s3.api_client import AwsApiClient
from agno.utils.log import logger
class S3Object(AwsResource):
"""
Reference:
- https://boto3.amazonaws.com/v1/documentation/api/latest/reference/ser... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/cloud/aws/s3/object.py",
"license": "Apache License 2.0",
"lines": 45,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | documentation |
agno-agi/agno:libs/agno/agno/db/base.py | from abc import ABC, abstractmethod
from datetime import date, datetime
from enum import Enum
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Set, Tuple, Union
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.schemas import UserMemory
from agno.db.sch... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/base.py",
"license": "Apache License 2.0",
"lines": 1540,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/dynamo/dynamo.py | import json
import time
from datetime import date, datetime, timedelta, timezone
from os import getenv
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, SessionType
from agno.db.dynamo.schemas i... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/dynamo/dynamo.py",
"license": "Apache License 2.0",
"lines": 2376,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/dynamo/schemas.py | """Table schemas and related utils used by the DynamoDb class"""
from typing import Any, Dict
SESSION_TABLE_SCHEMA = {
"TableName": "agno_sessions",
"KeySchema": [{"AttributeName": "session_id", "KeyType": "HASH"}],
"AttributeDefinitions": [
{"AttributeName": "session_id", "AttributeType": "S"},
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/dynamo/schemas.py",
"license": "Apache License 2.0",
"lines": 427,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/dynamo/utils.py | import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Callable, Dict, List, Optional, Union
from uuid import uuid4
from agno.db.base import SessionType
from agno.db.schemas.culture import CulturalKnowledge
from agno.db.schemas.evals import EvalRunRecord
from agno.db.s... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/dynamo/utils.py",
"license": "Apache License 2.0",
"lines": 620,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/firestore/firestore.py | import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union, cast
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, SessionType
from agno.db.firestore... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/firestore/firestore.py",
"license": "Apache License 2.0",
"lines": 2017,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/firestore/schemas.py | """Firestore collection schemas and related utilities"""
from typing import Any, Dict, List
SESSION_COLLECTION_SCHEMA = [
{"key": "session_id"},
{"key": "user_id"},
{"key": "session_type"},
{"key": "agent_id"},
{"key": "team_id"},
{"key": "workflow_id"},
{"key": "created_at"},
{"key": ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/firestore/schemas.py",
"license": "Apache License 2.0",
"lines": 168,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/firestore/utils.py | """Utility functions for the Firestore database class."""
import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from agno.db.firestore.schemas import get_collection_indexes
from agno.db.schemas.culture import CulturalKnowle... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/firestore/utils.py",
"license": "Apache License 2.0",
"lines": 309,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/gcs_json/gcs_json_db.py | import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, SessionType
from agno.db.gcs_json.utils ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/gcs_json/gcs_json_db.py",
"license": "Apache License 2.0",
"lines": 1553,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/gcs_json/utils.py | """Utility functions for the GCS JSON database class."""
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from agno.db.schemas.culture import CulturalKnowledge
from agno.db.utils import get_sort_value
from agno.utils.log import lo... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/gcs_json/utils.py",
"license": "Apache License 2.0",
"lines": 194,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/in_memory/in_memory_db.py | import time
from copy import deepcopy
from datetime import date, datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
from agno.db.base import BaseDb, SessionType
from agno.db.in_memory.utils import (
apply_sorting,
calculate_date_metric... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/in_memory/in_memory_db.py",
"license": "Apache License 2.0",
"lines": 1143,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/in_memory/utils.py | """Utility functions for the in-memory database class."""
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from agno.db.schemas.culture import CulturalKnowledge
from agno.db.utils import get_sort_value
from agno.utils.log import l... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/in_memory/utils.py",
"license": "Apache License 2.0",
"lines": 196,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/json/json_db.py | import json
import os
import time
from datetime import date, datetime, timedelta, timezone
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, Sessi... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/json/json_db.py",
"license": "Apache License 2.0",
"lines": 1517,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/json/utils.py | """Utility functions for the JSON database class."""
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from agno.db.schemas.culture import CulturalKnowledge
from agno.db.utils import get_sort_value
from agno.utils.log import log_de... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/json/utils.py",
"license": "Apache License 2.0",
"lines": 196,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/mongo/mongo.py | import time
from datetime import date, datetime, timedelta, timezone
from importlib import metadata
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
try:
from pymongo.errors import DuplicateKeyError
except ImportError:
DuplicateKeyError = Exception # type: ignor... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/mongo/mongo.py",
"license": "Apache License 2.0",
"lines": 2253,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/mongo/schemas.py | """MongoDB collection schemas and related utilities"""
from typing import Any, Dict, List
SESSION_COLLECTION_SCHEMA = [
{"key": "session_id", "unique": True},
{"key": "user_id"},
{"key": "session_type"},
{"key": "agent_id"},
{"key": "team_id"},
{"key": "workflow_id"},
{"key": "created_at"}... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/mongo/schemas.py",
"license": "Apache License 2.0",
"lines": 121,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/mongo/utils.py | """Utility functions for the MongoDB database class."""
import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from agno.db.mongo.schemas import get_collection_indexes
from agno.db.schemas.culture import CulturalKnowledge
fr... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/mongo/utils.py",
"license": "Apache License 2.0",
"lines": 223,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/mysql/mysql.py | import time
from datetime import date, datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Tuple, Union
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, SessionType
from agno.db.migrations.manage... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/mysql/mysql.py",
"license": "Apache License 2.0",
"lines": 2552,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/mysql/schemas.py | """Table schemas and related utils used by the MySQLDb class"""
from typing import Any
try:
from sqlalchemy.types import JSON, BigInteger, Boolean, Date, String, Text
except ImportError:
raise ImportError("`sqlalchemy` not installed. Please install it using `pip install sqlalchemy`")
SESSION_TABLE_SCHEMA = {... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/mysql/schemas.py",
"license": "Apache License 2.0",
"lines": 177,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/mysql/utils.py | """Utility functions for the MySQL database class."""
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from agno.db.mysql.schemas import get_table_schema_definition
from agno.db.schemas.culture import CulturalKnowledge
from agno.u... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/mysql/utils.py",
"license": "Apache License 2.0",
"lines": 397,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/postgres/postgres.py | import time
from datetime import date, datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Set, Tuple, Union, cast
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, ComponentType, SessionType
from... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/postgres/postgres.py",
"license": "Apache License 2.0",
"lines": 4254,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/postgres/schemas.py | """Table schemas and related utils used by the PostgresDb class"""
from typing import Any
try:
from sqlalchemy.dialects.postgresql import JSONB
from sqlalchemy.types import BigInteger, Boolean, Date, Integer, String, Text
except ImportError:
raise ImportError("`sqlalchemy` not installed. Please install it... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/postgres/schemas.py",
"license": "Apache License 2.0",
"lines": 324,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/postgres/utils.py | """Utility functions for the Postgres database class."""
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from sqlalchemy import Engine
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession
from agno.db.postgres.schemas im... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/postgres/utils.py",
"license": "Apache License 2.0",
"lines": 366,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/redis/redis.py | import time
from datetime import date, datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, SessionType
from agno.db.redis.utils import (
ap... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/redis/redis.py",
"license": "Apache License 2.0",
"lines": 1814,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/redis/schemas.py | """Table schemas and related utils used by the RedisDb class"""
from typing import Any
SESSION_SCHEMA = {
"session_id": {"type": "string", "primary_key": True},
"session_type": {"type": "string"},
"agent_id": {"type": "string"},
"team_id": {"type": "string"},
"workflow_id": {"type": "string"},
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/redis/schemas.py",
"license": "Apache License 2.0",
"lines": 142,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/redis/utils.py | """Utility functions for the Redis database class."""
import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional, Union
from uuid import UUID
from agno.db.schemas.culture import CulturalKnowledge
from agno.db.utils import get_sort_value
from agno.util... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/redis/utils.py",
"license": "Apache License 2.0",
"lines": 277,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/schemas/evals.py | from enum import Enum
from typing import Any, Dict, Optional
from pydantic import BaseModel
class EvalType(str, Enum):
ACCURACY = "accuracy"
AGENT_AS_JUDGE = "agent_as_judge"
PERFORMANCE = "performance"
RELIABILITY = "reliability"
class EvalFilterType(str, Enum):
AGENT = "agent"
TEAM = "tea... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/schemas/evals.py",
"license": "Apache License 2.0",
"lines": 25,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/schemas/knowledge.py | from datetime import datetime
from typing import Any, Dict, Optional
from pydantic import BaseModel, ConfigDict, model_validator
class KnowledgeRow(BaseModel):
"""Knowledge Row that is stored in the database"""
# id for this knowledge, auto-generated if not provided
id: Optional[str] = None
name: st... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/schemas/knowledge.py",
"license": "Apache License 2.0",
"lines": 30,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/schemas/memory.py | from dataclasses import dataclass
from datetime import datetime
from typing import Any, Dict, List, Optional
from agno.utils.dttm import now_epoch_s, to_epoch_s
@dataclass
class UserMemory:
"""Model for User Memories"""
memory: str
memory_id: Optional[str] = None
topics: Optional[List[str]] = None
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/schemas/memory.py",
"license": "Apache License 2.0",
"lines": 47,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/singlestore/schemas.py | """Table schemas and related utils used by the SingleStoreDb class"""
from typing import Any
try:
from sqlalchemy.types import JSON, BigInteger, Boolean, Date, String, Text
except ImportError:
raise ImportError("`sqlalchemy` not installed. Please install it using `pip install sqlalchemy`")
SESSION_TABLE_SCHE... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/singlestore/schemas.py",
"license": "Apache License 2.0",
"lines": 171,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/db/singlestore/singlestore.py | import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, SessionType
from agno.db.migrations.mana... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/singlestore/singlestore.py",
"license": "Apache License 2.0",
"lines": 2511,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/singlestore/utils.py | """Utility functions for the SingleStore database class."""
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from sqlalchemy import Engine
from agno.db.schemas.culture import CulturalKnowledge
from agno.db.singlestore.schemas imp... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/singlestore/utils.py",
"license": "Apache License 2.0",
"lines": 315,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/sqlite/schemas.py | """Table schemas and related utils used by the SqliteDb class"""
from typing import Any
try:
from sqlalchemy.types import JSON, BigInteger, Boolean, Date, String
except ImportError:
raise ImportError("`sqlalchemy` not installed. Please install it using `pip install sqlalchemy`")
SESSION_TABLE_SCHEMA = {
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/sqlite/schemas.py",
"license": "Apache License 2.0",
"lines": 310,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/sqlite/sqlite.py | import time
from datetime import date, datetime, timedelta, timezone
from pathlib import Path
from typing import TYPE_CHECKING, Any, Dict, List, Optional, Sequence, Set, Tuple, Union, cast
from uuid import uuid4
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
from agno.db.base import BaseDb, Compon... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/sqlite/sqlite.py",
"license": "Apache License 2.0",
"lines": 4104,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/sqlite/utils.py | import json
import time
from datetime import date, datetime, timedelta, timezone
from typing import Any, Dict, List, Optional
from uuid import uuid4
from sqlalchemy.ext.asyncio import AsyncEngine, AsyncSession
from agno.db.schemas.culture import CulturalKnowledge
from agno.db.sqlite.schemas import get_table_schema_de... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/sqlite/utils.py",
"license": "Apache License 2.0",
"lines": 351,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/db/utils.py | """Logic shared across different database implementations"""
import json
from datetime import date, datetime
from typing import TYPE_CHECKING, Any, Dict, Optional, Union
from uuid import UUID
from agno.metrics import ModelMetrics, RunMetrics, SessionMetrics
from agno.models.message import Message
from agno.utils.log ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/db/utils.py",
"license": "Apache License 2.0",
"lines": 153,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/chunking/markdown.py | import os
import re
import tempfile
from typing import List, Union
try:
from unstructured.chunking.title import chunk_by_title # type: ignore
from unstructured.partition.md import partition_md # type: ignore
except ImportError:
raise ImportError("`unstructured` not installed. Please install it using `pip... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/chunking/markdown.py",
"license": "Apache License 2.0",
"lines": 273,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/chunking/row.py | from typing import List
from agno.knowledge.chunking.strategy import ChunkingStrategy
from agno.knowledge.document.base import Document
class RowChunking(ChunkingStrategy):
def __init__(self, skip_header: bool = False, clean_rows: bool = True):
self.skip_header = skip_header
self.clean_rows = cle... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/chunking/row.py",
"license": "Apache License 2.0",
"lines": 31,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/knowledge/chunking/semantic.py | from typing import Any, Dict, List, Literal, Optional, Union
try:
import numpy as np
except ImportError:
raise ImportError("`numpy` not installed. Please install using `pip install numpy`")
try:
from chonkie import SemanticChunker
from chonkie.embeddings.base import BaseEmbeddings
except ImportError:
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/chunking/semantic.py",
"license": "Apache License 2.0",
"lines": 141,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/chunking/strategy.py | import hashlib
from abc import ABC, abstractmethod
from enum import Enum
from typing import List, Optional
from agno.knowledge.document.base import Document
class ChunkingStrategy(ABC):
"""Base class for chunking strategies"""
@abstractmethod
def chunk(self, document: Document) -> List[Document]:
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/chunking/strategy.py",
"license": "Apache License 2.0",
"lines": 167,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/content.py | from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, List, Optional, Union
from agno.knowledge.reader import Reader
from agno.knowledge.remote_content.remote_content import RemoteContent
class ContentStatus(str, Enum):
"""Enumeration of possible content processing statuses."""
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/content.py",
"license": "Apache License 2.0",
"lines": 63,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/knowledge/document/base.py | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional
from agno.knowledge.embedder import Embedder
@dataclass
class Document:
"""Dataclass for managing a document"""
content: str
id: Optional[str] = None
name: Optional[str] = None
meta_data: Dict[str, Any] = field... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/document/base.py",
"license": "Apache License 2.0",
"lines": 46,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/knowledge/embedder/aws_bedrock.py | import json
from dataclasses import dataclass
from os import getenv
from typing import Any, Dict, List, Literal, Optional, Tuple
from agno.exceptions import AgnoError, ModelProviderError
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import log_error, log_warning
try:
from boto3 import clie... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/aws_bedrock.py",
"license": "Apache License 2.0",
"lines": 485,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/azure_openai.py | from dataclasses import dataclass
from os import getenv
from typing import Any, Dict, List, Optional, Tuple
from typing_extensions import Literal
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import logger
try:
from openai import AsyncAzureOpenAI as AsyncAzureOpenAIClient
from openai ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/azure_openai.py",
"license": "Apache License 2.0",
"lines": 178,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/base.py | from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple
@dataclass
class Embedder:
"""Base class for managing embedders"""
dimensions: Optional[int] = 1536
enable_batch: bool = False
batch_size: int = 100 # Number of texts to process in each API call
def get_embedding(s... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/base.py",
"license": "Apache License 2.0",
"lines": 16,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/knowledge/embedder/cohere.py | import time
from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple, Union
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import log_debug, log_error, log_info, log_warning
try:
from cohere import AsyncClient as AsyncCohereClient
from cohere import Client a... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/cohere.py",
"license": "Apache License 2.0",
"lines": 276,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/fastembed.py | from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import logger
try:
import numpy as np
except ImportError:
raise ImportError("numpy not installed, use `pip install numpy`")
try:
from fastembed import T... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/fastembed.py",
"license": "Apache License 2.0",
"lines": 50,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/knowledge/embedder/google.py | from dataclasses import dataclass
from os import getenv
from typing import Any, Dict, List, Optional, Tuple
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import log_error, log_info, log_warning
try:
from google import genai
from google.genai import Client as GeminiClient
from googl... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/google.py",
"license": "Apache License 2.0",
"lines": 218,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/huggingface.py | from dataclasses import dataclass
from os import getenv
from typing import Any, Dict, List, Optional, Tuple
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import log_error, log_warning
try:
from huggingface_hub import AsyncInferenceClient, InferenceClient
except ImportError:
log_error("... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/huggingface.py",
"license": "Apache License 2.0",
"lines": 81,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/jina.py | from dataclasses import dataclass
from os import getenv
from typing import Any, Dict, List, Optional, Tuple
from typing_extensions import Literal
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import logger
try:
import requests
except ImportError:
raise ImportError("`requests` not inst... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/jina.py",
"license": "Apache License 2.0",
"lines": 155,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/langdb.py | from dataclasses import dataclass
from os import getenv
from typing import Optional
from agno.knowledge.embedder.openai import OpenAIEmbedder
@dataclass
class LangDBEmbedder(OpenAIEmbedder):
id: str = "text-embedding-ada-002"
dimensions: int = 1536
api_key: Optional[str] = getenv("LANGDB_API_KEY")
pr... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/langdb.py",
"license": "Apache License 2.0",
"lines": 17,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/knowledge/embedder/mistral.py | from dataclasses import dataclass
from os import getenv
from typing import Any, Dict, List, Optional, Tuple
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import log_error, log_info, log_warning
try:
from mistralai import Mistral # type: ignore
from mistralai.models.embeddingresponse i... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/mistral.py",
"license": "Apache License 2.0",
"lines": 177,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/ollama.py | from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import log_error, logger
try:
import importlib.metadata as metadata
from ollama import AsyncClient as AsyncOllamaClient
from ollama import Client as ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/ollama.py",
"license": "Apache License 2.0",
"lines": 129,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/openai.py | from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple
from typing_extensions import Literal
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import log_info, log_warning
try:
from openai import AsyncOpenAI
from openai import OpenAI as OpenAIClient
from... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/openai.py",
"license": "Apache License 2.0",
"lines": 174,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/sentence_transformer.py | from dataclasses import dataclass
from typing import Dict, List, Optional, Tuple, Union
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import logger
try:
from sentence_transformers import SentenceTransformer
except ImportError:
raise ImportError("`sentence-transformers` not installed, ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/sentence_transformer.py",
"license": "Apache License 2.0",
"lines": 48,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/embedder/voyageai.py | from dataclasses import dataclass
from typing import Any, Dict, List, Optional, Tuple
from agno.knowledge.embedder.base import Embedder
from agno.utils.log import logger
try:
from voyageai import AsyncClient as AsyncVoyageClient
from voyageai import Client as VoyageClient
from voyageai.object import Embed... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/embedder/voyageai.py",
"license": "Apache License 2.0",
"lines": 142,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/knowledge.py | import asyncio
import hashlib
import io
import time
from dataclasses import dataclass
from enum import Enum
from io import BytesIO
from os.path import basename
from pathlib import Path
from typing import Any, Dict, List, Optional, Set, Tuple, Union, cast, overload
from httpx import AsyncClient
from agno.db.base impor... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/knowledge.py",
"license": "Apache License 2.0",
"lines": 2991,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/arxiv_reader.py | import asyncio
from typing import List, Optional
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Document
from agno.knowledge.reader.base import Reader
from agno.knowledge.types impo... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/arxiv_reader.py",
"license": "Apache License 2.0",
"lines": 64,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
agno-agi/agno:libs/agno/agno/knowledge/reader/base.py | import asyncio
from dataclasses import dataclass, field
from typing import Any, List, Optional
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyFactory, ChunkingStrategyType
from agno.knowledge.document.base import Document
from ... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/base.py",
"license": "Apache License 2.0",
"lines": 82,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/csv_reader.py | import asyncio
import csv
import io
from pathlib import Path
from typing import IO, Any, List, Optional, Union
from uuid import uuid4
try:
import aiofiles
except ImportError:
raise ImportError("`aiofiles` not installed. Please install it with `pip install aiofiles`")
from agno.knowledge.chunking.row import Ro... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/csv_reader.py",
"license": "Apache License 2.0",
"lines": 186,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/docx_reader.py | import asyncio
from pathlib import Path
from typing import IO, Any, List, Optional, Union
from uuid import uuid4
from agno.knowledge.chunking.document import DocumentChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Document
from agno.... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/docx_reader.py",
"license": "Apache License 2.0",
"lines": 69,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/firecrawl_reader.py | import asyncio
from dataclasses import dataclass
from typing import Dict, List, Literal, Optional
from agno.knowledge.chunking.semantic import SemanticChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Document
from agno.knowledge.reade... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/firecrawl_reader.py",
"license": "Apache License 2.0",
"lines": 163,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/json_reader.py | import asyncio
import json
from pathlib import Path
from typing import IO, Any, List, Optional, Union
from uuid import uuid4
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Document
... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/json_reader.py",
"license": "Apache License 2.0",
"lines": 70,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/markdown_reader.py | import asyncio
import uuid
from pathlib import Path
from typing import IO, Any, List, Optional, Union
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Document
from agno.knowledge.reader.base import Reader
from agno.knowledge.types import Cont... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/markdown_reader.py",
"license": "Apache License 2.0",
"lines": 112,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/pdf_reader.py | import asyncio
import re
from pathlib import Path
from typing import IO, Any, List, Optional, Tuple, Union
from uuid import uuid4
from agno.knowledge.chunking.document import DocumentChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Do... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/pdf_reader.py",
"license": "Apache License 2.0",
"lines": 387,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/reader_factory.py | import os
from typing import Any, Callable, Dict, List, Optional
from agno.knowledge.reader.base import Reader
class ReaderFactory:
"""Factory for creating and managing document readers with lazy loading."""
# Cache for instantiated readers
_reader_cache: Dict[str, Reader] = {}
# Static metadata fo... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/reader_factory.py",
"license": "Apache License 2.0",
"lines": 382,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/s3_reader.py | import asyncio
from io import BytesIO
from pathlib import Path
from typing import List, Optional
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Document
from agno.knowledge.reader.b... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/s3_reader.py",
"license": "Apache License 2.0",
"lines": 65,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/text_reader.py | import asyncio
import uuid
from pathlib import Path
from typing import IO, Any, List, Optional, Union
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document.base import Document
from agno.knowledge.rea... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/text_reader.py",
"license": "Apache License 2.0",
"lines": 97,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/web_search_reader.py | import asyncio
import random
import time
from dataclasses import dataclass, field
from typing import Dict, List, Literal, Optional, Set
from urllib.parse import urlparse
import httpx
from agno.knowledge.chunking.semantic import SemanticChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingSt... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/web_search_reader.py",
"license": "Apache License 2.0",
"lines": 252,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_complex |
agno-agi/agno:libs/agno/agno/knowledge/reader/wikipedia_reader.py | import asyncio
from typing import List, Optional
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.chunking.strategy import ChunkingStrategy, ChunkingStrategyType
from agno.knowledge.document import Document
from agno.knowledge.reader.base import Reader
from agno.knowledge.types import Co... | {
"repo_id": "agno-agi/agno",
"file_path": "libs/agno/agno/knowledge/reader/wikipedia_reader.py",
"license": "Apache License 2.0",
"lines": 77,
"canary_id": -1,
"canary_value": "",
"pii_type": "",
"provider": "",
"regex_pattern": "",
"repetition": -1,
"template": ""
} | function_simple |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.