Skip to main content
Margarita logo

Lime

A code agent with programmable markdown files

Lime wants you have fun programming Agents/LLMs and bring back more control into your hands.

Features

  • Get all the benefits of margarita files now with agentic capabilities.
  • Bring your favourite coding agent (Copilot for now) (roadmap for Claude code, codex and more soon)
  • React like composability through includes [[ my-component is_admin=true ]]
  • Store variables in state, and have the LLMs update/fetch state as needed.
  • Don't waste tokens on having LLMs run functions. Run it locally and then pass the results to the LLM.
  • Forget context explosion issues. Surgically control what context is sent to the LLM.
  • Add only the tools you need for a query. Nuke them, then add others and repeat. This keeps context size small and relevant.

Example

// file:example.mgx
---
description: Add metadata
team: Can put anything in metadata
---

// Import python functions for use with @effect func
from math import add, subtract, multiply, load_files

// Supports all markdown. Places this into the agent's context.
<<
You are an expert mathematician.
Your task is to solve addition problems accurately and efficiently.

When given a problem, you should:
1. Read the problem carefully.
2. Identify the two numbers to be added.
3. Calculate the sum of the two numbers.
4. Provide the final answer clearly.
>>

// Include other margarita files into the context
[[ create-a-react-component.mg ]]

// Execute a loop 
for i in items:
    // run Python functions and store results in state.
    @effect func add(12, test.data) => result

// The agent can access/ set state variables too!
<<
Add 12 + test.data and store the result in the variable 'result'.
>>

// Add tools, note: AddToolParam extends BaseModel from pydantic
@effect tools add(params: AddToolParams) => int

// Run the agent using tools and the context you built up.
@effect run

// clear the context and tools after running to avoid context explosion in future runs.
@effect context clear
@effect tools clear

// use the state result variables with a new context.
<<
Validate the following:
- The addition tool correctly adds two numbers.
- The subtraction tool correctly subtracts two numbers.
- The multiplication tool correctly multiplies two numbers.
- The load_files function correctly loads and reads files from the specified directory.
>>

// conditonal logic
if result.failed:
    <<
    The test failed. Please review the implementation of the math tools and the
    load_files function for any errors.
    >>
    @effect run
else:
    // We're done!

Hopefully this gives you a taste of the possibilities with Lime!

Examples

The examples/ directory contains ready-to-run .mgx workflows you can use as a starting point:

Example Path Description
Hello World examples/helloworld/helloworld.mgx Minimal workflow to get started
Plan & Implement examples/plan-implement/pi.mgx Plan then implement a feature in a loop
Ralph examples/ralph/custom-ralph.mgx Multi-file workflow with custom tools and task breakdown

Installation

Run the following command for your platform to install Lime:

Linux:

curl -fsSL https://raw.githubusercontent.com/Banyango/lime/main/install-linux.sh | bash -s -- --option

MacOS:

curl -fsSL https://raw.githubusercontent.com/Banyango/lime/main/install-macos.sh | bash -s -- --option

Windows (PowerShell):

iwr -useb https://raw.githubusercontent.com/Banyango/lime/main/install-windows.ps1 | iex

Logo Designed by Freepik

Note: The CLI execute command supports a --headless flag which disables the textual UI and suppresses stdout/stderr output; in headless mode the process will exit with non-zero codes for missing files or when interactive input/permissions are required.

Class documentation standard

See the project class documentation standard for required docstring sections and concrete examples (data class, service class, abstract/base class): docs/class-documentation.md

Metadata

Release files for lime-ai 0.1.9

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for lime-ai 0.1.9
File Size Uploaded
lime_ai-0.1.9.tar.gz 47.3 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for lime-ai 0.1.9
File Interpreter ABI Platform
lime_ai-0.1.9-py3-none-any.whl Python 3 none any Details

Total release size: 110.9 kB

Release files / lime_ai-0.1.9.tar.gz

Download URL lime_ai-0.1.9.tar.gz
Size 47.3 kB
Tags Source
SHA-256 checksum
How to use checksums
a0c865881216a48e4d00efd09e19ad8362268714a04baa172ac1640b10eb02a3
BLAKE2b-256 checksum
How to use checksums
3c1098f685af7207385ed1c5536d013c895d1eff7fbf050d9fc86ced6bb07b6a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release files / lime_ai-0.1.9-py3-none-any.whl

Download URL lime_ai-0.1.9-py3-none-any.whl
Size 63.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b5c34c9bc442d2b058c9c39883d918d8205865966337327defc68a7a454eb08a
BLAKE2b-256 checksum
How to use checksums
d5a4ac9a3d4caf295009be8867a73f3d510cd73be190e44258de83d59d5cc2fe
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via uv/0.11.6 {"installer":{"name":"uv","version":"0.11.6","subcommand":["publish"]},"python":null,"implementation":{"name":null,"version":null},"distro":{"name":"Ubuntu","version":"24.04","id":"noble","libc":null},"system":{"name":null,"release":null},"cpu":null,"openssl_version":null,"setuptools_version":null,"rustc_version":null,"ci":true}

Release history Release notifications | RSS feed

This release

0.1.9 This release

2 release files

0.1.8

2 release files

0.1.7

2 release files

0.1.6

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page