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/tests/unit/app/test_agui_app.py | libs/agno/tests/unit/app/test_agui_app.py | from unittest.mock import MagicMock
import pytest
from ag_ui.core import EventType
from agno.os.interfaces.agui.utils import EventBuffer, async_stream_agno_response_as_agui_events
from agno.run.agent import RunContentEvent, ToolCallCompletedEvent, ToolCallStartedEvent
def test_event_buffer_initial_state():
"""T... | 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/tests/unit/db/test_postgres.py | libs/agno/tests/unit/db/test_postgres.py | from unittest.mock import Mock, patch
import pytest
from sqlalchemy.engine import Engine
from sqlalchemy.orm import Session
from sqlalchemy.schema import Index, Table, UniqueConstraint
from agno.db.postgres.postgres import PostgresDb
from agno.db.postgres.schemas import (
EVAL_TABLE_SCHEMA,
KNOWLEDGE_TABLE_SC... | 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/tests/unit/db/test_sessions.py | 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... | 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/tests/unit/db/test_user_memory.py | libs/agno/tests/unit/db/test_user_memory.py | from datetime import datetime, timezone
from agno.db.schemas import UserMemory
def test_user_memory_from_dict_handles_epoch_ints():
memory = UserMemory.from_dict(
{
"memory_id": "m1",
"memory": "hello",
"created_at": 1_700_000_000,
"updated_at": 1_700_000_1... | 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/tests/unit/db/__init__.py | libs/agno/tests/unit/db/__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/tests/unit/db/test_async_mongo.py | libs/agno/tests/unit/db/test_async_mongo.py | import asyncio
from unittest.mock import Mock, patch
import pytest
from pymongo import AsyncMongoClient
from agno.db.mongo import AsyncMongoDb
def test_id_is_deterministic():
"""Test that two db instances with same URL have same ID"""
db1 = AsyncMongoDb(db_url="mongodb://localhost:27017", db_name="test_db")... | 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/tests/unit/knowledge/test_knowledge_content_hash.py | libs/agno/tests/unit/knowledge/test_knowledge_content_hash.py | """Tests for Knowledge._build_content_hash() method, verifying hash includes name and description."""
from agno.knowledge.content import Content, FileData
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.base import VectorDb
class MockVectorDb(VectorDb):
"""Minimal VectorDb stub for testing."""
... | 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/tests/unit/knowledge/test_knowledge_encoding.py | libs/agno/tests/unit/knowledge/test_knowledge_encoding.py | from typing import Any, Dict, List, Optional
import pytest
from agno.knowledge.document import Document
from agno.knowledge.knowledge import Knowledge
from agno.vectordb.base import VectorDb
class MockVectorDb(VectorDb):
"""Minimal in-memory VectorDb stub to capture inserts for assertions."""
def __init__(... | 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/tests/unit/knowledge/test_knowledge_readers.py | libs/agno/tests/unit/knowledge/test_knowledge_readers.py | """Tests for Knowledge.get_readers() method, specifically testing list to dict conversion."""
from agno.knowledge.knowledge import Knowledge
from agno.knowledge.reader.base import Reader
from agno.knowledge.reader.text_reader import TextReader
from agno.vectordb.base import VectorDb
class MockVectorDb(VectorDb):
... | 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/tests/unit/knowledge/chunking/test_semantic_chunking.py | 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... | 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/tests/unit/compression/__init__.py | libs/agno/tests/unit/compression/__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/tests/unit/compression/test_compression_manager.py | libs/agno/tests/unit/compression/test_compression_manager.py | import pytest
from agno.models.message import Message
@pytest.mark.asyncio
async def test_ashould_compress_below_token_limit():
"""Test async should_compress returns False when below token limit."""
from agno.compression.manager import CompressionManager
from agno.models.openai import OpenAIChat
mod... | 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/tests/unit/models/test_client_caching.py | libs/agno/tests/unit/models/test_client_caching.py | """
Tests for httpx client caching and resource leak prevention.
This test suite verifies that:
1. Global httpx clients are singletons and reused across models
2. OpenAI clients are cached per model instance
3. No new httpx clients are created on every request
"""
import os
import httpx
import pytest
# Set test API... | 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/tests/unit/models/test_generator_session_state.py | libs/agno/tests/unit/models/test_generator_session_state.py | """
Tests for session_state persistence in generator-based tools.
This test suite verifies that session_state modifications made during
generator iteration are properly captured and not overwritten by stale state.
The bug: When a tool is a generator function, updated_session_state was captured
before the generator 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/tests/unit/models/openai/test_client_persistence.py | libs/agno/tests/unit/models/openai/test_client_persistence.py | from agno.models.openai import OpenAIChat
class _FakeOpenAIClient:
def __init__(self, **kwargs):
self._closed = False
def is_closed(self):
return self._closed
class _FakeAsyncOpenAIClient:
def __init__(self, **kwargs):
self._closed = False
def is_closed(self):
retur... | 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/tests/unit/models/openai/test_openai_responses_id_handling.py | libs/agno/tests/unit/models/openai/test_openai_responses_id_handling.py | from typing import Any, Dict, List, Optional
from agno.models.message import Message
from agno.models.openai.responses import OpenAIResponses
from agno.models.response import ModelResponse
class _FakeError:
def __init__(self, message: str):
self.message = message
class _FakeOutputFunctionCall:
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/tests/unit/models/aws/__init__.py | libs/agno/tests/unit/models/aws/__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/tests/unit/models/aws/test_bedrock_streaming.py | libs/agno/tests/unit/models/aws/test_bedrock_streaming.py | """Unit tests for AWS Bedrock streaming response parsing, specifically tool call handling."""
from agno.models.aws import AwsBedrock
def test_parse_streaming_tool_call_with_single_chunk():
"""Test parsing a tool call where arguments come in a single chunk."""
model = AwsBedrock(id="anthropic.claude-3-sonnet-... | 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/tests/unit/models/google/test_gemini.py | libs/agno/tests/unit/models/google/test_gemini.py | from unittest.mock import MagicMock, patch
from agno.models.google.gemini import Gemini
def test_gemini_get_client_with_credentials_vertexai():
"""Test that credentials are correctly passed to the client when vertexai is True."""
mock_credentials = MagicMock()
model = Gemini(vertexai=True, project_id="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/tests/unit/memory/test_memory_manager_async.py | libs/agno/tests/unit/memory/test_memory_manager_async.py | from types import MethodType
from typing import TYPE_CHECKING, Dict, List, Optional, Tuple
import pytest
from agno.db.base import AsyncBaseDb
from agno.memory import MemoryManager, UserMemory
if TYPE_CHECKING:
from agno.tracing.schemas import Span, Trace
class DummyAsyncMemoryDb(AsyncBaseDb):
def __init__(... | 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/tests/unit/memory/test_memory_optimization.py | libs/agno/tests/unit/memory/test_memory_optimization.py | from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from agno.db.base import AsyncBaseDb, BaseDb
from agno.memory.manager import MemoryManager, UserMemory
from agno.memory.strategies import (
MemoryOptimizationStrategy,
MemoryOptimizationStrategyType,
)
@pytest.fixture
def mock_db():
db ... | 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/tests/unit/reader/test_youtube_reader.py | libs/agno/tests/unit/reader/test_youtube_reader.py | from unittest.mock import MagicMock, patch
import pytest
from agno.knowledge.document.base import Document
from agno.knowledge.reader.youtube_reader import YouTubeReader
@pytest.fixture
def mock_transcript():
return [
MagicMock(text="First segment", start=0.0, duration=2.0),
MagicMock(text="Seco... | 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/tests/unit/reader/test_arxiv_reader.py | libs/agno/tests/unit/reader/test_arxiv_reader.py | from unittest.mock import Mock, patch
import arxiv
import pytest
from agno.knowledge.reader.arxiv_reader import ArxivReader
@pytest.fixture
def mock_arxiv_result():
result = Mock()
result.title = "Test Paper"
result.summary = "This is a test paper abstract"
result.pdf_url = "https://arxiv.org/pdf/12... | 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/tests/unit/reader/test_pptx_reader.py | libs/agno/tests/unit/reader/test_pptx_reader.py | import asyncio
from io import BytesIO
from pathlib import Path
from unittest.mock import Mock, patch
import pytest
from agno.knowledge.document.base import Document
from agno.knowledge.reader.pptx_reader import PPTXReader
@pytest.fixture
def mock_pptx():
"""Mock a PPTX presentation with some slides and shapes""... | 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/tests/unit/reader/test_csv_field_label_reader.py | libs/agno/tests/unit/reader/test_csv_field_label_reader.py | import io
import tempfile
from pathlib import Path
import pytest
from agno.knowledge.reader.field_labeled_csv_reader import FieldLabeledCSVReader
# Sample CSV data
SAMPLE_CSV = """name,age,city
John,30,New York
Jane,25,San Francisco
Bob,40,Chicago"""
SAMPLE_CSV_COMPLEX = """product,"description with, comma",price
"... | 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/tests/unit/reader/test_website_reader.py | libs/agno/tests/unit/reader/test_website_reader.py | from unittest.mock import patch
import pytest
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.document.base import Document
from agno.knowledge.reader.website_reader import WebsiteReader
@pytest.fixture
def mock_html_content():
return """
<html>
<head><title>Test Page... | 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/tests/unit/reader/test_docx_reader.py | libs/agno/tests/unit/reader/test_docx_reader.py | import asyncio
from io import BytesIO
from pathlib import Path
from unittest.mock import Mock, patch
import pytest
from agno.knowledge.document.base import Document
from agno.knowledge.reader.docx_reader import DocxReader
@pytest.fixture
def mock_docx():
"""Mock a DOCX document with some paragraphs"""
mock_... | 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/tests/unit/reader/test_json_reader.py | libs/agno/tests/unit/reader/test_json_reader.py | import json
from io import BytesIO
from pathlib import Path
import pytest
from agno.knowledge.document.base import Document
from agno.knowledge.reader.json_reader import JSONReader
@pytest.fixture
def test_read_json_file_path(tmp_path):
# Create a temporary JSON file
json_path = tmp_path / "test.json"
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/tests/unit/reader/test_pdf_reader.py | libs/agno/tests/unit/reader/test_pdf_reader.py | import asyncio
from io import BytesIO
from pathlib import Path
import httpx
import pytest
from agno.knowledge.reader.pdf_reader import (
PDFImageReader,
PDFReader,
_clean_page_numbers,
)
@pytest.fixture(scope="session")
def sample_pdf_path(tmp_path_factory) -> Path:
# Use tmp_path_factory for sessio... | 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/tests/unit/reader/__init__.py | libs/agno/tests/unit/reader/__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/tests/unit/reader/test_tavily_reader.py | libs/agno/tests/unit/reader/test_tavily_reader.py | from unittest.mock import patch
import pytest
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.document.base import Document
from agno.knowledge.reader.tavily_reader import TavilyReader
@pytest.fixture
def mock_extract_response():
"""Mock response for extract method"""
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/tests/unit/reader/test_csv_reader.py | libs/agno/tests/unit/reader/test_csv_reader.py | import io
import tempfile
from pathlib import Path
import pytest
from agno.knowledge.document.base import Document
from agno.knowledge.reader.csv_reader import CSVReader
# Sample CSV data
SAMPLE_CSV = """name,age,city
John,30,New York
Jane,25,San Francisco
Bob,40,Chicago"""
SAMPLE_CSV_COMPLEX = """product,"descript... | 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/tests/unit/reader/test_text_reader.py | libs/agno/tests/unit/reader/test_text_reader.py | import asyncio
from io import BytesIO
from pathlib import Path
from typing import List
from unittest.mock import patch
import pytest
from agno.knowledge.document.base import Document
from agno.knowledge.reader.text_reader import TextReader
@pytest.fixture
def test_read_text_file_path(tmp_path):
# Create a tempo... | 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/tests/unit/reader/test_firecrawl_reader.py | libs/agno/tests/unit/reader/test_firecrawl_reader.py | from unittest.mock import patch
import pytest
from agno.knowledge.chunking.fixed import FixedSizeChunking
from agno.knowledge.document.base import Document
from agno.knowledge.reader.firecrawl_reader import FirecrawlReader
@pytest.fixture
def mock_scrape_response():
"""Mock response for scrape_url method"""
... | 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/tests/unit/utils/test_string.py | libs/agno/tests/unit/utils/test_string.py | from typing import List, Optional
from pydantic import BaseModel
from agno.utils.string import parse_response_model_str, url_safe_string
def test_url_safe_string_spaces():
"""Test conversion of spaces to dashes"""
assert url_safe_string("hello world") == "hello-world"
def test_url_safe_string_camel_case()... | 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/tests/unit/utils/test_audio_utils.py | libs/agno/tests/unit/utils/test_audio_utils.py | import base64
import os
import tempfile
from pathlib import Path
from unittest.mock import patch
import pytest
from agno.utils.audio import write_audio_to_file
def test_write_audio_to_file_basic():
"""Test basic audio file writing functionality."""
# Create test audio data
test_audio_data = b"test audio... | 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/tests/unit/utils/test_openai.py | libs/agno/tests/unit/utils/test_openai.py | ##test
import base64
import os
from pathlib import Path
from unittest.mock import patch
import pytest
from agno.media import Audio, File, Image
from agno.utils.openai import _format_file_for_message, audio_to_message, images_to_message
# Helper function to create dummy file
def create_dummy_file(path: Path, conten... | 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/tests/unit/utils/test_logging.py | libs/agno/tests/unit/utils/test_logging.py | from unittest.mock import Mock
from agno.utils import log as log_module
from agno.utils.log import configure_agno_logging
def test_configure_agno_logging_sets_global_logger():
"""Test that configure_agno_logging can set the global logger."""
mock_logger = Mock()
original_logger = log_module.logger
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/tests/unit/utils/test_schema_utils.py | libs/agno/tests/unit/utils/test_schema_utils.py | """Tests for schema_utils module"""
from typing import Dict, List, Optional
from pydantic import BaseModel, Field
from agno.utils.models.schema_utils import (
_normalize_for_gemini,
_normalize_for_openai,
get_dict_value_type,
get_response_schema_for_provider,
is_dict_field,
)
class SimpleModel(... | 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/tests/unit/utils/test_model_string.py | libs/agno/tests/unit/utils/test_model_string.py | import pytest
from agno.agent import Agent
from agno.culture.manager import CultureManager
from agno.knowledge.chunking.agentic import AgenticChunking
from agno.memory.manager import MemoryManager
from agno.models.anthropic import Claude
from agno.models.google import Gemini
from agno.models.groq import Groq
from 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/tests/unit/utils/test_openai_responses.py | libs/agno/tests/unit/utils/test_openai_responses.py | """Tests for openai_responses module"""
import copy
from typing import Dict, List, Optional
from pydantic import BaseModel, Field
from agno.utils.models.openai_responses import sanitize_response_schema
class SimpleModel(BaseModel):
name: str = Field(..., description="Name field")
age: int = Field(..., desc... | 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/tests/unit/utils/test_functions.py | libs/agno/tests/unit/utils/test_functions.py | import json
from typing import Dict
import pytest
from agno.tools.function import Function, FunctionCall
from agno.utils.functions import get_function_call
@pytest.fixture
def sample_functions() -> Dict[str, Function]:
return {
"test_function": Function(
name="test_function",
des... | 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/tests/unit/utils/test_team.py | libs/agno/tests/unit/utils/test_team.py | import uuid
from unittest.mock import patch
import pytest
from agno.agent.agent import Agent
from agno.models.openai import OpenAIChat
from agno.team.team import Team
from agno.utils.team import get_member_id
@pytest.fixture
def team_show_member_responses_true():
agent = Agent(name="Test Agent", model=OpenAICha... | 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/tests/unit/utils/test_gemini.py | libs/agno/tests/unit/utils/test_gemini.py | from agno.utils.gemini import (
convert_schema,
format_function_definitions,
needs_conversion,
prepare_response_schema,
)
def test_convert_schema_simple_string():
"""Test converting a simple string schema"""
schema_dict = {"type": "string", "description": "A string field"}
result = 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/tests/unit/utils/test_tokens.py | libs/agno/tests/unit/utils/test_tokens.py | import pytest
from agno.media import Audio, File, Image, Video
from agno.models.message import Message
from agno.utils.tokens import (
count_audio_tokens,
count_file_tokens,
count_image_tokens,
count_schema_tokens,
count_text_tokens,
count_tokens,
count_video_tokens,
)
def test_count_text... | 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/tests/unit/utils/__init__.py | libs/agno/tests/unit/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/tests/unit/utils/test_media_reconstruction.py | libs/agno/tests/unit/utils/test_media_reconstruction.py | import base64
from agno.media import Audio, File, Image, Video
from agno.run.agent import RunInput, RunOutput
from agno.utils.media import (
reconstruct_audio_from_dict,
reconstruct_audio_list,
reconstruct_file_from_dict,
reconstruct_files,
reconstruct_image_from_dict,
reconstruct_images,
r... | 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/tests/unit/utils/test_json_schema.py | libs/agno/tests/unit/utils/test_json_schema.py | from dataclasses import dataclass, field
from typing import Any, Dict, List, Optional, Union
from pydantic import BaseModel
from agno.utils.json_schema import (
get_json_schema,
get_json_schema_for_arg,
get_json_type_for_py_type,
is_origin_union_type,
)
# Test models and dataclasses
class MockPydant... | 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/tests/unit/utils/test_stringify_input_content.py | libs/agno/tests/unit/utils/test_stringify_input_content.py | """
Unit tests for agno.os.utils functions.
Tests the stringify_input_content and get_run_input utility functions.
"""
import json
import pytest
from agno.models.message import Message
from agno.os.utils import get_run_input, stringify_input_content
def test_stringify_string_input():
"""Test that string input... | 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/tests/unit/utils/test_gemini_dict_support.py | libs/agno/tests/unit/utils/test_gemini_dict_support.py | """Tests for Gemini Dict field support in convert_schema"""
from agno.utils.gemini import convert_schema
def test_convert_schema_dict_field_integer():
"""Test converting Dict[str, int] field creates placeholder properties"""
dict_schema = {"type": "object", "additionalProperties": {"type": "integer"}, "descr... | 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/tests/unit/reasoning/test_reasoning_checkers.py | libs/agno/tests/unit/reasoning/test_reasoning_checkers.py | """Unit tests for reasoning model checker functions."""
from agno.reasoning.anthropic import is_anthropic_reasoning_model
from agno.reasoning.azure_ai_foundry import is_ai_foundry_reasoning_model
from agno.reasoning.deepseek import is_deepseek_reasoning_model
from agno.reasoning.gemini import is_gemini_reasoning_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/tests/unit/reasoning/__init__.py | libs/agno/tests/unit/reasoning/__init__.py | """Unit tests for reasoning module."""
| 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/tests/unit/reasoning/test_reasoning_streaming.py | libs/agno/tests/unit/reasoning/test_reasoning_streaming.py | """Unit tests for reasoning streaming functionality.
These tests verify that reasoning_content_delta events are properly emitted
during streaming reasoning, without requiring actual API calls.
"""
from unittest.mock import patch
import pytest
from agno.models.message import Message
from agno.reasoning.step import R... | 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/tests/unit/team/__init__.py | libs/agno/tests/unit/team/__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/tests/unit/team/test_model_inheritance.py | libs/agno/tests/unit/team/test_model_inheritance.py | from agno.agent import Agent
from agno.models.anthropic import Claude
from agno.models.openai import OpenAIChat
from agno.team.team import Team
def test_model_inheritance():
"""Test that agents inherit model from team when not set."""
agent1 = Agent(name="Agent 1", role="Assistant")
agent2 = Agent(name="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/tests/unit/team/test_basic.py | libs/agno/tests/unit/team/test_basic.py | import pytest
from agno.agent import Agent
from agno.models.message import Message
from agno.models.metrics import Metrics
from agno.models.openai import OpenAIChat
from agno.run import RunContext
from agno.run.team import TeamRunOutput
from agno.session.team import TeamSession
from agno.team.team import Team
from agn... | 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/tests/unit/eval/test_agent_as_judge_eval.py | libs/agno/tests/unit/eval/test_agent_as_judge_eval.py | """Unit tests for AgentAsJudgeEval"""
from unittest.mock import AsyncMock, MagicMock
from agno.agent import Agent
from agno.db.in_memory import InMemoryDb
from agno.eval.agent_as_judge import AgentAsJudgeEval, BinaryJudgeResponse, NumericJudgeResponse
from agno.models.openai import OpenAIChat
from agno.run.agent impo... | 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/tests/unit/os/test_jwt_middleware_helpers.py | libs/agno/tests/unit/os/test_jwt_middleware_helpers.py | """Unit tests for JWT middleware helper functions."""
import pytest
from agno.os.middleware import JWTMiddleware, TokenSource
# Test JWT secret for middleware initialization
JWT_SECRET = "test-secret-key-for-helper-tests"
@pytest.fixture
def middleware():
"""Create middleware instance for testing."""
retur... | 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/tests/unit/os/test_duplicate_ids.py | libs/agno/tests/unit/os/test_duplicate_ids.py | """Tests for duplicate ID validation in AgentOS."""
import pytest
from agno.agent.agent import Agent
from agno.os import AgentOS
from agno.team.team import Team
from agno.workflow.workflow import Workflow
def test_duplicate_agent_ids_with_explicit_ids_raises_error():
"""Test that duplicate explicit agent IDs ra... | 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/tests/unit/os/test_schemas.py | libs/agno/tests/unit/os/test_schemas.py | """Tests our API schemas handle all expected parsing."""
import json
from agno.os.routers.memory.schemas import UserMemorySchema
def test_user_memory_schema():
"""Test that our UserMemorySchema handle common memory objects."""
memory_dict = {
"memory_id": "123",
"memory": "This is a test mem... | 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/tests/unit/os/__init__.py | libs/agno/tests/unit/os/__init__.py | """Unit tests for AgentOS components."""
| 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/tests/unit/os/test_client.py | libs/agno/tests/unit/os/test_client.py | """
Unit tests for AgentOSClient.
Tests cover:
1. Client initialization and configuration
2. HTTP method helpers
3. Discovery operations
4. Memory operations
5. Session operations
6. Eval operations
7. Knowledge operations
8. Run operations
"""
from unittest.mock import AsyncMock, MagicMock, patch
import pytest
fro... | 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/tests/unit/run/test_run_events.py | libs/agno/tests/unit/run/test_run_events.py | import json
from dataclasses import dataclass, field
from datetime import datetime
from enum import Enum
from agno.run.base import BaseRunOutputEvent
from agno.run.workflow import BaseWorkflowRunOutputEvent
class RunEnum(Enum):
NY = "New York"
LA = "Los Angeles"
SF = "San Francisco"
CHI = "Chicago"
... | 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/tests/unit/run/test_run_input.py | libs/agno/tests/unit/run/test_run_input.py | import json
from agno.media import Image
from agno.models.message import Message
from agno.run.agent import RunInput
from agno.run.team import TeamRunInput
def test_media_in_dict_input():
"""Test RunInput handles media when input_content is a list of dicts"""
# Ensure the RunInput is created successfully
... | 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/tests/unit/agent/test_input_schema.py | 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... | 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/tests/unit/agent/test_agent_knowledge.py | libs/agno/tests/unit/agent/test_agent_knowledge.py | import pytest
from agno.agent import Agent
# Create a mock knowledge object
class MockKnowledge:
def __init__(self):
self.max_results = 5
self.vector_db = None
def validate_filters(self, filters):
return filters or {}, []
async def async_validate_filters(self, filters):
... | 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/tests/unit/agent/__init__.py | libs/agno/tests/unit/agent/__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/tests/unit/agent/test_tool_error_events.py | libs/agno/tests/unit/agent/test_tool_error_events.py | from agno.agent import Agent
from agno.models.openai import OpenAIChat
from agno.models.response import ModelResponse, ModelResponseEvent, ToolExecution
from agno.run.agent import RunEvent, RunOutput, ToolCallErrorEvent
from agno.run.messages import RunMessages
from agno.run.team import TeamRunEvent, TeamRunOutput
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/tests/unit/agent/test_basic.py | libs/agno/tests/unit/agent/test_basic.py | from agno.agent.agent import Agent
from agno.utils.string import is_valid_uuid
def test_set_id():
agent = Agent(
id="test_id",
)
agent.set_id()
assert agent.id == "test_id"
def test_set_id_from_name():
agent = Agent(
name="Test Name",
)
agent.set_id()
# Asserting the... | 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/tests/unit/telemetry/test_workflow_telemetry.py | libs/agno/tests/unit/telemetry/test_workflow_telemetry.py | from unittest.mock import patch
import pytest
from agno.workflow.step import Step
from agno.workflow.workflow import Workflow
def dummy_step(step_input):
"""Simple dummy step for testing"""
from agno.workflow.types import StepOutput
return StepOutput(content="Test step executed")
def test_workflow_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/tests/unit/telemetry/test_os_telemetry.py | libs/agno/tests/unit/telemetry/test_os_telemetry.py | from unittest.mock import patch
from agno.agent.agent import Agent
from agno.os import AgentOS
def test_accuracy_evals_telemetry():
"""Test that telemetry logging is called when initializing an AgentOS instance."""
agent = Agent()
# Mock the API call that gets made when telemetry is enabled
with pat... | 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/tests/unit/telemetry/test_agent_telemetry.py | libs/agno/tests/unit/telemetry/test_agent_telemetry.py | from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from agno.agent.agent import Agent
def test_agent_telemetry():
"""Test that telemetry logging is called during sync agent run."""
agent = Agent()
# Assert telemetry is active by default
assert agent.telemetry
# Mock the teleme... | 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/tests/unit/telemetry/test_eval_telemetry.py | libs/agno/tests/unit/telemetry/test_eval_telemetry.py | from unittest.mock import MagicMock, patch
from agno.agent.agent import Agent
from agno.eval.accuracy import AccuracyEval
from agno.eval.agent_as_judge import AgentAsJudgeEval
from agno.eval.performance import PerformanceEval
from agno.eval.reliability import ReliabilityEval
def test_accuracy_evals_telemetry():
... | 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/tests/unit/telemetry/__init__.py | libs/agno/tests/unit/telemetry/__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/tests/unit/telemetry/test_team_telemetry.py | libs/agno/tests/unit/telemetry/test_team_telemetry.py | from unittest.mock import AsyncMock, MagicMock, patch
import pytest
from agno.agent.agent import Agent
from agno.team.team import Team
def test_team_telemetry():
"""Test that telemetry logging is called during sync team run."""
agent = Agent()
team = Team(members=[agent])
# Assert telemetry is acti... | 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/migrations/migrate_mysql.py | libs/agno/migrations/migrate_mysql.py | import asyncio
from agno.db.migrations.manager import MigrationManager
from agno.db.mysql import MySQLDb
# Create your database connection here
db_url = "mysql+pymysql://ai:ai@localhost:3306/ai"
db = MySQLDb(db_url=db_url)
# Upgrade your DB to the latest version
async def run_migration():
await MigrationManage... | 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/migrations/migrate_sqlite.py | libs/agno/migrations/migrate_sqlite.py | import asyncio
from agno.db.migrations.manager import MigrationManager
from agno.db.sqlite import AsyncSqliteDb, SqliteDb
# Create your database connection here
db = SqliteDb(
db_file="tmp/data.db",
session_table="agno_sessions",
memory_table="agno_memories",
)
# Or for asynchronous operations
async_db = ... | 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/migrations/migrate_singlestore.py | libs/agno/migrations/migrate_singlestore.py | import asyncio
from os import getenv
from agno.db.migrations.manager import MigrationManager
from agno.db.singlestore import SingleStoreDb
# Create your database connection here
USERNAME = getenv("SINGLESTORE_USERNAME")
PASSWORD = getenv("SINGLESTORE_PASSWORD")
HOST = getenv("SINGLESTORE_HOST")
PORT = getenv("SINGLES... | 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/migrations/migrate_postgres.py | libs/agno/migrations/migrate_postgres.py | import asyncio
from agno.db.migrations.manager import MigrationManager
from agno.db.postgres import AsyncPostgresDb, PostgresDb
# Create your database connection here
db = PostgresDb(
db_url="postgresql+psycopg://ai:ai@localhost:5532/ai",
session_table="agno_sessions",
memory_table="agno_memories",
)
# Or... | 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/migrations/v1_to_v2/migrate_vectordbs_to_v2.py | libs/agno/migrations/v1_to_v2/migrate_vectordbs_to_v2.py | # mypy: disable-error-code=var-annotated
"""Use this script to migrate your Agno VectorDBs from v1 to v2
This script works with PgVector and SingleStore.
This script will update the provided tables to add the two new columns introduced in v2:
- content_hash: String column for content hash tracking
- content_id: Strin... | 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/migrations/v1_to_v2/migrate_to_v2.py | libs/agno/migrations/v1_to_v2/migrate_to_v2.py | """Use this script to migrate your Agno tables from v1 to v2
- Configure your db_url in the script
- Run the script
"""
from agno.db.migrations.v1_to_v2 import migrate
from agno.db.postgres.postgres import PostgresDb
from agno.utils.log import log_info
# --- Set these variables before running the script ---
## Your... | 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/table.py | libs/agno/agno/table.py | import sqlite3
db_path = "tmp/traces.db"
table_name = "agno_spans"
conn = sqlite3.connect(db_path)
cur = conn.cursor()
cur.execute(f"DROP TABLE IF EXISTS {table_name}")
conn.commit()
conn.close()
| 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/debug.py | libs/agno/agno/debug.py | def enable_debug_mode() -> None:
"""Enable debug mode for the agno library.
This function sets the logging level to DEBUG
"""
from agno.utils.log import set_log_level_to_debug
set_log_level_to_debug()
def disable_debug_mode() -> None:
"""Disable debug mode for the agno library.
This fun... | 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/exceptions.py | libs/agno/agno/exceptions.py | from dataclasses import dataclass
from enum import Enum
from typing import Any, Dict, List, Optional, Union
from agno.models.message import Message
class AgentRunException(Exception):
def __init__(
self,
exc,
user_message: Optional[Union[str, Message]] = None,
agent_message: Optio... | 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/filters.py | libs/agno/agno/filters.py | """Search filter expressions for filtering knowledge base documents and search results.
This module provides a set of filter operators for constructing complex search queries
that can be applied to knowledge bases, vector databases, and other searchable content.
Filter Types:
- Comparison: EQ (equals), GT (greate... | 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/__init__.py | libs/agno/agno/__init__.py | from importlib.metadata import PackageNotFoundError, version
try:
__version__ = version("agno")
except PackageNotFoundError:
__version__ = "0.0.0"
__all__ = ["__version__"]
| 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/media.py | libs/agno/agno/media.py | from pathlib import Path
from typing import Any, Dict, List, Optional, Tuple, Union
from uuid import uuid4
from pydantic import BaseModel, field_validator, model_validator
from agno.utils.log import log_error
class Image(BaseModel):
"""Unified Image class for all use cases (input, output, artifacts)"""
# 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/vectordb/search.py | libs/agno/agno/vectordb/search.py | from enum import Enum
class SearchType(str, Enum):
vector = "vector"
keyword = "keyword"
hybrid = "hybrid"
| 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/vectordb/__init__.py | libs/agno/agno/vectordb/__init__.py | from agno.vectordb.base import VectorDb
__all__ = ["VectorDb"]
| 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/vectordb/base.py | libs/agno/agno/vectordb/base.py | from abc import ABC, abstractmethod
from typing import Any, Dict, List, Optional
from agno.knowledge.document import Document
from agno.utils.log import log_warning
from agno.utils.string import generate_id
class VectorDb(ABC):
"""Base class for Vector Databases"""
def __init__(self, *, id: Optional[str] = ... | 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/vectordb/distance.py | libs/agno/agno/vectordb/distance.py | from enum import Enum
class Distance(str, Enum):
cosine = "cosine"
l2 = "l2"
max_inner_product = "max_inner_product"
| 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/vectordb/weaviate/__init__.py | libs/agno/agno/vectordb/weaviate/__init__.py | from agno.vectordb.weaviate.index import Distance, VectorIndex
from agno.vectordb.weaviate.weaviate import SearchType, Weaviate
__all__ = [
"Distance",
"VectorIndex",
"Weaviate",
"SearchType",
]
| 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/vectordb/weaviate/weaviate.py | libs/agno/agno/vectordb/weaviate/weaviate.py | import asyncio
import json
import uuid
from hashlib import md5
from os import getenv
from typing import Any, Dict, List, Optional, Tuple, Union
try:
from warnings import filterwarnings
import weaviate
from weaviate import WeaviateAsyncClient
from weaviate.classes.config import Configure, DataType, Pro... | 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/vectordb/weaviate/index.py | libs/agno/agno/vectordb/weaviate/index.py | from enum import Enum
class VectorIndex(Enum):
HNSW = "hnsw"
FLAT = "flat"
DYNAMIC = "dynamic"
class Distance(Enum):
COSINE = "cosine"
DOT = "dot"
L2_SQUARED = "l2-squared"
HAMMING = "hamming"
MANHATTAN = "manhattan"
| 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/vectordb/cassandra/extra_param_mixin.py | libs/agno/agno/vectordb/cassandra/extra_param_mixin.py | from typing import List
from cassio.table.mixins.base_table import BaseTableMixin
from cassio.table.table_types import ColumnSpecType
class ExtraParamMixin(BaseTableMixin):
def _schema_da(self) -> List[ColumnSpecType]:
return super()._schema_da() + [
("document_name", "TEXT"),
]
| 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/vectordb/cassandra/cassandra.py | libs/agno/agno/vectordb/cassandra/cassandra.py | import asyncio
from typing import Any, Dict, Iterable, List, Optional, Union
from agno.filters import FilterExpr
from agno.knowledge.document import Document
from agno.knowledge.embedder import Embedder
from agno.utils.log import log_debug, log_error, log_info, log_warning
from agno.vectordb.base import VectorDb
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/vectordb/cassandra/__init__.py | libs/agno/agno/vectordb/cassandra/__init__.py | from agno.vectordb.cassandra.cassandra import Cassandra
__all__ = [
"Cassandra",
]
| 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/vectordb/cassandra/index.py | libs/agno/agno/vectordb/cassandra/index.py | try:
from cassio.table.base_table import BaseTable
from cassio.table.mixins.metadata import MetadataMixin
from cassio.table.mixins.type_normalizer import TypeNormalizerMixin
from cassio.table.mixins.vector import VectorMixin
from .extra_param_mixin import ExtraParamMixin
except (ImportError, Module... | 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/vectordb/pgvector/pgvector.py | libs/agno/agno/vectordb/pgvector/pgvector.py | import asyncio
from hashlib import md5
from math import sqrt
from typing import Any, Dict, List, Optional, Union, cast
from agno.utils.string import generate_id
try:
from sqlalchemy import and_, not_, or_, update
from sqlalchemy.dialects import postgresql
from sqlalchemy.engine import Engine, create_engin... | 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/vectordb/pgvector/__init__.py | libs/agno/agno/vectordb/pgvector/__init__.py | from agno.vectordb.distance import Distance
from agno.vectordb.pgvector.index import HNSW, Ivfflat
from agno.vectordb.pgvector.pgvector import PgVector
from agno.vectordb.search import SearchType
__all__ = [
"Distance",
"HNSW",
"Ivfflat",
"PgVector",
"SearchType",
]
| python | Apache-2.0 | 26b9daa0fb760c3ad8384e1ba9218b1bce854535 | 2026-01-04T14:41:49.609528Z | false |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.