Agenta is an open-source LLMOps platform for prompt engineering, evaluation, and deployment. The `agenta` Python SDK (v0.96.10) integrates with your LLM applications to manage prompts, track variants, run evaluations, and collect observability data. Requires Python >=3.11, <4.0. Active development with frequent releases.
pip install agentaVerified import paths — ran on the pinned version, not inferred.
Initialize the SDK and call a prompt from a deployed variant.
Migrate to the new invoke API: use POST /api/v1/apps/{app_id}/variants/{variant_id}/invoke with {'inputs': ...}. See migration guide at https://docs.agenta.ai.Upgrade Python to 3.11+ or pin agenta <0.96.0 if you must use an older Python.
Always call `agenta.init(api_key=..., host=...)` at the start of your application.
Replace any calls to `/variant/configs/fetch` with the new unified invoke endpoint.
Set the environment variable in your shell or pass `api_key` explicitly: `agenta.init(api_key='...')`.
Upgrade to agenta >=0.96.0 and use `from agenta import prompt`. If using an older version, use `from agenta.sdk import prompt` or check the docs.
Verify the app_slug and variant name in the Agenta UI. Ensure the variant is deployed (status 'deployed'). Check the host URL.
Add `agenta.init(api_key=..., host=...)` at the beginning of your code, before any other agenta calls.
Upgrade to agenta >=0.96.0 with `pip install agenta --upgrade`. For older versions, check the docs for the correct init method.