Skip to main content

Miksi-AI empowers your BI

Project description

Intro

Miksi AI agent works with a couple of tools to give you the final value. Mostly, it's an interchange between a tool that executes SQL queries and the one that executes the python code to generate graphs.

While the agent is instructed strictly not to execute code that writes/modifies the data, we advise you to provide a database user with only read permission to the agent.

The python code to generate graphs/charts/tables is executed within a separate virtual environment. This environment is created by default during agent initialization, at the base directory—you will see a directory called venvs. All the agent's dependencies in relation to python will be installed here—for instance, matplotlib for graphics and charts. So this will be totally independent of any other virtual environments you are running.

The generated graphs/charts by default are saved in a directory called media at the base directory. By base directory, we mean relative to where you are running the scripts that utilize our agent.

Install Miksi-AI SDK:

  • Install the latest version: pip install miksi_ai_sdk

Connecting to the Database

Miksi abstracts connecting to your SQL database into "you just provide credentials" and the rest is handled.

from miksi_ai_sdk.sqltool import set_database_config, check_db_config_variables

 set_database_config will set the database credentials
# check_db_config_variables() will report back if any of those credentials hasn't been set or is None
set_database_config(db_name, db_user, db_password, db_host, db_port)

Keep this open when running the agent since the connection closes after every operation.

print(f"db credentials: {check_db_config_variables()}")

We now start setting up the agent by initializing the python environment.

Initialize Python Environment

from miksi_ai_sdk.master import initialize_env

initialize_env(env_path)

The above method will initialize an existing environment or create a new one in case none exists in the specified path. Some default standard python modules will also be installed, so this process may take some minutes when configuring/setting up for the first time.

env_path as an argument is the location you wish to create this virtual environment.

Additional Installs

Miksi AI gives you the flexibility to run additional installations for python and instruct the agent to use them. For instance, you can install matplotlib and ask the agent to use it for generating graphs/charts, or you can prefer another standard module such as plotly or seaborn. This is entirely upon you. By default, matplotlib is the default plotting library. This is also a great way to debug import not found error.

To install additional modules, run:

from miksi_ai_sdk.master import safe_install_modules

safe_install_modules(['modules_here'])

Creating the Agent

Miksi AI agent is context-aware, accepts custom instructions in natural language (e.g., give the answer in Slovakian), and helps maintain the states. It accepts user questions and uses the tools inside virtual environments to arrive at the final answer. Provide your own instructions in natural language (e.g., a sample on how to format the final answer or the language to give the final answer in).

from miksi_ai_sdk.agent import create_agent

agent = create_agent(miksi_api_key=miksi_api_key, media_path=media_path, instructions=instructions)

Get your API Key:

  • Visit MiksiAPI, sign up or log in, then generate your API key. This API key will be used to use the Miksi SDK.

media_path is the directory where you wanted generated graphs/images/charts to be saved for rendering in your application.

Running the Agent

query = "your query here"
answer = run_agent(agent, query)

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 Distributions

miksi_ai_sdk-0.0.12-cp311-cp311-win_amd64.whl (153.4 kB view details)

Uploaded CPython 3.11 Windows x86-64

miksi_ai_sdk-0.0.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (971.8 kB view details)

Uploaded CPython 3.11 manylinux: glibc 2.17+ x86-64

miksi_ai_sdk-0.0.12-cp311-cp311-manylinux2014_x86_64.whl (971.4 kB view details)

Uploaded CPython 3.11

miksi_ai_sdk-0.0.12-cp311-cp311-macosx_10_9_universal2.whl (318.8 kB view details)

Uploaded CPython 3.11 macOS 10.9+ universal2 (ARM64, x86-64)

miksi_ai_sdk-0.0.12-cp310-cp310-win_amd64.whl (151.5 kB view details)

Uploaded CPython 3.10 Windows x86-64

miksi_ai_sdk-0.0.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (857.9 kB view details)

Uploaded CPython 3.10 manylinux: glibc 2.17+ x86-64

miksi_ai_sdk-0.0.12-cp310-cp310-manylinux2014_x86_64.whl (857.6 kB view details)

Uploaded CPython 3.10

miksi_ai_sdk-0.0.12-cp310-cp310-macosx_11_0_x86_64.whl (163.5 kB view details)

Uploaded CPython 3.10 macOS 11.0+ x86-64

miksi_ai_sdk-0.0.12-cp39-cp39-win_amd64.whl (174.5 kB view details)

Uploaded CPython 3.9 Windows x86-64

miksi_ai_sdk-0.0.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (860.7 kB view details)

Uploaded CPython 3.9 manylinux: glibc 2.17+ x86-64

