https://github.com/railtownai/railtracks
An agentic framework that helps developers build resilient agentic systems
https://github.com/railtownai/railtracks
ai ai-agents ai-agents-framework framework opensource python
Last synced: about 1 month ago
JSON representation
An agentic framework that helps developers build resilient agentic systems
- Host: GitHub
- URL: https://github.com/railtownai/railtracks
- Owner: RailtownAI
- License: mit
- Created: 2025-01-16T19:07:24.000Z (about 1 year ago)
- Default Branch: main
- Last Pushed: 2026-02-12T23:32:36.000Z (about 1 month ago)
- Last Synced: 2026-02-13T03:56:59.541Z (about 1 month ago)
- Topics: ai, ai-agents, ai-agents-framework, framework, opensource, python
- Language: Python
- Homepage: http://railtracks.org/
- Size: 13.5 MB
- Stars: 113
- Watchers: 1
- Forks: 5
- Open Issues: 124
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: .github/CODE_OF_CONDUCT.md
- Codeowners: .github/CODEOWNERS
- Security: SECURITY.md
Awesome Lists containing this project
README
# Railtracks
Agents in minutes β’ Zero config β’ Local visualization β’ Pure Python
---
## β¨ What is **Railtracks**?
Easy agent building, for no one but **YOU**: Create deployable complex agents using simple, Pythonic style interface with natural control flow.
```python
import railtracks as rt
# Define a tool (just a function!)
def get_weather(location: str) -> str:
return f"It's sunny in {location}!"
# Create an agent with tools
agent = rt.agent_node(
"Weather Assistant",
tool_nodes=(rt.function_node(get_weather)),
llm=rt.llm.OpenAILLM("gpt-4o"),
system_message="You help users with weather information."
)
# Run it
result = await rt.call(agent, "What's the weather in Paris?")
print(result.text) # "Based on the current data, it's sunny in Paris!"
```
**That's it.** No complex configurations, no learning proprietary syntax. Just Python.
---
## π― Why Railtracks?
#### π **Pure Python Experience**
```python
# Write agents like regular functions
@rt.function_node
def my_tool(text: str) -> str:
return process(text)
```
- β
No YAML, no DSLs, no magic strings
- β
Use your existing debugging tools
- β
IDE autocomplete & type checking
#### π§ **Tool-First Architecture**
```python
# Any function becomes a tool
agent = rt.agent_node(
"Assistant",
tool_nodes=(my_tool, api_call)
)
```
- β
Instant function-to-tool conversion
- β
Seamless API/database integration
- β
MCP protocol support
#### β‘ **Look Familiar?**
```python
# Smart parallelization built-in
# with interface similar to asyncio
result = await rt.call(agent, query)
```
- β
Easy to learn standardized interface
- β
Built-in validation, error handling & retries
- β
Auto-parallelization management
#### ποΈ **Transparent by Design**
```bash
railtracks viz # See everything
```
- β
Real-time execution visualization
- β
Complete execution history
- β
Debug like regular Python code
---
## π Quick Start
π¦ Installation
```bash
pip install railtracks railtracks-cli
```
β‘ Your First Agent in 5 Min
```python
import railtracks as rt
# 1. Create tools (just functions with decorators!)
@rt.function_node
def count_characters(text: str, character: str) -> int:
"""Count occurrences of a character in text."""
return text.count(character)
@rt.function_node
def word_count(text: str) -> int:
"""Count words in text."""
return len(text.split())
# 2. Build an agent with tools
text_analyzer = rt.agent_node(
"Text Analyzer",
tool_nodes=(count_characters, word_count),
llm=rt.llm.OpenAILLM("gpt-4o"),
system_message="You analyze text using the available tools."
)
# 3. Use it to solve the classic "How many r's in strawberry?" problem
@rt.session
async def main():
result = await rt.call(text_analyzer, "How many 'r's are in 'strawberry'?")
print(result.text) # "There are 3 'r's in 'strawberry'!"
# Run it
import asyncio
asyncio.run(main())
```
π Visualize Agent in 5 second
```bash
railtracks init # Setup visualization (one-time)
railtracks viz # See your agent in action
```
π See every step of your agent's execution in real-time
---
## π‘ Real-World Examples
π Multi-Agent Research System
```python
# Research coordinator that uses specialized agents
researcher = rt.agent_node("Researcher", tool_nodes=(web_search, summarize))
analyst = rt.agent_node("Analyst", tool_nodes=(analyze_data, create_charts))
writer = rt.agent_node("Writer", tool_nodes=(draft_report, format_document))
coordinator = rt.agent_node(
"Research Coordinator",
tool_nodes=(researcher, analyst, writer), # Agents as tools!
system_message="Coordinate research tasks between specialists."
)
```
π Complex Workflows Made Simple
```python
# Customer service system with context sharing
async def handle_customer_request(query: str):
with rt.Session() as session:
# Technical support first
technical_result = await rt.call(technical_agent, query)
# Share context with billing if needed
if "billing" in technical_result.text.lower():
session.context["technical_notes"] = technical_result.text
billing_result = await rt.call(billing_agent, query)
return billing_result
return technical_result
```
---
## π What Makes Railtracks Special?
A lightweight agentic LLM framework for building modular, multi-LLM workflows with a focus on simplicity and developer experience.
| Feature | Railtracks
|:--------|:----------:|
| **π Python-first, no DSL** | β
|
| **π Built-in visualization** | β
|
| **β‘ Zero setup overhead** | β
|
| **π LLM-agnostic** | β
|
| **π― Pythonic style** | β
|
---
## π Universal LLM Support
Switch between providers effortlessly:
```python
# OpenAI
rt.llm.OpenAILLM("gpt-4o")
# Anthropic
rt.llm.AnthropicLLM("claude-3-5-sonnet")
# Local models
rt.llm.OllamaLLM("llama3")
```
Works with **OpenAI**, **Anthropic**, **Google**, **Azure**, and more! Check out our neatly crafted [docs](https://railtownai.github.io/railtracks/llm/).
## π οΈ Powerful Features
### π¦ Rich Tool Ecosystem
Use existing tools or create your own:
- β
**Built in Tools** RAG, CoT, etc.
- β
**Functions** β Tools automatically
- β
**MCP Integration** as client or as server
- β
**Agents as Tools** β agent cluster
### π Built-in Observability
Debug and monitor with ease:
- β
Real-time execution graphs
- β
Performance metrics
- β
Error tracking & debugging
- β
Local visualization
- β
Session management
- β
**No signup required!**
---
## π Learn More
Documentation
Complete guides & API reference
Quickstart
Up and running in 5 minutes
Examples
Real-world implementations
Discord
Get help & share creations
Contributing
Help make us better
---
## π Ready to Build?
```bash
pip install railtracks railtracks-cli
```
## β¨ Join developers across the world building the future with AI agents
**You grow, we grow - Railtracks will expand with your ambitions.**
---
Made with lots of β€οΈ and β by the βRailtracksβ team β’ Licensed under MIT β’ [Report Bug](https://github.com/RailtownAI/railtracks/issues) β’ [Request Feature](https://github.com/RailtownAI/railtracks/issues)