Skip to main content

Railtown AI RailTracks Framework for building resilient agentic systems

Project description

RailTracks

RailTracks

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 Your Modular Components

import railtracks as rt

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

# Create your agent (connecting your LLM)
TextAnalyzer = rt.agent_node(
    tool_nodes={number_of_chars, num, CharacterCount},
    llm=rt.llm.OpenAILLM("gpt-4o"),
    system_message=(
        "You are a text analyzer. You will be given a text and return the number of characters, "
        "the number of words, and the number of occurrences of a specific character."
    ),
)

Step 3: Run Your Application

@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)

Step 4: [Optional] Visualize the Run

railtracks init
railtracks viz

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


Contributing

We welcome contributions of all kinds! Check out our contributing guide to get started.

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.3.tar.gz (235.9 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.3-py2.py3-none-any.whl (164.6 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for railtracks-1.1.3.tar.gz
Algorithm Hash digest
SHA256 2eefcd19b3ad1408640a67e7dde6bc65e350fb8970ab6557f397983a24896bf5
MD5 286f6dcf6355e2d5c3a4c0dce2d37510
BLAKE2b-256 8afb63bb064429fc0d1086bd0d93aa54fdbfbeb460a207de0ec4d125ca21835c

See more details on using hashes here.

File details

Details for the file railtracks-1.1.3-py2.py3-none-any.whl.

File metadata

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

File hashes

Hashes for railtracks-1.1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 4cdf8ad0a33fbf11f17b7c054be828c1bfd721c83abb8770919204afe7256337
MD5 37cd907021e9c9029be3b9e0e520bc83
BLAKE2b-256 56c7ffc6d70ec3998b63b77461dc5fc8fd7bf8c0e278a6673de39bad9c90a74c

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