Skip to main content

open-taranis

Python framework for AI agents logic-only coding with streaming, tool calls, and multi-LLM provider support.

Only the "fairly stable" versions are published on PyPi, but to get the latest experimental versions, clone this repository and install it !

Installation

pip install open-taranis --upgrade

For package on PyPi

or

git clone https://github.com/SyntaxError4Life/open-taranis && cd open-taranis/ && pip install .

For last version

Quick Start

Simplest
import open_taranis as T

client = T.clients.openrouter() # API_KEY in env_var

messages = [
    T.create_user_prompt("Tell me about yourself")
]

stream = T.clients.openrouter_request(
    client=client,
    messages=messages,
    model="nvidia/nemotron-3-nano-30b-a3b:free", 
)

print("assistant : ",end="")
for token, tool, tool_bool in T.handle_streaming(stream) : 
    if token :
        print(token, end="")
Make a simple agent with a context windows on the 6 last turns
import open_taranis as T

class Agent(T.agent_base):
    def __init__(self):
        super().__init__()

        self.client = T.clients.openrouter()
        self._system_prompt = [T.create_system_prompt(
            "You're an agent nammed **Taranis** !"
        )]


    def create_stream(self):
        return T.clients.openrouter_request(
            client=self.client,
            messages=self._system_prompt+self.messages,
            model="nvidia/nemotron-3-nano-30b-a3b:free"
        )

    def manage_messages(self):
        self.messages = self.messages[-12:] # Each turn have 1 user and 1 assistant

My_agent = Agent()

while True :
    prompt = input("user : ")

    print("\n\nagent : ", end="")

    for t in My_agent(prompt):
        print(t, end="", flush=True)
    
    print("\n\n","="*60,"\n")
To create a simple display using gradio as backend
import open_taranis as T
import open_taranis.web_front as W
import gradio as gr

class Gradio_agent(T.agent_base):
    def __init__(self):
        super().__init__()

        self._system_prompt = [T.create_system_prompt("You are a agent nammed **Taranis**")]
    
    def manage_token_yield(self, token, is_thinking):
        return token, is_thinking
    
    def create_stream(self):
        return T.clients.openrouter_request(
            client=T.clients.openrouter(),
            messages=self._system_prompt+self.messages,
            model="nvidia/nemotron-3-nano-30b-a3b:free"
        )

gr.ChatInterface(
    fn=W.create_fn_gradio(Gradio_agent()),
    title="Open-taranis Agent"
).launch()

Use the commands :

  • taranis help : in the name...
  • taranis update : upgrade the framework
  • taranis open : open the TUI

The TUI :

TUI

  • /help to start

Documentation :

Available in French

Roadmap

  • v0.0.1: start
  • v0.0.x: Add and confirm other API providers (in the cloud, not locally)
  • v0.1.x: Functionality verifications in examples
  • v0.2.x: Add features for logic-only coding approach, start with agent_base
  • v0.3.x: Add a full agent in TUI and upgrade web client deployments
  • v0.4.x: Improving support for local AI deployment
  • The rest will follow soon.

Changelog

v0.0.x : The start
  • v0.0.4 : Add xai and groq provider
  • v0.0.6 : Add huggingface provider and args for clients.veniceai_request
v0.1.x : Gradio, commands and TUI
  • v0.1.0 : Start the docs, add update-checker and preparing for the continuation of the project...
  • v0.1.1 : Code to deploy a frontend with gradio added (no complex logic at the moment, ex: tool_calls)
  • v0.1.2 : Fixed a display bug in the web_front and experimentally added ollama as a backend
  • v0.1.3 : Fixed the memory reset in the web_front and remove ollama module for openai front (work 100 times better)
  • v0.1.4 : Fixed web_front for native use on huggingface, as well as handle_streaming which had tool retrieval issues
  • v0.1.7 : Added a TUI and commands, detection of env variables (API keys) and tools in the framework
v0.2.x : Agents
  • v0.2.0 : Adding agent_base
  • v0.2.1 : Updated agent_base and added a more concrete example of agents
  • v0.2.2 : Upgraded all the code to add Kimi Code as client and reduce code (Not official !)
  • v0.2.3 : Updated agent_base, add some functions and add a cool agent
  • v0.2.4 : Improved CoT techniques and updated web_front.py, deploy an agent to the browser in a few lines
v0.3.x : The restart
  • v0.3.0 : Rewrite all the code from scratch (without AI) to improve everything
  • v0.3.1 (future) : Add a built-in agent in the TUI + full doc in french and english

Advanced Examples

Metadata

Release files for open-taranis 0.3.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for open-taranis 0.3.0
File Size Uploaded Provenance Actions
open_taranis-0.3.0.tar.gz 44.6 kB Without provenance Details for open_taranis-0.3.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for open-taranis 0.3.0
File Interpreter ABI Platform Actions
open_taranis-0.3.0-py3-none-any.whl Python 3 none any Details for open_taranis-0.3.0-py3-none-any.whl

Total release size: 75.6 kB

Release files / open_taranis-0.3.0.tar.gz

Download URL open_taranis-0.3.0.tar.gz
Size 44.6 kB
Tags Source
SHA-256 checksum
How to use checksums
c173b3b91803872107c7939c9a14a0ec6c32b69b8de8b5eb78e0359ff8896007
BLAKE2b-256 checksum
How to use checksums
9a64a63dba2695bcbdcdba902836c2329113102e58f5ce2817564c0cc5d8f499
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Release files / open_taranis-0.3.0-py3-none-any.whl

Download URL open_taranis-0.3.0-py3-none-any.whl
Size 30.9 kB
Tags Python 3
SHA-256 checksum
How to use checksums
0b5f34a3496ec133d5a519384d90e472b521cc323d39452c032cb1f385fd3c41
BLAKE2b-256 checksum
How to use checksums
0a3c54ea71ee84c9d74ab9a61f868062ffe1182ad2994efb37fe94259327315b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.13

Security for open-taranis 0.3.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page