Skip to main content

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.

Metadata

Release files for mantisdk 0.2.4

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for mantisdk 0.2.4
File Size Uploaded Provenance Actions
mantisdk-0.2.4.tar.gz 1.5 MB With provenance Details for mantisdk-0.2.4.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for mantisdk 0.2.4
File Interpreter ABI Platform Actions
mantisdk-0.2.4-py3-none-any.whl Python 3 none any Details for mantisdk-0.2.4-py3-none-any.whl

Total release size: 2.6 MB

Release files / mantisdk-0.2.4.tar.gz

Download URL mantisdk-0.2.4.tar.gz
Size 1.5 MB
Tags Source
SHA-256 checksum
How to use checksums
130f289874fb07bd4d2ceab323ac6828c0d253d6b9a01b3d6bb77727ce7cd81d
BLAKE2b-256 checksum
How to use checksums
50cdb9375f18665c90f590d71de19ddc92c49737be682731ef6bb6af6f822f29
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.

Transparency log

Release files / mantisdk-0.2.4-py3-none-any.whl

Download URL mantisdk-0.2.4-py3-none-any.whl
Size 1.1 MB
Tags Python 3
SHA-256 checksum
How to use checksums
0a57ee00eaa0d71a6acf3595a5be9fc0adad70ac1cd63390f80c4361c7ba7e9a
BLAKE2b-256 checksum
How to use checksums
979dc1fd0cef1bc693a9d3b78d02d03aef6818d06f82398a40bd4e34d8d553b1
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.7

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.

Transparency log

Security for mantisdk 0.2.4

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for mantisdk-0.2.4.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Apr 7, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page