The RailTracks Framework for building resilient agentic systems in simple python
Project description
Helpful Links
📘 Documentation 🚀 Examples 🛠 API Reference 💬 Join Discord
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
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file railtracks-1.1.7.tar.gz.
File metadata
- Download URL: railtracks-1.1.7.tar.gz
- Upload date:
- Size: 227.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
562fc3bf6686561b528d570a169a68c77fe68d88c12aac5437e13b985a50944d
|
|
| MD5 |
ff4dbe511a2d2acd866560ff330cab32
|
|
| BLAKE2b-256 |
08b7c97e006887c653c963a3570dc01ddd26c7486a27f54ad26e9d6297d04108
|
File details
Details for the file railtracks-1.1.7-py3-none-any.whl.
File metadata
- Download URL: railtracks-1.1.7-py3-none-any.whl
- Upload date:
- Size: 166.1 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: python-requests/2.32.5
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
3367ae7f9a96f28a9f81632abdd5da697e75ab29e2c12eaea0446cea40a4f834
|
|
| MD5 |
310f988dac2e30a43529758701a7e023
|
|
| BLAKE2b-256 |
c9fb3aeccf3c8374f29b96c304a22ee223b2dc898c3882995955820c48db1c30
|