miksi_ai_sdk-0.0.12-cp39-cp39-manylinux2014_x86_64.whl (860.4 kB view details)

Uploaded CPython 3.9

miksi_ai_sdk-0.0.12-cp39-cp39-macosx_11_0_x86_64.whl (164.3 kB view details)

Uploaded CPython 3.9 macOS 11.0+ x86-64

miksi_ai_sdk-0.0.12-cp38-cp38-win_amd64.whl (175.5 kB view details)

Uploaded CPython 3.8 Windows x86-64

miksi_ai_sdk-0.0.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (878.0 kB view details)

Uploaded CPython 3.8 manylinux: glibc 2.17+ x86-64

miksi_ai_sdk-0.0.12-cp38-cp38-manylinux2014_x86_64.whl (877.6 kB view details)

Uploaded CPython 3.8

miksi_ai_sdk-0.0.12-cp38-cp38-macosx_11_0_x86_64.whl (163.5 kB view details)

Uploaded CPython 3.8 macOS 11.0+ x86-64

miksi_ai_sdk-0.0.12-cp37-cp37m-win_amd64.whl (175.1 kB view details)

Uploaded CPython 3.7m Windows x86-64

miksi_ai_sdk-0.0.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl (787.6 kB view details)

Uploaded CPython 3.7m manylinux: glibc 2.17+ x86-64

miksi_ai_sdk-0.0.12-cp37-cp37m-manylinux2014_x86_64.whl (787.2 kB view details)

Uploaded CPython 3.7m

miksi_ai_sdk-0.0.12-cp37-cp37m-macosx_11_0_x86_64.whl (162.2 kB view details)

Uploaded CPython 3.7m macOS 11.0+ x86-64

File details

