Catalog PyPI
Back to packageRELEASE DETAILS

0.6.1

PyPI

agentlab-py

Python client library for the AgentLab evaluation platform using Connect RPC

agentlabaiconnectevaluationmlprotobufrpc
Published9 Oct 2025
Direct dependencies13
Transitive dependenciesNot calculated

README

Version 0.6.1 documentation

AgentLab Python Client

PyPI version Python 3.10+ License: MIT

A Python client library for the AgentLab evaluation platform using Connect RPC. This library provides a simple and intuitive interface for running AI agent evaluations, managing evaluators, and accessing evaluation results.

🚀 Quick Start

pip install agentlab-py

Set your API token as an environment variable:

export AGENTLAB_API_TOKEN=your-api-token-here
from agentlab import AgentLabClient, CreateEvaluationOptions

client = AgentLabClient()

evaluation = client.run_evaluation(CreateEvaluationOptions(
    agent_name='my-agent',
    agent_version='1.0.0',
    evaluator_names=['correctness-v1'],
    user_question='What is the capital of France?',
    agent_answer='The capital of France is Paris.',
    ground_truth='Paris is the capital of France',
    metadata={'confidence': 0.95}
))

print(f"Evaluation completed: {evaluation.name}")

Retrieving Results

evaluation_run = client.get_evaluation_run('evaluation-run-id')

result_data = client.get_evaluation_result('evaluation-run-id')
print(result_data['results'])  # Parsed evaluator outputs

for evaluator_name, result in evaluation_run.evaluator_results.items():
    print(f"{evaluator_name}: {result.output}")

Listing Evaluation Runs

runs_response = client.list_evaluation_runs('project-123')
for run in runs_response.evaluation_runs:
    print(f"Run: {run.name} - Question: {run.user_question}")

Managing Agent Prompts

from agentlab import CreateAgentVersionOptions

# Publish agent version with prompts (idempotent)
result = client.publish_agent_version(CreateAgentVersionOptions(
    agent_name='my-assistant',
    version='1.0.0',
    prompts={
        'system': 'You are a helpful AI assistant...',
        'guidelines': 'Always be polite and professional.'
    }
))

print(f"Published version: {result.create_time}")
for name, content in result.prompts.items():
    print(f"  {name}: {content[:50]}...")

Analyzing Agent Performance

from agentlab import AnalysisParameters

# Create analysis for the last 30 days
params = AnalysisParameters(min_evaluation_runs=5, time_range_days=30)
session = client.analyze_agent('my-agent', '1.0.0', params)

# Get results
session = client.get_analysis_session(session.id)
if session.status.value == "ANALYSIS_STATUS_COMPLETED":
    stats = session.analysis_data.statistical_summary
    print(f"Success rate: {stats.success_rate:.1%}")
    print(f"Average score: {stats.average_score:.3f}")

Working with Test Datasets

# List all test datasets
datasets = client.list_test_datasets()
print(f"Found {len(datasets.test_datasets)} dataset(s)")

# Get tests from a dataset
tests = client.get_tests('dataset-uuid')
for test in tests.tests:
    print(f"Q: {test.user_question}")
    print(f"A: {test.ground_truth}")

🤝 Contributing

We welcome contributions! Please see our Contributing Guide for details.

Issues and Feature Requests

🏢 About VectorLabs

AgentLab is developed by VectorLabs, a company focused on advancing AI agent evaluation and development tools.


Made with ❤️ by the VectorLabs team

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 13

Native requirements
13 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
connect-python
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
connect-python<0.6.0,>=0.5.0runtime
protobuf
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
protobuf>=4.21.0runtime
httpx
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
httpx>=0.27.0runtime
typing_extensions
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
typing_extensions>=4.0.0runtime
googleapis-common-protos
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
googleapis-common-protos>=1.70.0runtime
pytest
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest>=7.0.0; extra == "dev"runtime
pytest-asyncio
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
pytest-asyncio>=0.21.0; extra == "dev"runtime
black
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
black>=22.0.0; extra == "dev"runtime
isort
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
isort>=5.10.0; extra == "dev"runtime
mypy
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
mypy>=1.0.0; extra == "dev"runtime
flake8
Environment
{
  "extras": "",
  "marker": "extra == \"dev\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
flake8>=5.0.0; extra == "dev"runtime
sphinx
Environment
{
  "extras": "",
  "marker": "extra == \"docs\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
sphinx>=5.0.0; extra == "docs"runtime
sphinx-rtd-theme
Environment
{
  "extras": "",
  "marker": "extra == \"docs\"",
  "requires_python": ">=3.10",
  "evaluation": "NOT_EVALUATED"
}
sphinx-rtd-theme>=1.0.0; extra == "docs"runtime

Distribution files

2 collected
agentlab_py-0.6.1-py3-none-any.whl

bdist_wheel · 74.94 KB · Python py3

Source file
agentlab_py-0.6.1.tar.gz

sdist · 84.03 KB · Python source

Source file

Repository

NOT_FOUND
vectorlabscz/agentlab-py

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 22:32 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:e90263fa2ece98734e2d4cf0ef3ebe0504a6bc786ce6eefccf77bc16df922f7b

Other collected versions

View all collected versions →