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.8.tar.gz (229.6 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.8-py3-none-any.whl (167.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for railtracks-1.1.8.tar.gz
Algorithm Hash digest
SHA256 380aad3abd989708714bf7c9620958503edd7d4306def497bf0ea5e25c13aa2b
MD5 d1f6c6809fb83835774c45b58a220c5d
BLAKE2b-256 82afc67e8f1d5844dbea08a8b291b555e20f0e48d5b3c72c55b60a0bd8442a46

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for railtracks-1.1.8-py3-none-any.whl
Algorithm Hash digest
SHA256 992b4dfae78eb9b3d1d446a19e400b10ade95106d53b7ebf11f029226f0f4f2a
MD5 bc3d5e7c7b5186600af693080265c42f
BLAKE2b-256 72ed48b28f9cd12b644d9b64f4cb17502d0e86aba5eb0489e50b010a631fcd10

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