Skip to content

statespace-tech/toolfront

Repository files navigation

ToolFront Logo

ToolFront

Build AI Applications in Markdown

Test Suite PyPI package Discord X


Documentation: docs.toolfront.ai

Source code: https://github.com/statespace-tech/toolfront


Installation

Install toolfront with your favorite PyPI package manager.

pip install toolfront

Quickstart

ToolFront helps you build AI applications in Markdown. This way, you can develop agents the same way you develop regular software.

project/
├── data/
├── README.md
├── spec.json
├── src/
│   ├── api.md
│   ├── rag.md
│   ├── text2sql.md
│   └── toolkit.md
└── tools/

4 directories, 30 files
Entry Point

Start by creating a README with general instructions and tools for your agent.

---
tools:
  - [ls]
  - [cat]

---

# Agent Instructions
- Use `ls` and `cat` to browse the tool site
- Check out `./src` for specialized workflows
API Integration

Connect agents to external APIs and web services using HTTP tools like curl.

---
tools:
  - [curl, -X, GET, "https://api.com/{endpoint}"]

---

# Web API
- Call external APIs to fetch real-time data.
- Pass `{endpoint}` to make GET requests
- Check `/data/spec.json` for available endpoints
Document RAG

Teach your agent how to search and interpret documents with tools like grep.

---
tools
  - [grep]

---

# Document RAG
- Use `grep` to search through `/data/catalog/`
- Cross-reference information across documents
- Look for product IDs, SKUs, or feature details
Text-to-SQL

Connect agents to databases using CLI tools like psql for text-to-SQL workflows.

---
tools:
  - [psql, -U, $USER, -d, $DATABASE, -c, {query}]

---

# Text-to-SQL
- Query the PostgreSQL DB for product details
- Pass a `{query}` to the `psql` tool
- Available tables: `products` and `categories`
Custom Tools

Build custom tools using scripts in any programming language.

---
tools:
  - [python, tools/status.py, {id}]
  - [cargo, script, tools/check_delays.rs]

---

# Toolkit
- Run `status.py` with `{id}` to check statuses
- Use `check_delays.rs` to scan for delayed orders

You can run AI applications directly with the Python SDK, or power them with your own agents via the MCP Server.

Python SDK
from toolfront import Application

app = Application(url="http://127.0.0.1:8000")

result = app.ask("What's the status of order 66?", model="openai:gpt-5")
MCP Server
{
  "mcpServers": {
    "toolfront": {
      "command": "uvx",
      "args": ["toolfront", "mcp", "http://127.0.0.1:8000"]
    }
  }
}

Deploy with ToolFront Cloud

Deploy your AI applications with ToolFront Cloud.

toolfront deploy ./path/to/project

This gives you a secure application URL you can access from anywhere.

app = Application(url="https://cloud.toolfront.ai/user/project", params={"API_KEY": ...})

ToolFront Cloud is in beta. To request access, join our Discord or email esteban[at]statespace[dot]com.

Community & Contributing

License

This project is licensed under the terms of the MIT license.