Skip to main content

The Railtracks Framework for building resilient agentic systems in simple python

Project description

PyPI version Python Versions License PyPI - Downloads Docs GitHub stars Discord

Helpful Links

📘 Documentation
🚀 Examples
🛠 API Reference
💬 Join Discord

What is Railtracks?

Railtracks is a lightweight agentic LLM framework for building modular, multi-LLM workflows. Unlike other frameworks like LangGraph and Google ADK, Railtracks focuses on:

  • Simple Python-first APIs -> no graphs, just regular Python code
  • Built-in visualization and debugging tools -> understand and trace your agent flows visually
  • Zero setup overhead -> run it like any other Python script without special directories or configs
Feature Railtracks LangGraph Google ADK
Python-first, no DSL ✅ Yes ❌ No ✅ Yes
Built-in visualization ✅ Yes ✅ Yes ⚠️ Limited
Simple Running ✅ Yes ✅ Yes ❌ No
LLM-agnostic ✅ Yes ✅ Yes ✅ Yes

Get started with either the quick start or via the docs

Quick Start

Build your first agentic system in just a few steps. Start by building an agent which solves the "how many r's are in Strawberry?" problem.

Step 1: Install the Library

# Core library
pip install railtracks

# [Optional] CLI support for development and visualization
pip install railtracks-cli

Step 2: Define a Tool

import railtracks as rt

# Create your tool
@rt.function_node
def number_of_chars(text: str, character_of_interest: str) -> int:
    return text.count(character_of_interest)

@rt.function_node
def word_count(text: str) -> int:
    return len(text.split())

Step 3: Create your agent (connecting your LLM)

TextAnalyzer = rt.agent_node(
    tool_nodes={number_of_chars, word_count},
    llm=rt.llm.OpenAILLM("gpt-4o"), # use any model you want
    system_message=(
        "You are a text analyzer. You will be given a text and you should utilize the tools available to analyze it."
    ),
)

Step 4: Run Your Application

import asyncio

@rt.session
async def main():
    result = await rt.call(
        TextAnalyzer,
        rt.llm.MessageHistory([
            rt.llm.UserMessage("Hello world! This is a test of the Railtracks framework.")
        ])
    )
    print(result)

asyncio.run(main())

Optional: Visualize the Run

railtracks init
railtracks viz

And just like that, you're up and running. The possibilities are endless.


Contributing

See CONTRIBUTING.md for guidelines.

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

railtracks-1.1.10.tar.gz (246.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

railtracks-1.1.10-py3-none-any.whl (183.6 kB view details)

Uploaded Python 3

File details

Details for the file railtracks-1.1.10.tar.gz.

File metadata

  • Download URL: railtracks-1.1.10.tar.gz
  • Upload date:
  • Size: 246.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for railtracks-1.1.10.tar.gz
Algorithm Hash digest
SHA256 d6199a98646fb1e4d4ff50a75b90bbd658b5d3f96424f2258c5047fed3a0cbb5
MD5 f0ec4c15fa5d4fbe0a11acf222410c30
BLAKE2b-256 c7ecc45e3fbf59c10c548a571308a2f78069d696e9d4f3ce565848d06f1b1553

See more details on using hashes here.

File details

Details for the file railtracks-1.1.10-py3-none-any.whl.

File metadata

  • Download URL: railtracks-1.1.10-py3-none-any.whl
  • Upload date:
  • Size: 183.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-requests/2.32.5

File hashes

Hashes for railtracks-1.1.10-py3-none-any.whl
Algorithm Hash digest
SHA256 44135898cbbf1f23d8b1fae6f9cc437f40747a59d5289c18dad2b250dee14ec4
MD5 79b46097e57fdd956c3332a3daeb9ee9
BLAKE2b-256 7999c088e38f926fd6c50cb3c8c6e5f0e2836ebca8dbf2ad6f2bc768f323d4b9

See more details on using hashes here.

Supported by

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