Influxion Python SDK
Project description
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
Project details
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 influxion-0.0.4.tar.gz.
File metadata
- Download URL: influxion-0.0.4.tar.gz
- Upload date:
- Size: 14.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
46c14871778794c8693ba3177e582fb45f3e5630c709a7d44d52ec8823dabeb5
|
|
| MD5 |
236fb18204a9fa864cee0d80e1d8e8d2
|
|
| BLAKE2b-256 |
9ddad6db8e5fc770c953964054e2ee882379374d775a0421fc2dee265661317b
|
File details
Details for the file influxion-0.0.4-py3-none-any.whl.
File metadata
- Download URL: influxion-0.0.4-py3-none-any.whl
- Upload date:
- Size: 14.5 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.13.4
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f8c0cc146083937079077354a930e42627d2cef4f30dbe68aa1cfcda23241749
|
|
| MD5 |
f919318b2643b20a9782c1a0d0009015
|
|
| BLAKE2b-256 |
65be978769538af157d0aa343a1179e3a069b738ffe4bc0697a97c719e1db7ec
|