Details for the file miksi_ai_sdk-0.0.12-cp311-cp311-win_amd64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp311-cp311-win_amd64.whl
Algorithm Hash digest
SHA256 55e65daebdedbbace98c95ca3f5d85cd5d4a21e6ca6467012c6f86c990e1a446
MD5 fe8ee50a271708a1b2b330a46b5e12c6
BLAKE2b-256 3c7078fe5f04b234d3effeb7970170e9b7d870adf938a3dd876a6e9309927a5c

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 28cee8175aa5a7c2f33fca0a0caf091bc3d96c9064eb88e270a3ac69a56e66b4
MD5 54bc7008278bbba9c236705b40c9bd82
BLAKE2b-256 072d712e9ae741d44cb5348ca6a8933d796ea6218a2db6294ca7f59dbf9070d7

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp311-cp311-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp311-cp311-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 b9c5a1b3fb243a9f44cb65bf1c5e21abab43797bf650b3e874bdbb3fe3fd2585
MD5 4c445b3f29b53d88f991e60cba128cf7
BLAKE2b-256 69c6bc945071ff9e0be008543602dc90fced146d071d13510884b0adf363502d

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp311-cp311-macosx_10_9_universal2.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp311-cp311-macosx_10_9_universal2.whl
Algorithm Hash digest
SHA256 dbaf0ebea9b86c32102a8ef1b3914a8223d327588e72fb994f85c72a9b0d077f
MD5 8c083b8b2d765a6e93c234e347f0aa6a
BLAKE2b-256 6713b0c236d073431a7482a1cbaace7718c008c34e76ccb875b152c3bcbb5b95

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp310-cp310-win_amd64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp310-cp310-win_amd64.whl
Algorithm Hash digest
SHA256 d56161a64dd02df5806c498197ad0e5455d7c423eede2bc70f634618991dcebe
MD5 c86adc69a23a9feb4b63cdfa0d412b8b
BLAKE2b-256 9a3e848b4de948ad2f785e98f9374b088669a87af60d45603e01f97c1533f31c

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 37cb6958b015790466d76bb537daf6c343893068336a36806090ed0691d6b489
MD5 a26dbe5c7b2dedb22405f19dfe9535f3
BLAKE2b-256 034d45db56a27837e76a5b63b74a63b51f5838e9c3159752522b2fa7bc6853f8

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp310-cp310-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp310-cp310-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c7bed9ebec2ac7884eac6915b3be38fea4e21a236d09f1ce986dbaad6501783a
MD5 7afade73172a7bb719999c8b57a13932
BLAKE2b-256 269b89e9424a13017dac81456fd5f4636f1e492da21a3af7bdf1cd1ec5d9d710

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp310-cp310-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp310-cp310-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 03078c0529e314c3519b302b17d666e52d9d8b6a3d3065decf8daae4e2009cbf
MD5 1c74f65ade840285496539bacdb53051
BLAKE2b-256 c5a33997ffb2a9fb2b7cec922705818a6d606eb50f1116a6929fddb07b911b02

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp39-cp39-win_amd64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp39-cp39-win_amd64.whl
Algorithm Hash digest
SHA256 af378f92fa74715f836c18ef91cc25966210312006f4f06b392ed55a270a0508
MD5 e365017baeab71589da4f6625c3497c7
BLAKE2b-256 e9567fb68847ce82c113105c6c9279014efd42ead39859d62e77b06c1d364246

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 0c5a2c019a00f79b8b7c2cd09f679a87f9ded52c7520dc4484254d5170b81a41
MD5 557dec37a3733194740b31061b4a7932
BLAKE2b-256 7eb66dbab54d33e3ffb8d5a531ec7ca36a5755360651a18e200830968aa4fd7c

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp39-cp39-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp39-cp39-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 851ddecdb24a7597c2397077476883efd71888aca0b69da5efec212c74813f9a
MD5 c33117515528834f5e47bdce3dc3d7b5
BLAKE2b-256 ac50a9492422a46fbd9a80464070adc857b089372f647eea7d3700202e59124b

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp39-cp39-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp39-cp39-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 979930e771178a5651712ea3d0162e00901d6514ae24210abeb397c340320dc8
MD5 4f8adea734d85e44b147edfd99d9b1dd
BLAKE2b-256 74c05cd3086057c71b070ede9493484601436bcd4a4baa6e4a82b31154dfa588

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp38-cp38-win_amd64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp38-cp38-win_amd64.whl
Algorithm Hash digest
SHA256 7f774ba628257c1918d01651007264595490a442e4832f14395ff0d9f2efa245
MD5 ebf6c96dbe9d935d83fc8bbe18c79e18
BLAKE2b-256 676b691287cf07d7b0a2bbd26777f5c6949baff506b7f24e3fdcaf82d9f3ca31

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 323534cf693eeddd5b10b297783bec50617b4089883cc88a99d32e7c89471018
MD5 f7cebee9361ab07fa7f494b0fd1cb2fe
BLAKE2b-256 394929c9b064efd6bde3ef75ce2ce0897f053815765cd4177c7063ffb10dde49

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp38-cp38-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp38-cp38-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 563b4340f20da6ae8b172ab26f33d1f4b5f01735c36915d35a9fb55dcc45e587
MD5 1ddb7011040e5881465d5009b7104ad5
BLAKE2b-256 4e9860064ecf5b5391714cabbcda7c9d8355a479243b5b486948ee4cbeccc727

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp38-cp38-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp38-cp38-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 4c6b2b77c2bfeb87e83d5c3f4ad60fc012a976355febade145c0da4b8bb3f83d
MD5 21181cdc960a2e2f87f3647dc4acce35
BLAKE2b-256 40f3c25ade63855383ba2dce78a201f15e6ba06e7d16b8be87cd51b6e01c9b26

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp37-cp37m-win_amd64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp37-cp37m-win_amd64.whl
Algorithm Hash digest
SHA256 1bc6643c2f2323c78b9278fc08af36828ddb7722904c46a3a667271bbe68a5c6
MD5 3e1837e03968c546d0dabbe62bf283c7
BLAKE2b-256 77e0e2d9a7e879de5d45602d7a8689f8af4a17737c95166a68d6474d9dd79131

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp37-cp37m-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 830c778d6ce44c2e2bf44b1f4cca30462acc82c28ff692babf791b25bfaa9b24
MD5 8826ce9aa279aee07c41ab6153f0862e
BLAKE2b-256 886579c99eaef8755bb397160a8278906f56cce83810470748919b3c112feeba

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp37-cp37m-manylinux2014_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp37-cp37m-manylinux2014_x86_64.whl
Algorithm Hash digest
SHA256 c113187ff76b8f05e73b1ad38d0f3ddb15e74afcd36c30a18da0dd17f1493650
MD5 2b30e33179c8c1fd57c893c9d31dbda9
BLAKE2b-256 614119cb9df4afe6555b6cdc4fb2abf5fb99fa96a0567b078b68695132c24be0

See more details on using hashes here.

File details

Details for the file miksi_ai_sdk-0.0.12-cp37-cp37m-macosx_11_0_x86_64.whl.

File metadata

File hashes

Hashes for miksi_ai_sdk-0.0.12-cp37-cp37m-macosx_11_0_x86_64.whl
Algorithm Hash digest
SHA256 c8ca5e90ce01e4c7de66b8d7b28311485116e67d12d7903ed95ac86fe5cf2978
MD5 7ed6956f55a3af63532dd714dfc06849
BLAKE2b-256 e3dd341024ac7e611178e0f8af2a31bccdf35f4a8e927281c6315ded6882d1c0

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page