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.9.tar.gz (239.1 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.9-py3-none-any.whl (179.6 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for railtracks-1.1.9.tar.gz
Algorithm Hash digest
SHA256 3b0890846e2ddc498a57fa51ae3d0655e45c068b6337912a32a7e00429c163ab
MD5 ace554f198616abb65f8f67d242bebff
BLAKE2b-256 12eb96e1a513a8cdd23eea83ec7f1ce68b6e7ee71098402aad9fe0c30789a97f

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for railtracks-1.1.9-py3-none-any.whl
Algorithm Hash digest
SHA256 709a5acfb4783d438fe642a152b6066bd0bce08abb8c96bffb1692d7d89b764e
MD5 00ec1e7cd8b14c934b01f2dc933920dd
BLAKE2b-256 8f5692a70c63479c153436912ebc66037ef8f5726c23ca9b420d400a0360fc9e

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