Skip to main content

Ory Agent Security for LlamaIndex — per-tool authorization, tracing, and identity propagation by wrapping FunctionTools. Built on ory-argus.

Project description

ory-llamaindex

Ory Agent Security for LlamaIndex.

Wraps your LlamaIndex tools so every call is authorized against Ory Permissions, traced, and tied to the user → agent identity — built on ory-argus.

pip install ory-llamaindex
from llama_index.core.agent.workflow import FunctionAgent
from ory_llamaindex import guard_tools

agent = FunctionAgent(tools=guard_tools([search_tool, email_tool]), llm=llm)

In enforce mode (ORY_PERMISSION_MODE=enforce) a denied tool raises an error surfaced to the agent; the tool never runs. In observe mode (default) it runs and a permission.observe_deny span is recorded.

For tracing across paths that bypass the wrapped tools, register the instrumentation handler:

from llama_index.core.instrumentation import get_dispatcher
from ory_llamaindex import ory_event_handler
get_dispatcher().add_event_handler(ory_event_handler())

Credentials come from the shared ~/.config/ory-agent-plugins/config.json.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distribution

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

ory_llamaindex-0.11.1-py3-none-any.whl (4.4 kB view details)

Uploaded Python 3

File details

Details for the file ory_llamaindex-0.11.1-py3-none-any.whl.

File metadata

  • Download URL: ory_llamaindex-0.11.1-py3-none-any.whl
  • Upload date:
  • Size: 4.4 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: uv/0.11.28 {"installer":{"name":"uv","version":"0.11.28","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"macOS","version":null,"id":null,"libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":null}

File hashes

Hashes for ory_llamaindex-0.11.1-py3-none-any.whl
Algorithm Hash digest
SHA256 915b8635e2489fcabccb642f3f5c1f24165cd0c0a5c4a2eb4ce364d844589a95
MD5 f23848529c7c2113e15e72c3a6758328
BLAKE2b-256 2ddb6e593ad2fcec9c4ecf2b7d4db9aa49be1c67686b2ebca4e20e648b1183b8

See more details on using hashes here.

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