| Crates.io | miniagent |
| lib.rs | miniagent |
| version | 0.1.0 |
| created_at | 2025-11-09 02:31:08.858711+00 |
| updated_at | 2025-11-09 02:31:08.858711+00 |
| description | Minimal single agent demo with basic file tools and MCP support |
| homepage | https://github.com/Latias94/miniagent |
| repository | https://github.com/Latias94/miniagent |
| max_upload_size | |
| id | 1923526 |
| size | 198,115 |
Minimal single agent demo with basic file tools and MCP support.
~/.miniagent/log/get_skill on demandInstall Rust (1.75+ recommended) and clone this repo.
Configure LLM
~/.miniagent/config/ from bundled templates and exits with a hint to edit it.config/config-example.yaml to either ~/.miniagent/config/config.yaml (recommended) or ./config/config.yaml.api_key and provider/model. For MiniMax, prefer provider: minimaxi (native). For OpenAI-compatible custom endpoints, set base_url.# Use current directory as workspace
cargo run --
# Or specify workspace (flag)
cargo run -- -w ./workspace
# Or specify workspace (positional)
cargo run -- ./workspace
cargo run --no-default-features -- -w ./help inside the REPL for available commands.$ cargo run -- -w .
You > Load the internal-comms skill and summarize the guidelines
# The agent will call the tool get_skill(skill_name="internal-comms") automatically.
# You should see absolute paths rewritten in the returned content, like:
# - `.../skills/internal-comms/examples/company-newsletter.md` (use read_file to access)
You > Read the company newsletter guideline and outline the sections
# The agent will likely call read_file with the rewritten absolute path and print the content.
llm
provider: anthropic, openai, minimaxi (MiniMax native), google/gemini, or openai-compatible (requires base_url)api_key: provider API key (supports env fallbacks: ANTHROPIC_API_KEY, OPENAI_API_KEY, MINIMAXI_API_KEY/MINIMAX_API_KEY, GEMINI_API_KEY)model: e.g. claude-sonnet-4-5-20250929, gpt-4o-mini, MiniMax-M2, gemini-2.5-pro or gemini-2.5-flashbase_url (optional): custom endpoint for OpenAI-compatible servers (or Gemini enterprise/Vertex variants)retry: enabled, max_retries, initial_delay, max_delay, exponential_baseagent: max_steps, token_limit (default 80000), completion_reserve (default 2048), workspace_dir, system_prompt_pathtools: enable/disable; skills_dir; mcp_config_pathNote: miniagent uses a single LLM configuration for the whole run. If you want to switch providers/models, update the llm section in your config.
Config precedence: ./miniagent/config/ → ~/.miniagent/config/ → ./config/.
See config/config-example.yaml for a complete example.
MINIAGENT_PROVIDER, MINIAGENT_MODEL, MINIAGENT_BASE_URL, MINIAGENT_API_KEYANTHROPIC_API_KEY, OPENAI_API_KEY, MINIMAXI_API_KEYprovider=openai-compatible requires a base_url (or MINIAGENT_BASE_URL).By default (for crates.io friendliness), miniagent does not embed the full Claude Skills to keep the crate small. On first run, if no local Skills are found, miniagent will try to fetch them to ~/.miniagent/skills (requires network). If that fails, you'll see a hint to install them manually. You can also choose one of the following explicitly:
miniagent skills fetch (installs to ~/.miniagent/skills)cargo run --features embed-skills -- ... or enable the feature in your build.The Agent uses Progressive Disclosure:
get_skill(skill_name) when needed.examples/, scripts/, templates/, reference/) are rewritten to absolute paths, with a hint to use read_file.Examples of skill names you can load (after fetching):
internal-comms, webapp-testing, mcp-builder, canvas-design, artifacts-builder, document-skills/pdf, document-skills/pptx, document-skills/docx, document-skills/xlsx, slack-gif-creator, etc.In the REPL, just describe your task; the model will decide when to call get_skill. You can also explicitly ask it to load a specific skill.
read_file, write_file, edit_file: file operations scoped to the workspace.bash: runs shell commands in the workspace directory.
pwsh), then Windows PowerShell, otherwise cmd.exe.bash -lc.record_note, recall_notes: session notes in <workspace>/.agent_memory.json.get_skill: load full content of a skill by name.config/mcp.json (see below).config/mcp.json and set your server entry disabled: false.uvx):{
"mcpServers": {
"git": {
"command": "uvx",
"args": ["mcp-server-git"],
"env": {},
"disabled": true
}
}
}
enable_mcp: true and config exists, miniagent will spawn the servers, list their tools, and add them to the toolset.uvx mcp-server-git). Ensure it’s on PATH.config/mcp.json and set the entry’s disabled: false.token_limit - completion_reserve.Tip: Adjust completion_reserve (default 2048) to keep room for completions.
~/.miniagent/log/agent_run_*.log.tiktoken (no embedded skills to keep the crate small)../skills at compile time):
cargo run --features "tiktoken,embed-skills"cargo run --no-default-featuresNote: Release artifacts built with cargo-dist can opt-in to embed-skills if you prefer an all‑in‑one binary; crates.io packages exclude large assets.
With cargo-binstall (prebuilt binaries):
cargo install cargo-binstallcargo binstall miniagentFrom source (stable toolchain):
cargo install --git https://github.com/Latias94/miniagentWe publish release artifacts using cargo-dist. Assets follow the pattern
miniagent-<version>-<target>.<zip|tar.gz> and include simple shell/PowerShell installers.