https://github.com/querymt/querymt
query.mt
https://github.com/querymt/querymt
agentic-framework agents ai llm mcp-client
Last synced: 15 days ago
JSON representation
query.mt
- Host: GitHub
- URL: https://github.com/querymt/querymt
- Owner: querymt
- License: mit
- Created: 2025-04-28T11:28:45.000Z (11 months ago)
- Default Branch: main
- Last Pushed: 2026-02-18T05:15:07.000Z (about 1 month ago)
- Last Synced: 2026-02-18T10:33:49.642Z (about 1 month ago)
- Topics: agentic-framework, agents, ai, llm, mcp-client
- Language: Rust
- Homepage: https://query.mt
- Size: 3.91 MB
- Stars: 5
- Watchers: 3
- Forks: 0
- Open Issues: 39
-
Metadata Files:
- Readme: README.md
- License: LICENSE
- Agents: AGENTS.md
Awesome Lists containing this project
README
# QueryMaTe
A unified interface for Large Language Models (LLMs) with support for various providers via a plugin-based architecture.
## Installation
Add `querymt` to your `Cargo.toml` with the `extism_host` feature:
```toml
[dependencies]
querymt = { version = "0.2", features = ["extism_host"] }
```
## Basic Usage
```rust
use querymt::builder::LLMBuilder;
use querymt::chat::ChatMessage;
use querymt::plugin::{extism_impl::host::ExtismLoader, host::PluginRegistry};
#[tokio::main]
async fn main() -> Result<(), Box> {
// 1. Initialize registry and register the Wasm loader
let mut registry = PluginRegistry::from_path("providers.toml")?;
registry.register_loader(Box::new(ExtismLoader));
// 2. Build the LLM provider
let llm = LLMBuilder::new()
.provider("openai")
.model("gpt-5-mini")
.api_key("your-api-key")
.build(®istry)
.await?;
// 3. Send a message
let response = llm.chat(&[
ChatMessage::user().content("Hello!").build()
]).await?;
println!("{}", response);
Ok(())
}
```
### Configuration (`providers.toml`)
```toml
[[providers]]
name = "openai"
path = "oci://ghcr.io/querymt/openai:latest"
```
For a full examples-oriented setup (GHCR providers, local wasm provider builds, and run commands), see `crates/querymt/examples/README.md`.
## Agent
The `querymt-agent` crate (in `crates/agent`) is the high-level agent runtime for QueryMaTe.
If you're new, the easiest way to try it is the `coder_agent` example at `crates/agent/examples/coder_agent.rs`.
It loads an agent from a TOML config file and can run in two modes:
- `--stdio`: runs as an ACP stdio server (great for integrations and tooling)
- `--dashboard`: runs with a local web dashboard for interactive use
### Quick start
From the workspace root:
```bash
cd crates/agent
# ACP stdio mode
cargo run --example coder_agent --features dashboard -- --stdio
# Dashboard mode (default http://127.0.0.1:3000)
cargo run --example coder_agent --features dashboard -- --dashboard
# Dashboard mode on a custom address
cargo run --example coder_agent --features dashboard -- --dashboard=0.0.0.0:8080
```
By default it reads config from `examples/confs/coder_agent.toml`.
You can also pass your own config path before the mode flag.
### Generate shared types
From the workspace root:
```bash
scripts/generate-types.sh
```
This regenerates TypeScript (and Swift when the sibling iOS repo exists) typeshare outputs.
### macOS Silicon releases
macOS Silicon users who download the `coder_agent` release binary need to clear the quarantine flag before running it:
```bash
xattr -dr com.apple.quarantine coder_agent
```
## Documentation
For everything else, refer to [docs.query.mt](https://docs.query.mt).