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

Install the framework using your preferred package manager:

# Using uv (Recommended)
uv add mono-agent

# Using pip
pip install mono-agent

Quick Start

Once installed, you can set up a new project in seconds using the CLI:

  1. Scaffold your project: This command creates the Agents/ and Tools/ folders, a sample agent, and a main.py entry point. It also helps you configure your LLM provider.

    mono create
    
  2. Test your setup: Perform a dynamic dry run to ensure all files and configurations are correct.

    mono test
    
  3. Run your agent:

    python main.py
    

Creating a Specialist Agent

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

    def run(query: str) -> str:
        """Does something cool."""
        return f"Result for {query}"
    
  2. Generate the Agent file:

    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.")
    

License

MIT License. See LICENSE for details.

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.1.tar.gz (55.1 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.1-py3-none-any.whl (10.7 kB view details)

Uploaded Python 3

File details

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

File metadata

  • Download URL: mono_agent-0.1.1.tar.gz
  • Upload date:
  • Size: 55.1 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.1.tar.gz
Algorithm Hash digest
SHA256 a96d04208bc36dd70f6285d35dc6ce15d0f151dfec75ff9af82bf6ed3815d284
MD5 da2a23e3a1f8b24ef88e80218e525067
BLAKE2b-256 298df48aa4fcaccc7b75ca6090fab92613b8d7190c84fa97240bc4bfb8a248af

See more details on using hashes here.

File details

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

File metadata

  • Download URL: mono_agent-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 10.7 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.1-py3-none-any.whl
Algorithm Hash digest
SHA256 84dec9f7183b7642fbe0716a221f9334c78155cc2737f1ffc95e2de4e3e16fa3
MD5 d52341ecffe11c69280508c3b88f562d
BLAKE2b-256 dda849fb42098bd5bd3620c0b0a223f651b2efb7c557aac38e45e6555fab4af3

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