Skip to main content

Mantisdk - AI Agent Training and Evaluation Platform

Project description

Mantisdk

PyPI version License

AI Agent Training and Evaluation Platform

Mantisdk is a comprehensive toolkit for training and evaluating AI agents using reinforcement learning, automatic prompt optimization, and supervised fine-tuning.

Core Features

  • Turn your agent into an optimizable beast with minimal code changes
  • Build with any agent framework (LangChain, OpenAI Agent SDK, AutoGen, CrewAI, and more)
  • Selectively optimize one or more agents in a multi-agent system
  • Embraces algorithms like Reinforcement Learning, Automatic Prompt Optimization, Supervised Fine-tuning and more

Installation

pip install mantisdk

For optional dependencies:

# For LLMProxy feature (note: has strict dependency pins for boto3, grpcio, uvicorn)
pip install 'mantisdk[proxy]'

# For APO (Automatic Prompt Optimization)
pip install 'mantisdk[apo]'

# For VERL integration
pip install 'mantisdk[verl]'

# For Weave integration
pip install 'mantisdk[weave]'

# For MongoDB store
pip install 'mantisdk[mongo]'

Quick Start

import mantisdk as msk

# Initialize the client
client = msk.MantisdkClient()

# Your agent code here...

Insight Ingestion Helpers

Use these helpers when you want to send external agent traces/scores directly to an Insight instance.

1) Insight ingestion client

from mantisdk import InsightIngestionClient, InsightIngestionConfig

client = InsightIngestionClient(
    InsightIngestionConfig(
        host="http://localhost:3000",
        public_key="pk-lf-...",
        secret_key="sk-lf-...",
    )
)

# Send trace event
client.ingest_trace_event(
    trace_id="trace-001",
    name="Agent Trace",
    input_data={"prompt": "hello"},
    output_data={"answer": "world"},
    session_id="session-001",
    environment="default",
)

# Send scores efficiently in batches
client.send_scores(
    [
        {"name": "task_success", "value": 0.95, "dataType": "NUMERIC", "traceId": "trace-001"},
        {"name": "safety", "value": 1, "dataType": "BOOLEAN", "traceId": "trace-001"},
    ],
    mode="ingestion-batch",
)

2) Simple API wrapper sample (dependency-free)

For a minimal stdlib-only helper and examples, see: samples/insight-agent-trace-wrapper/.

CLI Usage

# Start the Mantisdk server
msk store serve

# Run with vLLM
msk vllm start

Documentation

For full documentation, visit https://withmetis.github.io/mantis/mantisdk/

License

MIT License - see LICENSE for details.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mantisdk-0.2.3.tar.gz (1.7 MB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mantisdk-0.2.3-py3-none-any.whl (1.1 MB view details)

Uploaded Python 3

File details

Details for the file mantisdk-0.2.3.tar.gz.

File metadata

  • Download URL: mantisdk-0.2.3.tar.gz
  • Upload date:
  • Size: 1.7 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mantisdk-0.2.3.tar.gz
Algorithm Hash digest
SHA256 eb19618e6548202ab0859801a0bfb479d77b2efc71964c2fba90f4c38bac1511
MD5 2869d9f431899ada95b1eb2c971aadfe
BLAKE2b-256 6467fc277a0b6735eec877646d3477b06e7278782b0b55e80d738b034102c631

See more details on using hashes here.

Provenance

The following attestation bundles were made for mantisdk-0.2.3.tar.gz:

Publisher: mantisdk-pypi-release.yml on metis-mantis/mantis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file mantisdk-0.2.3-py3-none-any.whl.

File metadata

  • Download URL: mantisdk-0.2.3-py3-none-any.whl
  • Upload date:
  • Size: 1.1 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for mantisdk-0.2.3-py3-none-any.whl
Algorithm Hash digest
SHA256 01890ecaa1a7295da1e320edafc03552f6de2183e3f21f765aff3a5c83e94278
MD5 6a0be3fdc28c3892bceb24c37b2ef673
BLAKE2b-256 4abc31dd7205e78188240057115a043ec1ded4e0d4e01b78293f9f290010ed03

See more details on using hashes here.

Provenance

The following attestation bundles were made for mantisdk-0.2.3-py3-none-any.whl:

Publisher: mantisdk-pypi-release.yml on metis-mantis/mantis

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page