Influxion Python SDK
Instrument your agents with the Influxion SDK to capture sessions and artifacts for evaluation.
Installation
Install from PyPI:
pip install -U influxion
Or, if installing from source:
pip install -e ".[dev]"
Quickstart
import influxion
from influxion import InfluxionClient
influxion.init(
api_key="sk-...", # or set INFLUXION_API_KEY
project_id="my-project",
agent_id="report-agent",
)
client = InfluxionClient()
# Define your unique session ID
session_id = "weekly-report-2026-03-11"
client.create_session(
session_id=session_id,
name="weekly-report-run",
tags=["weekly"],
metadata={"env": "prod"},
)
# Do your agent work...
report = run_my_agent()
# Record tool call for evaluation (optional)
client.create_session_tool_call(
session_id=session_id,
name="fetch_data",
input={"source": "api", "query": "Q4 revenue"},
output={"rows": 42, "status": "ok"},
)
# Record artifact for evaluation (optional)
client.create_session_artifact(
session_id=session_id,
name="report",
artifact=report,
type="text",
)
Async Usage
import influxion
from influxion import AsyncInfluxionClient
influxion.init(
api_key="sk-...", # or set INFLUXION_API_KEY
project_id="my-project",
agent_id="my-agent",
)
client = AsyncInfluxionClient()
session_id = "my-session-123"
await client.create_session(
session_id=session_id,
name="My Session",
)
await client.create_session_tool_call(
session_id=session_id,
name="search",
input={"query": "latest news"},
output={"results": [...]},
)
await client.create_session_artifact(
session_id=session_id,
name="output",
artifact="...",
)
Configuration
| Parameter | Environment variable | Default |
|---|---|---|
api_key |
INFLUXION_API_KEY |
— (required) |
base_url |
INFLUXION_BASE_URL |
https://api.influxion.io/v1 |
fail_silently |
— | True |
Set api_key, project_id, and agent_id once with influxion.init(...) so you don't pass them to client or method calls.
fail_silently=True (default): call-time errors are logged and methods return None
rather than raising. Set fail_silently=False during development to surface errors
immediately. AuthenticationError at construction always raises regardless.
Running Tests
pip install -e ".[dev]"
pytest
Metadata
Release files for influxion 0.0.4
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| influxion-0.0.4.tar.gz | 14.4 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| influxion-0.0.4-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 29.0 kB
Release files / influxion-0.0.4.tar.gz
| Download URL | influxion-0.0.4.tar.gz |
|---|---|
| Size | 14.4 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
46c14871778794c8693ba3177e582fb45f3e5630c709a7d44d52ec8823dabeb5
|
|
BLAKE2b-256 checksum How to use checksums |
9ddad6db8e5fc770c953964054e2ee882379374d775a0421fc2dee265661317b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.4
|
Release files / influxion-0.0.4-py3-none-any.whl
| Download URL | influxion-0.0.4-py3-none-any.whl |
|---|---|
| Size | 14.5 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
f8c0cc146083937079077354a930e42627d2cef4f30dbe68aa1cfcda23241749
|
|
BLAKE2b-256 checksum How to use checksums |
65be978769538af157d0aa343a1179e3a069b738ffe4bc0697a97c719e1db7ec
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.2.0 CPython/3.13.4
|