Open PTC Agent automates code execution with Programatic Tool Calling (PTC) for operations teams. It connects to LangChain and Langraph workflows, enabling developers to build custom agents for Claude LLM. The open-source tool is written in Python 3.12+ and is licensed under MIT.
git clone https://github.com/Chen-zexi/open-ptc-agent.githttps://github.com/Chen-zexi/open-ptc-agent
["Install the Open PTC Agent via pip: `pip install open-ptc-agent` (requires Python 3.12+). Verify the installation with `ptc-agent --version`.","Configure the agent by creating a Python script or Jupyter notebook. Set up the workflow (LangChain/LangGraph) and define the model parameters (e.g., `model='llama3'`, `temperature=0.7`).","Define the task using the `execute()` method. Specify the task description, required tools (e.g., `pandas`, `requests`), and input data (e.g., file paths, API endpoints).","Run the agent via command line (`ptc-agent run --script your_script.py`) or directly in your IDE. Monitor logs for progress and errors.","For debugging, enable verbose logging (`--verbose` flag) or use the agent's built-in error handling to retry failed tasks. Review the output directory for generated artifacts."]
Automate the analysis of financial market data by fetching and processing stock prices for multiple tickers.
Create complex data visualizations by executing Python code that aggregates and transforms raw data.
Streamline the generation of reports by automating the extraction and formatting of data from various sources.
Implement background tasks that allow for asynchronous execution of multiple data processing jobs without blocking the main workflow.
No install command available. Check the GitHub repository for manual installation instructions.
git clone https://github.com/Chen-zexi/open-ptc-agentCopy the install command above and run it in your terminal.
Launch Claude Code, Cursor, or your preferred AI coding agent.
Use the prompt template or examples below to test the skill.
Adapt the skill to your specific use case and workflow.
Use the Open PTC Agent to [TASK] by integrating it with [LANGCHAIN/LANGGRAPH_WORKFLOW]. Configure the agent with [PYTHON_CONFIGURATION] and execute it via [COMMAND_LINE_INTERFACE]. Monitor the output and handle any errors using [LOGGING/DEBUGGING_TOOLS].
```python
# Example: Automating a data processing task with Open PTC Agent
from open_ptc_agent import PTC_Agent
from langchain_community.llms import Ollama
# Initialize the agent with a custom workflow
agent = PTC_Agent(
workflow="data_processing_pipeline",
config={
"model": "llama3",
"temperature": 0.7,
"max_tokens": 1000
}
)
# Define the task: Process a CSV file and generate a summary report
result = agent.execute(
task="Process the sales_data.csv file to generate a summary report with total revenue, top products, and sales trends.",
tools=["pandas", "matplotlib"],
input_data={
"file_path": "/data/sales_data.csv",
"output_dir": "/reports"
}
)
# Output the results
print("Task completed successfully!")
print("Generated report:", result['report_path'])
print("Summary metrics:", result['metrics'])
```
**Execution Log:**
```
[2024-05-20 14:30:22] INFO: Initializing PTC Agent with workflow 'data_processing_pipeline'
[2024-05-20 14:30:25] INFO: Loading model 'llama3' with config {'temperature': 0.7, 'max_tokens': 1000}
[2024-05-20 14:30:28] INFO: Executing task: Process sales_data.csv
[2024-05-20 14:31:15] INFO: Data loaded successfully. Rows: 12,450
[2024-05-20 14:32:03] INFO: Generating summary report...
[2024-05-20 14:32:45] INFO: Report saved to /reports/sales_summary_2024-05-20.pdf
[2024-05-20 14:32:45] INFO: Metrics calculated: Total Revenue: $1,245,678.90, Top Product: Widget Pro (34% of sales)
```
The agent successfully processed the CSV file, generated a visual summary report with matplotlib, and calculated key metrics. The report is now ready for review in the specified output directory.Cloud ETL platform for non-technical data integration
IronCalc is a spreadsheet engine and ecosystem
Get more done every day with Microsoft Teams – powered by AI
Customer feedback management made simple
Enterprise workflow automation and service management platform
Automate your spreadsheet tasks with AI power
Take a free 3-minute scan and get personalized AI skill recommendations.
Take free scan