enterprise-agentic-ai-framework
An enterprise governance framework for building single- and multi-agent AI systems in Python: authorization, guardrails, observability, secrets management, and LLM gateway access, all as one consistent stack instead of one-off code per project.
pip install enterprise-agentic-ai-framework
The import name is agentic_ai (the PyPI distribution name is longer
for naming reasons, the package you actually import is not):
from agentic_ai.gateway import LiteLLMGateway
Status
This is an early release. Only the LLM gateway is implemented today - everything else below is scaffolded (the module exists, it's empty) and not yet usable. This table will be kept current as modules land, not written once and left stale.
| Module | Status |
|---|---|
gateway - LLM gateway (LiteLLM proxy client) |
✅ Implemented |
identity - authentication |
⏳ Planned |
governance - authorization (PEP/PDP) |
⏳ Planned |
guardrails - PII/secrets/injection/jailbreak detection |
⏳ Planned |
secrets - secrets management |
⏳ Planned |
observability - distributed tracing, structured audit |
⏳ Planned |
memory - short/long-term agent memory |
⏳ Planned |
context - context engineering (write/select/compress) |
⏳ Planned |
evaluation - deterministic + LLM-as-judge eval |
⏳ Planned |
finops - LLM cost tracking |
⏳ Planned |
security - rate limiting, abuse detection |
⏳ Planned |
compliance, audit, data_governance |
⏳ Planned |
monitoring, resilience, responsible_ai |
⏳ Planned |
core - agent/tool base classes, orchestrator |
⏳ Planned |
Prerequisites
This library is a client, not a server. Before any of the examples
below will work, you need a LiteLLM proxy already running somewhere
reachable - agentic_ai.gateway never installs, starts, stops, or
otherwise manages that process for you. Set it up once:
1. Install LiteLLM's proxy (a separate package from this library):
pip install 'litellm[proxy]'
2. Register at least one model. Create litellm_config.yaml -
this example routes the model name gpt-4o-mini to OpenAI, reading the
real provider key from an environment variable (never hardcode it in
the YAML):
model_list:
- model_name: gpt-4o-mini
litellm_params:
model: openai/gpt-4o-mini
api_key: os.environ/OPENAI_API_KEY
Any provider LiteLLM supports works the same way - Anthropic, Azure
OpenAI, Bedrock, a local Ollama model, etc.; only litellm_params
changes. See LiteLLM's own docs for the full provider list.
3. Set the real provider key and start the proxy:
export OPENAI_API_KEY=sk-...
litellm --config litellm_config.yaml --port 4000
4. Confirm it's actually up before writing any Python against it:
curl http://localhost:4000/health/liveliness
# -> "I'm alive!"
If that curl fails, nothing below will work either - fix connectivity
to the proxy first; agentic_ai.gateway's errors will otherwise (correctly)
just tell you the same thing: it can't reach http://localhost:4000.
Only once you have a real, running, reachable LiteLLM proxy do the examples below have anything to talk to.
Quickstart: LLM Gateway
1. Connect to it
from agentic_ai.gateway import LiteLLMGateway
# No arguments needed for the common case: connects to
# http://localhost:4000, LiteLLM's own default port.
gateway = LiteLLMGateway()
reply = gateway.complete(
model="gpt-4o-mini", # must be registered on your proxy, e.g. in litellm_config.yaml
messages=[
{"role": "system", "content": "You are a concise assistant."},
{"role": "user", "content": "Name three benefits of distributed tracing."},
],
)
print(reply)
2. Configuring host, port, and auth
from agentic_ai.gateway import LiteLLMGateway
# Custom port - your proxy isn't on LiteLLM's default 4000
gateway = LiteLLMGateway(port=5001)
# Custom host and port - a proxy running elsewhere on your network
gateway = LiteLLMGateway(host="litellm.internal", port=8080)
# Full base_url - anything host/port can't express (TLS, a path prefix)
gateway = LiteLLMGateway(base_url="https://litellm.example.com/proxy")
# A proxy that requires a virtual key
gateway = LiteLLMGateway(api_key="sk-...") # resolve this from your own
# secrets store - the gateway
# module doesn't fetch it for you
3. The full response, not just the text
complete() is a convenience wrapper around chat_completion(), which
returns the full OpenAI-compatible response body (usage, finish_reason,
etc.) when you need more than just the message content:
result = gateway.chat_completion(
model="gpt-4o-mini",
messages=[{"role": "user", "content": "Summarize this in one sentence: ..."}],
temperature=0.2,
max_tokens=200,
)
print(result["choices"][0]["message"]["content"])
print(result["usage"])
4. Handling errors
The gateway never lets a raw network exception escape - callers get one of two exceptions, so "the proxy is down" and "the proxy rejected the request" are never conflated:
from agentic_ai.gateway import GatewayConnectionError, GatewayRequestError, LiteLLMGateway
gateway = LiteLLMGateway()
try:
reply = gateway.complete("gpt-4o-mini", [{"role": "user", "content": "hi"}])
except GatewayConnectionError:
# Nothing is listening at gateway.base_url at all - is LiteLLM
# actually running? (see Prerequisites above)
...
except GatewayRequestError as e:
# The proxy responded, but with an error (bad model name, missing
# api_key, malformed request) - e includes the proxy's own message.
print(e)
5. Cleaning up
LiteLLMGateway holds an open HTTP connection pool; close it when
you're done, or use it as a context manager:
with LiteLLMGateway() as gateway:
reply = gateway.complete("gpt-4o-mini", [{"role": "user", "content": "hi"}])
# connection pool closed automatically here
Requirements
- Python 3.10+
- A LiteLLM proxy you deploy yourself (this library is a client, not a bundled server)
License
Apache-2.0
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
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
File details
Details for the file enterprise_agentic_ai_framework-0.1.1.tar.gz.
File metadata
- Download URL: enterprise_agentic_ai_framework-0.1.1.tar.gz
- Upload date:
- Size: 11.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8af65032fb0953aaec97ee5dbbfbdc62d113b44f15021535d7f5ff30a11dfffe
|
|
| MD5 |
b55920da3224a8b179d095ec3df8b689
|
|
| BLAKE2b-256 |
d3973f967686f8f0217c7d2c51cd784593c81d78f67d8a3382d33da96accec0f
|
File details
Details for the file enterprise_agentic_ai_framework-0.1.1-py3-none-any.whl.
File metadata
- Download URL: enterprise_agentic_ai_framework-0.1.1-py3-none-any.whl
- Upload date:
- Size: 14.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via:
twine/7.0.0 CPython/3.12.8
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
72ef5e017f7cf75b8838498722673b203abcc1933b5ee2380d1e86c9ac83a7b1
|
|
| MD5 |
6cb7e87b0d91cc75d3667c4d974b2d4b
|
|
| BLAKE2b-256 |
f510c600f8cbb4bd3ab65aa26fa804057e2210040b9d6bf3ba42f46a317b2fb8
|