Skip to main content

A minimal, file-based agent framework with automated tool syncing.

Project description

Mono-Agent Framework

A minimal, file-based agent framework inspired by smolagents and LangGraph, optimized for offline use and context efficiency.

Features

  • CLI Scaffolding: Quickly start projects with mono create.
  • Markdown Agents: Define agent personas and tools in simple Markdown files.
  • Auto-Tool Sync: Python functions in Tools/ are automatically converted to OpenAI JSON schemas.
  • Context Efficient: Automatically wipes previous agent context during handoffs to save tokens.
  • Persistent Memory: SQLite-based conversation history and Mem0 fact extraction.
  • Human-in-the-Loop: Built-in support for human validation and steering.

Installation

uv init
uv add pydantic openai mem0ai
# Or just install this package
uv sync

Quick Start

  1. Scaffold your project:

    uv run mono create
    
  2. Run the example:

    # Make sure your OPENAI_API_KEY is set
    uv run main.py
    

Creating an Agent

  1. Create a tool in Tools/my_tool.py:

    def run(query: str) -> str:
        """Does something cool."""
        return f"Result for {query}"
    
  2. Use the framework to generate the Agent Markdown:

    from mono_agent import MonoAgent
    agent = MonoAgent()
    agent.create_agent_file(
        name="MySpecialist",
        instructions="You are a specialist...",
        tool_names=["my_tool"]
    )
    
  3. Load and run:

    agent.load_agent("MySpecialist")
    agent.run("Do the cool thing.")
    

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

mono_agent-0.1.0.tar.gz (53.6 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

mono_agent-0.1.0-py3-none-any.whl (9.0 kB view details)

Uploaded Python 3

File details

Details for the file mono_agent-0.1.0.tar.gz.

File metadata

  • Download URL: mono_agent-0.1.0.tar.gz
  • Upload date:
  • Size: 53.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mono_agent-0.1.0.tar.gz
Algorithm Hash digest
SHA256 a33a6ac00a53b77162eab2e3b2c7f5464d7dfcd820f8d5dfb1de92dca42f9c9b
MD5 09c9238baa9b9d34f4c50d5a09f10f3f
BLAKE2b-256 f3dc9ffe50dd172a665a360007be97109d47f4b6d39fc1d73e10a93f8d11db19

See more details on using hashes here.

File details

Details for the file mono_agent-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: mono_agent-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for mono_agent-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 62a5c6d8bb8134611b27b0e8ed82da7d8e8d6cc115b33fcf814d132bcbc124e5
MD5 48c90a290faa7e6e82471d5c40dc393f
BLAKE2b-256 c9f15ffbe68c63485a6fe6a6c57daa9bdc280ceb3d25e4d7eb959a6dc8f17610

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page