LangChain integration library for AOps
Project description
aops
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
- Configuration — API key,
aops.init(), environment variables - API Reference —
pull(),@chain_promptfunction & class decorators - Live Updates — polling, pattern selection guide
License
MIT
Project details
Release history Release notifications | RSS feed
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.2.0.tar.gz
(9.3 kB
view details)
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
aops-0.2.0-py3-none-any.whl
(10.8 kB
view details)
File details
Details for the file aops-0.2.0.tar.gz.
File metadata
- Download URL: aops-0.2.0.tar.gz
- Upload date:
- Size: 9.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ad6dd8b3faea0e52adfb0ad85475a69b9609c865c41b41c7d6df3ea3b0661a24
|
|
| MD5 |
60172853f8f15391c91a622d6ee92807
|
|
| BLAKE2b-256 |
d3e406e5a99259113a51103424762ff44e27cc7fca62b2505a21027a2aab1566
|
File details
Details for the file aops-0.2.0-py3-none-any.whl.
File metadata
- Download URL: aops-0.2.0-py3-none-any.whl
- Upload date:
- Size: 10.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.10
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
7f3537ff8b3942c54cff73d9e3dfcfda803571fe03487d9466eacdf17c0f4b74
|
|
| MD5 |
39b1fae4aa4a369f03ea3845d5150210
|
|
| BLAKE2b-256 |
04e4378986efc0d0bb87bb06196be764dd89471e79d1b07db773f27cb449db0f
|