Skip to main content

LangChain integration library for AOps

Project description

aops

PyPI Python

LangChain integration library for AOps — load and version-control your agent prompts from the AOps backend.

Installation

pip install aops

Quick Start

import aops
from aops.langchain import pull
from langchain_core.prompts import ChatPromptTemplate, HumanMessagePromptTemplate
from langchain_core.output_parsers import StrOutputParser
from langchain_openai import ChatOpenAI

aops.init(api_key="aops_...")

prompt = pull("my-agent/my-chain")

chain = (
    ChatPromptTemplate.from_messages([
        prompt,
        HumanMessagePromptTemplate.from_template("{user_input}"),
    ])
    | ChatOpenAI(model="gpt-4o-mini")
    | StrOutputParser()
)

result = chain.invoke({"user_input": "Hello!"})

Requirements

  • Python 3.12+
  • AOps backend running (self-hosted)
  • API key issued from the AOps UI: Agent detail page → API Keys → New API Key

Docs

License

MIT

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

aops-0.3.0.tar.gz (9.3 kB view details)

Uploaded Source

Built Distribution

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

aops-0.3.0-py3-none-any.whl (10.9 kB view details)

Uploaded Python 3

File details

Details for the file aops-0.3.0.tar.gz.

File metadata

  • Download URL: aops-0.3.0.tar.gz
  • Upload date:
  • Size: 9.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aops-0.3.0.tar.gz
Algorithm Hash digest
SHA256 45dddf6560aa7e4c8237e627615b86b05d183fc0a4fc17c60b83e59b78708c09
MD5 c4a33b71847b8ed9b9238b97f2b6a7cb
BLAKE2b-256 0b315e3b0a21b051f7b0773b95dbeba27562e5c6e87de896f96f93a58be10006

See more details on using hashes here.

Provenance

The following attestation bundles were made for aops-0.3.0.tar.gz:

Publisher: release.yml on cow-coding/aops-python

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

File details

Details for the file aops-0.3.0-py3-none-any.whl.

File metadata

  • Download URL: aops-0.3.0-py3-none-any.whl
  • Upload date:
  • Size: 10.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.7

File hashes

Hashes for aops-0.3.0-py3-none-any.whl
Algorithm Hash digest
SHA256 6e12d2537c97026cbb499889bffc4e7e0fb19111d70cc23fffd9169a8a9ac716
MD5 b38cf4408307f703f868df7db5554a3a
BLAKE2b-256 c6acd2f4f6cf377fbc4994850c4f80bb9fe27e39f9f38299cb4bfb1bef222bf2

See more details on using hashes here.

Provenance

The following attestation bundles were made for aops-0.3.0-py3-none-any.whl:

Publisher: release.yml on cow-coding/aops-python

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