An open-source, provider-agnostic agentic framework + interactive project scaffolder for LangChain and CrewAI. Pick your LLM provider, agents, RAG, memory, MCP tools and skills — generate a ready-to-run uv project.
Project description
🧬 AgentX-Kit
A provider-agnostic agentic framework + interactive project scaffolder for LangChain & CrewAI.
Pick your LLM provider (OpenAI, Azure, OpenRouter, Anthropic, Gemini, Vertex AI,
Bedrock, Groq, Ollama), choose your framework, agents, RAG, memory, MCP tools and
skills — and AgentX-Kit generates a ready-to-run project in its own uv
virtual environment.
pip install "agentx-kit[all]"
agentx new # interactive wizard → scaffolds a uv project
The PyPI distribution is
agentx-kit; the import name and CLI areagentx(pip install agentx-kit→import agentx/agentx --help).
🚀 60-second walkthrough
# 1. Install
pip install "agentx-kit[all]"
# 2. See what you can target
agentx providers # 9 LLM providers + the env vars each needs
# 3. Scaffold a complete project from one line (no keys needed to generate)
agentx new --yes --name my-bot \
--provider openai \
--prompt "You are a support agent that answers from our docs."
# 4. Run it
cd my-bot && cp .env.example .env # add your API key
uv sync && uv run my-bot
# 5. Tune prompts live (tokens, cost, quality, optimize) — optional UI
pip install "agentx-kit[dashboard]" && agentx dashboard
# 6. Use it from Claude / Copilot / Codex
claude mcp add agentx-kit -- agentx mcp
Prefer guided? Just run agentx new (interactive wizard) or
agentx new --enterprise for the full production stack
(tracing, guardrails, FastAPI, Docker, CI, evals, caching).
🧭 Command cheat-sheet
| Command | What it does |
|---|---|
agentx new |
Interactive wizard → scaffold a uv project |
agentx new --yes [opts] |
Non-interactive scaffold (--enterprise for the full pack) |
agentx providers |
List LLM providers + required env vars |
agentx prompt list/set/add/remove |
Manage an existing project's prompts (-d opens the dashboard) |
agentx dashboard |
Prompt observability + optimization UI ([dashboard] extra) |
agentx cache stats / clear |
Inspect/clear the LLM response cache |
agentx mcp |
Run as an MCP server for Claude/Copilot/Codex |
agentx mcp --print-config |
Print the client config for those tools |
agentx version |
Show the installed version |
▶️ Try the demos (no API keys needed)
bash examples/demo_local.sh # verify local setup end-to-end
python examples/demo_mcp.py # test the Claude/Copilot MCP path (real handshake)
See examples/ for details.
📦 Installation
From PyPI (recommended)
pip install agentx-kit # core: CLI + scaffolder + base abstractions
pip install "agentx-kit[all]" # everything
Each LLM provider is an optional extra so you only pull the SDKs you use:
pip install "agentx-kit[openai,langgraph]" # OpenAI + LangGraph
pip install "agentx-kit[bedrock,crewai,rag,mcp]" # Bedrock + CrewAI + RAG + MCP
Using uv
uv pip install "agentx-kit[all]"
From GitHub (latest, unreleased)
pip install "agentx-kit[all] @ git+https://github.com/muhammadyahiya/agentx-kit.git"
From a local clone (development)
git clone https://github.com/muhammadyahiya/agentx-kit.git
cd agentx-kit
uv venv && uv pip install -e ".[all,dev]" # or: pip install -e ".[all,dev]"
pytest -q
Requires Python 3.10–3.13 and (for the scaffolder's
.venvcreation)uv.
Verify
agentx version
agentx providers # lists every provider + the env vars it needs
Why
- One factory, every provider.
get_chat_model("bedrock", ...)orget_chat_model("openrouter", ...)— same call, lazy imports, install only the extras you use. - Two frameworks. LangChain/LangGraph and CrewAI from the same building blocks.
- Batteries included. RAG, short/long-term memory, MCP tools, and a skills registry — each optional and gracefully degrading.
- Scaffolder, not a black box. The generated project is readable, idiomatic
code you own, pre-wired to your selections, in a fresh
.venv.
Use as a library
from agentx import get_chat_model, list_providers
llm = get_chat_model("openai", "gpt-4o-mini")
print(llm.invoke("Say hi in 3 words").content)
for spec in list_providers():
print(spec.id, "→", spec.label)
CrewAI:
from agentx import get_crewai_llm
llm = get_crewai_llm("openrouter", "anthropic/claude-3.5-sonnet")
Scaffold a project
agentx new # fully interactive
agentx new --name my-bot --yes # accept sensible defaults
agentx providers # list providers + required env vars
The wizard asks, one option at a time:
- Project name & target directory
- Framework — LangGraph or CrewAI
- LLM provider and model
- Number of agents (and their roles)
- RAG module? (vector store)
- Memory? (short-term / long-term / both)
- MCP tools?
- Skills integration?
- Prompt style (defaults or scaffolded custom prompts)
- Create
.venvanduv syncnow?
It then renders the project, writes a feature-aware pyproject.toml + .env.example,
and runs uv venv to create .venv.
Prompts: add at creation, or any time after
Prompts are not baked into code — every generated project keeps them in a
prompts.json that agents.py loads dynamically. Add an entry and the project
runs it on next start, no code changes.
# at creation
agentx new --yes -n chatops --prompt "You are a senior DevOps engineer. Be terse."
# after creation (run inside the project)
agentx prompt list
agentx prompt set assistant --text "You are an SRE. Prioritise reliability."
agentx prompt add reviewer --role "Code Reviewer" --goal "Review diffs" \
--text "You review code for bugs and security."
agentx prompt remove reviewer
prompts.json:
{
"with_rag": false,
"agents": {
"assistant": {"role": "...", "goal": "...", "system_prompt": "You are ..."}
}
}
A blank system_prompt is auto-derived from the agent's role + goal. You can also
just open prompts.json in an editor — the CLI is a convenience, not a gate.
📊 Prompt dashboard (observability + optimization)
A Streamlit workbench to understand and refine how your prompts talk to the LLM — launch it any time:
pip install "agentx-kit[dashboard]"
agentx dashboard # opens http://localhost:8501
agentx prompt set assistant -d # edit a prompt AND open the dashboard
It gives you, live as you edit:
- Token count, context-window utilization gauge, and cost estimate (tiktoken-accurate).
- Quality score (0–100) with a checklist (role / goal / output-format / examples / constraints / specificity) and concrete suggestions + limit warnings.
- ✨ One-click LLM optimization — refines the prompt while preserving intent, shows a diff + rationale + token delta, and can apply the result straight back to
prompts.json. - ▶️ Test run — send the prompt to the model and see the response with tokens in/out, latency, and cost.
- 📈 Usage trends — tokens, cost, and latency over time, logged locally to
.agentx/insights.jsonl.
Run it inside a generated AgentX project and it reads/writes that project's
prompts.json; run it anywhere else for a free-form prompt scratchpad.
🔌 Use as a connector (Claude / Copilot / Codex)
AgentX-Kit ships an MCP server, so any MCP-capable assistant can scaffold a complete project from a single prompt with your problem statement.
pip install "agentx-kit[connector]"
agentx mcp --print-config # prints the client config below
Add it to your client (then restart it):
// Claude Desktop / Codex / Copilot — under "mcpServers"
{ "mcpServers": { "agentx-kit": { "command": "agentx", "args": ["mcp"] } } }
# Claude Code one-liner
claude mcp add agentx-kit -- agentx mcp
Now just ask, in plain language:
“Build a customer-support agent that answers from our product docs and serves a REST API.”
The assistant calls AgentX-Kit's tools and you get a complete, runnable project:
recommend_project(problem_statement)— suggests framework, provider, agent count, and features.create_agent_project(problem_statement, …)— generates the project (infers RAG/serve/memory/etc. from the statement, or take explicit overrides /enterprise=true) and returns the file tree + key file contents + run steps.list_providers,analyze_prompt,optimize_prompt— provider list + prompt insights.
So from one sentence the assistant produces a pre-wired project (prompts already seeded from your use case), ready to uv sync && uv run.
🧩 Editor & assistant integrations
The same connector powers ready-made integrations (see integrations/):
- VS Code extension (
integrations/vscode) — commands for New Agent Project, Open Prompt Dashboard, Add Prompt, Cache Stats, and Register MCP Server for Copilot (writes.vscode/mcp.json). Build withvsce package. - GitHub Copilot (agent mode) — add the MCP server via
.vscode/mcp.json:{ "servers": { "agentx-kit": { "command": "agentx", "args": ["mcp"] } } }(the VS Code command above writes this for you), then ask Copilot to build an agent. - Claude Code plugin (
integrations/claude-plugin):/plugin marketplace add muhammadyahiya/agentx-kit /plugin install agentx-kit@agentx-kit /agentx-kit:new-agent a support agent that answers from our docs and serves an API
- Claude Desktop / Codex — add the connector config from
agentx mcp --print-config.
💾 Response caching (cost & latency saver)
Caching is the top 2026 token-optimization lever. Turn on a global LLM response cache and every provider call is served from a local store on repeat — no code changes:
from agentx import enable_caching, cache_stats
enable_caching() # all get_chat_model(...) calls are cached
...
print(cache_stats()) # {'hit_rate': 0.6, 'tokens_saved': 12000, 'est_usd_saved': 0.024, ...}
agentx cache stats # hit rate + estimated tokens/$ saved
agentx cache clear
Generated projects can enable it automatically (it's part of --enterprise), and the
dashboard's Trends tab shows live hit-rate and $ saved. TTL-capable, SQLite-backed
at .agentx/llm_cache.sqlite.
🏢 Enterprise pack
Generate a production-shaped project with one flag — informed by a survey of CrewAI/LangGraph/create-llama/AgentStack/agno/pydantic-ai (see RESEARCH.md):
agentx new --yes -n my-bot --enterprise # everything below
# or pick individually:
agentx new --yes -n my-bot --observability --guardrails --serve --docker --ci --evals
What --enterprise adds to the generated project:
- Observability — OpenTelemetry GenAI tracing + optional Langfuse (
observability.py), opt-out viaAGENTX_TELEMETRY=false. - Guardrails — input/output validation + PII redaction (
guardrails.py). - FastAPI server —
server.pywith/health,/chat, and SSE/chat/stream. - Docker —
Dockerfile+docker-compose.yml(+.dockerignore). - CI —
.github/workflows/ci.yml(lint + compile + tests, optional eval gate). - Evals —
evals/LLM-as-judge harness runnable locally and in CI. - Typed config —
config.pyviapydantic-settings(12-factor). - Manifest —
agentx.jsondeclaring framework, provider, features (à lalanggraph.json).
These are also usable as a library in any project:
from agentx import (
setup_tracing, get_callbacks, # observability
build_resilient_chat, # retries + provider fallbacks
UsageLimits, UsageTracker, # token/cost budgets
apply_guards, structured_model, # guardrails + typed outputs
)
setup_tracing("my-service")
llm = build_resilient_chat("openai", "gpt-4o-mini", fallbacks=[("anthropic", "claude-3-5-sonnet-latest")])
Installation extras
| Extra | Installs | For |
|---|---|---|
openai / azure / openrouter |
langchain-openai |
OpenAI-compatible |
anthropic |
langchain-anthropic |
Claude |
google |
langchain-google-genai |
Gemini (AI Studio) |
vertex |
langchain-google-vertexai |
Vertex AI |
bedrock |
langchain-aws |
Amazon Bedrock |
groq |
langchain-groq |
Groq |
ollama |
langchain-ollama |
local |
langgraph |
langgraph, langchain |
LangGraph agents |
crewai |
crewai |
CrewAI crews |
rag |
langchain-community, chromadb |
RAG |
mcp |
langchain-mcp-adapters |
MCP tools |
observability |
opentelemetry-*, openinference-* |
tracing |
server |
fastapi, uvicorn |
serving |
dashboard |
streamlit, tiktoken, pandas |
prompt observability dashboard |
connector |
mcp |
MCP server for Claude/Copilot/Codex |
all |
everything above | kitchen sink |
See DESIGN.md for the architecture and RESEARCH.md for the competitive analysis behind these features.
License
MIT
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file agentx_kit-0.6.0.tar.gz.
File metadata
- Download URL: agentx_kit-0.6.0.tar.gz
- Upload date:
- Size: 73.2 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
8d0dfbb4cacf14a27bfe5dbf3fd13f693aa3f2fdef6a84bd9daff84646e1b3fd
|
|
| MD5 |
925f67eb3e327cd7d5914b3d8895e40f
|
|
| BLAKE2b-256 |
a182226cc272c415e316689f63a26b84ed02c2b68b7ec5b03e6c5eef21013e55
|
Provenance
The following attestation bundles were made for agentx_kit-0.6.0.tar.gz:
Publisher:
publish.yml on muhammadyahiya/agentx-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentx_kit-0.6.0.tar.gz -
Subject digest:
8d0dfbb4cacf14a27bfe5dbf3fd13f693aa3f2fdef6a84bd9daff84646e1b3fd - Sigstore transparency entry: 2030247652
- Sigstore integration time:
-
Permalink:
muhammadyahiya/agentx-kit@54974d8c939b227ed0cfc670e9c9d459069621d8 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/muhammadyahiya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54974d8c939b227ed0cfc670e9c9d459069621d8 -
Trigger Event:
push
-
Statement type:
File details
Details for the file agentx_kit-0.6.0-py3-none-any.whl.
File metadata
- Download URL: agentx_kit-0.6.0-py3-none-any.whl
- Upload date:
- Size: 81.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
40a9dd33c9b4fb757df71728add984d4fbb73cc6c1f7bdd0cfea6bab4fb7799a
|
|
| MD5 |
dcee420263b9a3b509706fe35586a143
|
|
| BLAKE2b-256 |
88519698f8eabdb5049d0b2026d455a129d4f8bcb21b4468dd27a4b187231569
|
Provenance
The following attestation bundles were made for agentx_kit-0.6.0-py3-none-any.whl:
Publisher:
publish.yml on muhammadyahiya/agentx-kit
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
agentx_kit-0.6.0-py3-none-any.whl -
Subject digest:
40a9dd33c9b4fb757df71728add984d4fbb73cc6c1f7bdd0cfea6bab4fb7799a - Sigstore transparency entry: 2030247785
- Sigstore integration time:
-
Permalink:
muhammadyahiya/agentx-kit@54974d8c939b227ed0cfc670e9c9d459069621d8 -
Branch / Tag:
refs/tags/v0.6.0 - Owner: https://github.com/muhammadyahiya
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@54974d8c939b227ed0cfc670e9c9d459069621d8 -
Trigger Event:
push
-
Statement type: