# Overmind Client
[](https://github.com/overmind-core/overmind-python/actions/workflows/publish.yml)
[](https://pypi.org/project/overmind/)
A client for the Overmind API that provides easy access to AI provider endpoints with policy enforcement.
## Features
- **Easy Integration**: Use major providers like OpenAI with the same call signatures
- **Policy Enforcement**: Apply customizable policies to your LLM inputs and outputs
- **Observability**: Log and explore all LLM calls and policy results
## Installation
```bash
pip install overmind
```
## Quick Start
### Use default Overmind agent
Get your free Overmind API key at [overmind.evallab.dev](https://overmind.evallab.dev)
Below we initialise the Overmind client and call GPT-4o-mini using `default_agent`. This will run our `reject_prompt_injection` and `reject_irrelevant_answer` policies.
```python
import os
from overmind.client import OvermindClient
# Set env variables (or pass directly to the client)
# Get your free overmind API key at overmind.evallab.dev
os.environ["OVERMIND_API_KEY"] = "your_overmind_api_key"
os.environ["OPENAI_API_KEY"] = "your_openai_api_key"
overmind = OvermindClient()
# Use existing OpenAI client methods
response = overmind.openai.chat.completions.create(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Tell me a joke about LLMs"}],
agent_id="default_agent"
)
response.summary()
```
### Define your own policies
There are different policy templates that can be set up at invocation time.
```python
# Define input policy to filter out PII
input_pii_policy = {
'policy_template': 'anonymize_pii',
'parameters': {
'pii_types': ['DEMOGRAPHIC_DATA', 'FINANCIAL_ID']
}
}
# Define output policy to check response against criteria
output_llm_judge_criteria = {
'policy_template': 'reject_llm_judge_with_criteria',
'parameters': {
'criteria': [
"Must not be a financial advice",
"Must answer the question fully",
]
}
}
messages = [
{
"role": "user",
"content": "Hi my name is Jon, account number 20194812. Should I switch my mortgage now or wait for a year to have a lower interest rate?"
}
]
# Use existing OpenAI client methods but now you can pass your policies
response = overmind.openai.chat.completions.create(
model='gpt-4o-mini',
messages=messages,
input_policies=[input_pii_policy],
output_policies=[output_llm_judge_criteria]
)
response.summary()
```
## Further usage
There is a more detailed [tutorial notebook](https://github.com/overmind-core/overmind-python/blob/main/docs/overmind_tutorial.ipynb) available.
We are not storing your API keys and you are solely responsible for managing them and the associated costs.
On ours side we run policy executions for free as this is an alpha stage product. We may impose usage limits and scale our services up and down from time to time.
We appreciate any feedback, collaboration or other suggestions. You can reach out at [support@evallab.dev](mailto:support@evallab.dev)
Raw data
{
"_id": null,
"home_page": null,
"name": "overmind",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.8",
"maintainer_email": null,
"keywords": "overmind, ai, api, client, policy, enforcement",
"author": "Overmind Ltd",
"author_email": null,
"download_url": "https://files.pythonhosted.org/packages/0d/f9/8aae01827e34d0f11a783b8b33837516e5a174c1adbd78ac9487415cf1e5/overmind-0.1.7.tar.gz",
"platform": null,
"description": "# Overmind Client\n\n[](https://github.com/overmind-core/overmind-python/actions/workflows/publish.yml)\n[](https://pypi.org/project/overmind/)\n\nA client for the Overmind API that provides easy access to AI provider endpoints with policy enforcement.\n\n## Features\n\n- **Easy Integration**: Use major providers like OpenAI with the same call signatures\n- **Policy Enforcement**: Apply customizable policies to your LLM inputs and outputs\n- **Observability**: Log and explore all LLM calls and policy results\n\n## Installation\n\n\n\n```bash\npip install overmind\n```\n\n\n## Quick Start\n\n### Use default Overmind agent\n\nGet your free Overmind API key at [overmind.evallab.dev](https://overmind.evallab.dev)\n\nBelow we initialise the Overmind client and call GPT-4o-mini using `default_agent`. This will run our `reject_prompt_injection` and `reject_irrelevant_answer` policies.\n```python\nimport os\nfrom overmind.client import OvermindClient\n\n# Set env variables (or pass directly to the client)\n# Get your free overmind API key at overmind.evallab.dev\nos.environ[\"OVERMIND_API_KEY\"] = \"your_overmind_api_key\"\nos.environ[\"OPENAI_API_KEY\"] = \"your_openai_api_key\"\n\novermind = OvermindClient()\n\n\n# Use existing OpenAI client methods\nresponse = overmind.openai.chat.completions.create(\n model=\"gpt-4o-mini\",\n messages=[{\"role\": \"user\", \"content\": \"Tell me a joke about LLMs\"}],\n agent_id=\"default_agent\"\n)\n\nresponse.summary()\n```\n\n\n\n### Define your own policies\nThere are different policy templates that can be set up at invocation time.\n```python\n\n# Define input policy to filter out PII\ninput_pii_policy = {\n 'policy_template': 'anonymize_pii',\n 'parameters': {\n 'pii_types': ['DEMOGRAPHIC_DATA', 'FINANCIAL_ID']\n }\n}\n\n# Define output policy to check response against criteria\noutput_llm_judge_criteria = {\n 'policy_template': 'reject_llm_judge_with_criteria',\n 'parameters': {\n 'criteria': [\n \"Must not be a financial advice\",\n \"Must answer the question fully\",\n ]\n }\n}\n\nmessages = [\n {\n \"role\": \"user\", \n \"content\": \"Hi my name is Jon, account number 20194812. Should I switch my mortgage now or wait for a year to have a lower interest rate?\"\n }\n]\n\n# Use existing OpenAI client methods but now you can pass your policies\nresponse = overmind.openai.chat.completions.create(\n model='gpt-4o-mini',\n messages=messages,\n input_policies=[input_pii_policy],\n output_policies=[output_llm_judge_criteria]\n)\n\nresponse.summary()\n```\n## Further usage\n\nThere is a more detailed [tutorial notebook](https://github.com/overmind-core/overmind-python/blob/main/docs/overmind_tutorial.ipynb) available.\n\nWe are not storing your API keys and you are solely responsible for managing them and the associated costs.\n\nOn ours side we run policy executions for free as this is an alpha stage product. We may impose usage limits and scale our services up and down from time to time.\n\nWe appreciate any feedback, collaboration or other suggestions. You can reach out at [support@evallab.dev](mailto:support@evallab.dev)\n",
"bugtrack_url": null,
"license": null,
"summary": "Python client for Overmind API",
"version": "0.1.7",
"project_urls": {
"Homepage": "https://github.com/overmind-core/overmind-python",
"Repository": "https://github.com/overmind-core/overmind-python"
},
"split_keywords": [
"overmind",
" ai",
" api",
" client",
" policy",
" enforcement"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "fce12c2102ab2fe074a75e73eac58b9d20124f39d0082040857c739267337983",
"md5": "26a37a01c68d8cd16eb6395520839608",
"sha256": "3d92d68813afcfee9b72c50fa6e662ec428faa294cf4d0b1af182f0279d85d83"
},
"downloads": -1,
"filename": "overmind-0.1.7-py3-none-any.whl",
"has_sig": false,
"md5_digest": "26a37a01c68d8cd16eb6395520839608",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.8",
"size": 12214,
"upload_time": "2025-07-11T16:17:06",
"upload_time_iso_8601": "2025-07-11T16:17:06.408928Z",
"url": "https://files.pythonhosted.org/packages/fc/e1/2c2102ab2fe074a75e73eac58b9d20124f39d0082040857c739267337983/overmind-0.1.7-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "0df98aae01827e34d0f11a783b8b33837516e5a174c1adbd78ac9487415cf1e5",
"md5": "8447a9fc88a4f4999182af9dfddc40bb",
"sha256": "b8336b6667ae32cd1548e2288417316c02d07b9d43873fc3520dc6c05359bb74"
},
"downloads": -1,
"filename": "overmind-0.1.7.tar.gz",
"has_sig": false,
"md5_digest": "8447a9fc88a4f4999182af9dfddc40bb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.8",
"size": 10219,
"upload_time": "2025-07-11T16:17:07",
"upload_time_iso_8601": "2025-07-11T16:17:07.578024Z",
"url": "https://files.pythonhosted.org/packages/0d/f9/8aae01827e34d0f11a783b8b33837516e5a174c1adbd78ac9487415cf1e5/overmind-0.1.7.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-07-11 16:17:07",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "overmind-core",
"github_project": "overmind-python",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "overmind"
}