Skip to main content

A Python library for Code Agent Manta

Project description

Manta Banner

Manta

Manta is an intelligent code agent system that self-evolves. Like its namesake, the Manta Ray, it gracefully navigates through code tasks with intelligence and efficiency.

Features

  • Self-Evolution: Learns and adapts from interactions
  • Intelligent Processing: Smart command classification and execution
  • Context Awareness: Maintains session history for better understanding
  • Tool System: Extensible framework for custom capabilities

Installation

# Clone the repository
git clone https://github.com/yourusername/manta.git
cd manta

# Install
pip install -e .

Usage

Basic Startup

manta --api-key YOUR_API_KEY --base-url YOUR_BASE_URL --model MODEL_NAME

Tool Commands

Manta provides several powerful tools that can be accessed through natural language commands:

Command Execution

Execute system commands directly:

"Please run ls in the current directory"
-> Manta will use: <execute_command> <command>ls</command> </execute_command>

File Operations

Reading Files:

"Show me the contents of config.json"
-> Manta will use: <read_file> <path>config.json</path> </read_file>

Writing Files:

"Create a new Python script called hello.py"
-> Manta will use:
<write_to_file>
<path>hello.py</path>
<content>
print("Hello, World!")
</content>
</write_to_file>

Updating Files:

"Update the React import to include useState"
-> Manta will use:
<replace_in_file>
<path>component.jsx</path>
<diff>
<<<<<<< SEARCH
import React from 'react';
=======
import React, { useState } from 'react';
>>>>>>> REPLACE
</diff>
</replace_in_file>

Special Commands

History Review

To see the conversation history:

history

This will display all previous messages in the current session, including system messages, user inputs, and assistant responses.

File Context

To add a file to the conversation context:

@path/to/file.txt

This makes the file content available to Manta for reference in subsequent interactions.

Example Interactions

Here are some common ways to interact with Manta:

  1. Create a new project:

    "Create a new React component for a login form"
    
  2. Modify existing code:

    "Add input validation to the login form component"
    
  3. Fix issues:

    "Debug the authentication flow in auth.js"
    
  4. Get explanations:

    "Explain how the routing system works in this project"
    

Testing

To run the test suite, use pytest. Ensure that all dependencies are installed (including development dependencies).

# Use pytest to run the tests
pytest tests/

Architecture

manta/
├── manta/
    ├── core/         # Core agent functionality
    ├── llm/          # Language model integration
    ├── session/      # Session management
    ├── tools/        # Extensible tools
    └── prompts/      # System prompts

Examples

The examples/ directory contains practical demonstrations of using Manta for various project types:

examples/
├── snakegame/         # Creating a snakegame web applications with Manta
├── minegame/          # Creating a minesweeper web applications with Manta

These examples serve as both documentation and starting points for your own projects. They demonstrate real-world applications of Manta's features and can be used as templates for similar implementations.

Contributing

We welcome contributions! Please fork the repository and submit a pull request.

License

MIT License

Contact

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

mantacoder-0.1.2.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

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

mantacoder-0.1.2-py3-none-any.whl (16.1 kB view details)

Uploaded Python 3

File details

Details for the file mantacoder-0.1.2.tar.gz.

File metadata

  • Download URL: mantacoder-0.1.2.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for mantacoder-0.1.2.tar.gz
Algorithm Hash digest
SHA256 a38d8122cf7e209c7a8fbde7f6f01438722261d720c499527565747873cbeb88
MD5 f5973603630c51a6e951fbd82401f128
BLAKE2b-256 54d89df8763df381383e2087f24e5fdb2b0cf95c226453e26ad757b24dd9ef61

See more details on using hashes here.

File details

Details for the file mantacoder-0.1.2-py3-none-any.whl.

File metadata

  • Download URL: mantacoder-0.1.2-py3-none-any.whl
  • Upload date:
  • Size: 16.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.11.11

File hashes

Hashes for mantacoder-0.1.2-py3-none-any.whl
Algorithm Hash digest
SHA256 ddd3c6db68a004363b73c48edc73f1bdd1027dd346f77ab3a095828101ed7279
MD5 3ed3ae75cfd7017af97a125b15d599c9
BLAKE2b-256 ac4807eabe4cd5809f469b4880ff722a32ada213643380b41f73ecf6a8a05443

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