MI

MiniAgent-7B

⭐ 3,400•Python/TypeScript•Edge AI

Lightweight localizable 7B agent framework by Together AI and Stanford for edge deployment.

PythonTypeScriptLocal-FirstCPU-OnlyMCPRAG

Overview

MiniAgent-7B is a 7-billion parameter agent framework developed by Together AI and Stanford, designed for local deployment and CPU-only inference. With INT4 quantization requiring only 6GB RAM, it enables agent development without cloud API access, making it ideal for privacy-sensitive and edge computing scenarios.

Features

  • ✓CPU-Only Inference
  • ✓6GB Memory (INT4)
  • ✓Function-as-Prompt Paradigm
  • ✓MCP Server Agnostic
  • ✓Dual-Language SDK
  • ✓RAG-Optimized

Installation

pip install miniagent-7b

Pros

  • +Local-First Design
  • +Low Resource Requirements
  • +No Fine-Tuning Required
  • +MCP Server Compatible
  • +Fully Open-Source

Cons

  • −7B Parameter Limit
  • −New Project
  • −CPU-Only Focus
  • −Smaller Community

Alternatives

Documentation

MiniAgent-7B

Overview

MiniAgent-7B is a lightweight, fully localizable agent framework developed by Together AI in collaboration with Stanford University. Released as an open-source project with over 3,400 GitHub stars in its first 24 hours, MiniAgent-7B represents a significant step forward in making agentic AI accessible without requiring expensive cloud API access.

At 7 billion parameters, MiniAgent-7B is designed for edge deployment and CPU-only inference scenarios. When quantized to INT4, it requires only 6GB of memory, making it suitable for consumer-grade hardware. This opens up possibilities for agent development on local machines, embedded systems, and environments with strict data residency requirements.

Features

  • CPU-Only Inference: Full functionality without GPU requirements (INT4 quantized)
  • Memory Efficient: Only 6GB RAM needed in INT4 quantization mode
  • "Function-as-Prompt" Paradigm: No fine-tuning required to connect to MCP servers
  • MCP Server Agnostic: Works with any Model Context Protocol-compliant server
  • Dual-Language SDK: Python and TypeScript SDKs available
  • RAG-Optimized: Purpose-built for retrieval-augmented generation workflows
  • Tool Calling Native: Built-in function calling without external orchestration
  • Fully Open-Source: No API costs or vendor lock-in

Installation

# Install Python SDK
pip install miniagent-7b

# Or TypeScript SDK
npm install @miniagent-7b/sdk

# Install via source
git clone https://github.com/togethercomputer/miniagent-7b
cd miniagent-7b
pip install -e .

Quick Start

from miniagent7b import MiniAgent, MCPTool

# Initialize agent with local model
agent = MiniAgent(
    model_path="miniagent-7b-int4",
    device="cpu"  # GPU not required
)

# Register MCP tools
mcp_tool = MCPTool(server="filesystem", config={"path": "/data"})
agent.register_tool(mcp_tool)

# Run agent
response = agent.run("Analyze the files in /data and summarize findings")
print(response)

TypeScript example:

import { MiniAgent, MCPTool } from '@miniagent-7b/sdk';

const agent = new MiniAgent({
  modelPath: 'miniagent-7b-int4',
  device: 'cpu'
});

agent.registerTool(new MCPTool({ server: 'github' }));
const result = await agent.run("List recent commits in this repo");
console.log(result);

Core Concepts

Function-as-Prompt

MiniAgent-7B uses a novel approach where functions are described as natural language prompts rather than structured API calls. This eliminates the need for fine-tuning when integrating new tools:

Available Tools:
- search_files: Search for files matching a pattern
- read_file: Read contents of a specific file
- write_file: Create or update a file

When the user asks to analyze files, use search_files first,
then read_file for relevant matches, and summarize findings.

MCP Server Integration

The framework supports any MCP-compliant server out of the box:

from miniagent7b import MCPConnector

connector = MCPConnector()
connector.add_server("github", auth_token="ghp_xxx")
connector.add_server("postgresql", connection_string="postgresql://...")
connector.add_server("filesystem", config={"allowed_paths": ["/data"]})

RAG Pipeline

MiniAgent-7B includes a built-in RAG pipeline optimized for local deployment:

from miniagent7b import RAGPipeline

pipeline = RAGPipeline(
    model="miniagent-7b-int4",
    embedding_model="e5-small",
    vector_store="chroma"
)

pipeline.index_documents("docs/")
response = pipeline.query("How do I configure the agent?")

Advanced Features

Quantization Options

# Full precision (recommended for GPU)
agent = MiniAgent(model_path="miniagent-7b-fp16", device="cuda")

# INT4 quantized (CPU, 6GB RAM)
agent = MiniAgent(model_path="miniagent-7b-int4", device="cpu")

# INT8 quantized (balanced, 12GB RAM)
agent = MiniAgent(model_path="miniagent-7b-int8", device="cpu")

Custom Tool Registration

from miniagent7b import Tool

class WeatherTool(Tool):
    name = "get_weather"
    description = "Get current weather for a location"

    def execute(self, location: str) -> str:
        # Custom implementation
        return f"Weather in {location}: 22°C, sunny"

agent.register_tool(WeatherTool())

Multi-Agent Orchestration

from miniagent7b import AgentGroup

group = AgentGroup(
    agents=[researcher, analyst, writer],
    coordinator="miniagent-7b-int4"
)

result = group.run("Research topic: quantum computing advances")

Pros

  • ✅ Local-First Design: No API costs or internet dependency
  • ✅ Low Resource Requirements: 6GB RAM for INT4 deployment
  • ✅ No Fine-Tuning Required: Function-as-prompt paradigm
  • ✅ MCP Server Compatible: Works with the entire MCP ecosystem
  • ✅ Dual-Language SDK: Python and TypeScript support
  • ✅ Fully Open-Source: No vendor lock-in or licensing restrictions
  • ✅ RAG-Optimized: Built for document-based agent workflows

Cons

  • ✅ 7B Parameter Limit: Less capable than frontier models for complex reasoning
  • ✅ New Project: Limited production track record
  • ✅ CPU-Only Focus: No GPU optimization for higher throughput
  • ✅ Smaller Community: Newer than established frameworks

When to Use

  • Privacy-sensitive deployments: Process data locally without API calls
  • Edge computing scenarios: Deploy on devices with limited resources
  • Cost-conscious development: Avoid per-token API pricing
  • MCP-heavy workflows: Leverage the extensive MCP server ecosystem
  • RAG applications: Optimized for document retrieval and analysis
  • Educational use: Learn agent architecture without cloud dependencies

Resources