Metadata-Version: 2.4
Name: railtracks
Version: 1.1.3
Summary: Railtown AI RailTracks Framework for building resilient agentic systems
Author-email: Logan Underwood <logan@railtown.ai>, Levi Varsanyi <levi@railtown.ai>, Jaime Bueza <jaime@railtown.ai>, Amir Refaee <amir@railtown.ai>, Aryan Ballani <aryan@railtown.ai>, Tristan Brown <tristan@railtown.ai>
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: colorama >= 0.4.6
Requires-Dist: litellm[proxy] >= 1.70.2
Requires-Dist: mcp >= 1.9.0
Requires-Dist: openai < 1.100.0
Requires-Dist: pydantic >= 2.5.3, <3
Requires-Dist: python-dotenv >= 1.0.0
Requires-Dist: PyYAML >= 6.0
Requires-Dist: railtracks[chat, rag, integrations] ; extra == "all"
Requires-Dist: fastapi >= 0.104.0 ; extra == "chat"
Requires-Dist: railtracks[chat] ; extra == "core"
Requires-Dist: litellm[proxy] >= 1.70.2 ; extra == "rag"
Requires-Dist: openai < 1.100.0 ; extra == "rag"
Project-URL: documentation, https://railtown.github.io/railtracks
Project-URL: railtown, https://railtown.ai
Project-URL: railtracks, https://railtracks.org
Project-URL: repository, https://github.com/RailtownAI/railtracks
Project-URL: ui-repository, https://github.com/RailtownAI/railtracks-visualizer
Provides-Extra: all
Provides-Extra: chat
Provides-Extra: core
Provides-Extra: integrations
Provides-Extra: rag

# RailTracks

![RailTracks](../../docs/assets/logo.svg)

## 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

```bash
# Core library
pip install railtracks

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

### Step 2: Define Your Modular Components

```python
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

```python
@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

```bash
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](../../CONTRIBUTING.md) to get started.
