AI agents that are just Python.

Multi-agent graphs, tool calling, RAG, 50 evaluators, and a drag-drop visual builder. All in one pip install. No DSL to learn. No SaaS to pay for. No vendor to depend on.

~/your-project
$pip install selectools
Works with
OpenAI Azure OpenAI Anthropic Gemini Ollama
152 models
5332 tests
95% coverage
88 examples
50 evaluators
4 providers
v0.21.0

Watch agents work. In real time.

Pre-recorded traces from real selectools agents. Routing, tool calls, failover, RAG. No API key needed.

Customer Support Router ready
Elapsed
0.0s
Events
0 / 0
Model
--
Tokens
--
Cost
--

A Python framework for production AI agents.

One pip install. The whole stack. No DSL, no separate packages, no paid SaaS. Your code stays plain Python.

agent.py ~/selectools $
from selectools import Agent, toolfrom selectools.rag import HybridRAGfrom selectools.guardrails import PIIGuardrailfrom selectools.audit import AuditLogger @tool()def search(q): return rag.query(q) agent = Agent( tools=[search], rag=HybridRAG("./docs"), guardrails=[PIIGuardrail()], audit=AuditLogger(),)result = agent.run("refund policy?")

what you get

Multi-agent graphs Agent()
Hybrid RAG HybridRAG
Guardrails PIIGuardrail
Audit logging AuditLogger
Tool calling @tool()
50 evaluators tested
Visual builder /builder/

Three problems every agent team hits.

No paid debugger. No SaaS account. No bolt-on libraries. Just open the file, see the fix.

01

Your agent did something. You have no idea what.

langchain · what you see
$ python agent.py
[ERROR] AgentExecutionError
  at langchain_core.runnables...
  at langgraph.pregel.invoke...
  ?? which tool ran
  ?? what model called
  ?? where it broke
$ open $LANGSMITH_DASHBOARD
selectools · what you get
result = agent.run("refund?")

>>> result.trace
[llm_call      142ms]
[tool_select   tool=search]
[tool_exec     ok 218ms]
[llm_call      198ms]

>>> result.reasoning
"User asked refund → search_docs"

Every run() returns result.trace and result.reasoning. Structured timeline of every LLM call, tool pick, and execution. Free, local, always on. Agent docs →

02

A user typed their SSN. Now it’s in your logs forever.

crewai · what happens
# your agent code
agent = Agent(role="support")
result = agent.execute(user_input)

# your logs at 2am
[INFO] "my ssn is 123-45-6789"
[INFO] "my email is jane@..."
[INFO] sent to OpenAI: ^^^
[ALERT] compliance review needed
selectools · what ships
agent = Agent(
  guardrails=GuardrailsPipeline(
    input=[PIIGuardrail("redact")],
    output=[InjectionScreen()],
  ),
)

# your logs
[INFO] "my ssn is [REDACTED]"
[INFO] screened: 15 patterns

Built-in PII redaction, topic blocking, toxicity detection, and prompt injection screening with 15 patterns. Plus LLM-based coherence checking. Guardrails docs →

03

It’s the 28th. Your OpenAI bill is a surprise.

other tools · the bill
$ stripe receipts list
2026-04-28  OpenAI       $2,847.10
2026-04-28  Anthropic    $1,203.55
2026-04-28  LangSmith    $  468.00

# breakdown by agent?
  -> you don't have one
# cost per call?
  -> manual SQL on raw logs
selectools · the answer
result = agent.run(prompt)

>>> result.usage
UsageStats(
  prompt_tokens=1247,
  completion_tokens=438,
  total_cost=$0.00184,
  model="gpt-5-mini",
  provider="openai",
)

# 152 models, all priced

result.usage.total_cost gives you automatic per-call token counts and dollar costs across all providers. 152 models with built-in pricing data. Usage tracking docs →

The same pipeline. Less ceremony.

A 3-agent workflow: planner → writer → reviewer. Same outcome. 25 lines of ceremony, or one.

← LangGraph · 25 lines selectools · 1 line →
LangGraph · 25 lines
from langgraph.graph import StateGraph, START, END from typing_extensions import TypedDict class State(TypedDict): text: str def planner(state): return {"text": "planned"} def writer(state): return {"text": "written"} def reviewer(state): return {"text": "reviewed"} g = StateGraph(State) g.add_node("planner", planner) g.add_node("writer", writer) g.add_node("reviewer", reviewer) g.add_edge(START, "planner") g.add_edge("planner", "writer") g.add_edge("writer", "reviewer") g.add_edge("reviewer", END) app = g.compile() result = app.invoke({"text": "prompt"})
selectools · 1 line
from selectools import AgentGraph result = AgentGraph.chain(planner, writer, reviewer).run("prompt") # That's it. No StateGraph. No TypedDict. # No add_node, no add_edge, no compile(). # Just three callables and a chain. # Need branching? AgentGraph.router(...) # Need parallel? AgentGraph.parallel(...) # Need HITL? yield and resume. No node restart. # Need to deploy? selectools serve agent.yaml
move your cursor across
01 Plain Python. No StateGraph, no TypedDict, no compile().
02 HITL resumes at yield point, not by restarting the node.
03 Zero extra deps. No langchain-core required.
04 Deploy with selectools serve agent.yaml.

Guardrails in the constructor, not an afterthought.

PII redaction, audit logging, and injection defense, configured in one AgentConfig. Click any step to inspect what the agent produced.

agent.py
from selectools import Agent, AgentConfig, tool from selectools.providers import OpenAIProvider from selectools.guardrails import GuardrailsPipeline, PIIGuardrail from selectools.audit import AuditLogger, PrivacyLevel @tool() def search_docs(query: str) -> str: """Search the knowledge base.""" return db.search(query) agent = Agent( tools=[search_docs], provider=OpenAIProvider(), config=AgentConfig( model="gpt-5-mini", guardrails=GuardrailsPipeline( input=[PIIGuardrail(action="redact")], ), screen_tool_output=True, coherence_check=True, audit=AuditLogger(path="./audit", privacy=PrivacyLevel.HASH), ), ) result = agent.run("Find our refund policy")

result.trace

result.reasoning
“The user is asking about the refund policy. I should search the knowledge base for the current terms before answering.”
step 1 of 4 llm: gpt-5-mini tokens: 124
result.tool_calls[0]
search_docs(query="refund policy")
step 2 of 4 tool: search_docs guardrails: ✓
result.tool_outputs[0]
“Returns within 30 days of purchase. Original packaging required. Refund issued to original payment method within 5 business days...”
step 3 of 4 screen_tool_output: passed pii: none
result.content
“Our refund policy allows returns within 30 days of purchase, in original packaging. Refunds go back to your original payment method within 5 business days.”
step 4 of 4 tokens: 847 cost: $0.0012

One install. Everything built in.

No langchain-core. No separate eval SDK. No paid debugger. pip install selectools gives you all of this, tested across Python 3.9 to 3.13.

Eval framework
50 Evaluators

Tool-use checks, correctness scoring, safety screening, LLM-as-judge, regression detection, A/B with PairwiseEval. 30 deterministic + 20 LLM-judge. Free, local, no SaaS account.

Deterministic
30
LLM-as-judge
20
Coverage tests
95
Orchestration
Multi-agent graphs, plain Python.

AgentGraph for directed graphs with conditional routing. SupervisorAgent with 4 strategies. HITL resumes at the yield point, not by restarting the node. Parallel execution + checkpointing + subgraph composition.

{ }
Pipelines
Composable with the | operator.

Pipeline + @step + parallel() + branch(). Plus 4 advanced agent patterns: PlanAndExecute, Reflective, Debate, TeamLead.

|
Guardrails
15 injection patterns

PII redaction, topic blocking, toxicity, prompt injection screening, plus LLM coherence check.

Usage
Cost on every call

Automatic token + dollar tracking across 152 models. No manual SQL on raw logs.

Retrieval
Hybrid RAG

BM25 + vector + RRF fusion + cross-encoder reranking. 7 store backends (in-memory, SQLite, Chroma, Pinecone, FAISS, Qdrant, pgvector). CSV / JSON / HTML / URL loaders.

Compliance
Audit + observability

JSONL audit trail with 4 privacy levels and daily rotation. Plus OTelObserver (GenAI semantic conventions) and LangfuseObserver for shipping traces to Datadog, Jaeger, Langfuse Cloud, or your OTLP backend. Ready for the compliance review.

Memory
Memory + Knowledge

Conversation memory, entity extraction, knowledge graph. 4 session backends.

Toolbox
33 built-in tools

File I/O, web, data, datetime, text, plus v0.21.0 additions: Python + shell execution, DuckDuckGo search, GitHub REST API, SQLite + Postgres queries. Ready to wire into any agent.

Providers
Auto-failover

OpenAI, Azure OpenAI, Anthropic, Gemini, Ollama. Circuit breaker with health checks.

Streaming
Native astream()

Token-level async streaming with structured tool-call objects yielded inline.

MCP
Model Context Protocol

Both client and server. Connect to any MCP server, expose your tools as one.

Five things your security team will ask for first.

Not a checkbox row. Real artifacts: a coverage gauge, a test count, a version matrix, an SBOM, stability markers. Audited and shipped.

test coverage
95%

Statement coverage on the public API surface.

tests passing
0

Unit, integration, and e2e. Green on every commit.

python supported
3.13 3.12 3.11 3.10 3.9

Five major versions, one wheel.

supply chain

CycloneDX SBOM published with every release. Security audit on file.

api stability
@stable core @beta new @deprecated 2 minors

Every public symbol marked. Deprecations stay live for two minor releases.

Test your agents. Not just your code.

LangSmith charges $39/seat/mo for agent evaluation. DeepEval requires a separate install. Selectools ships 50 evaluators. Free, local, built in.

test_agent.py
from selectools.evals import EvalSuite, TestCase suite = EvalSuite(agent=agent, cases=[ TestCase( input="Cancel my subscription", expect_tool="cancel_sub", expect_contains="cancelled", expect_no_pii=True, ), ]) report = suite.run() report.to_html("report.html") # report.accuracy → 1.0 # report.latency_p50 → 142ms # report.total_cost → $0.002
pytest test_agent.py running
accuracy 1.000
latency p50 142 ms
total cost $0.0020
ToolUseToolOrderToolEfficiencyAgentTrajectoryContainsNotContainsEqualsRegexOutputStructuredJSONJSONSchemaPythonSQLMarkdownXMLYAMLPIIInjectionSentimentReadabilitySemanticSimilarityEditDistanceBLEUROUGETokenCountLatencyCostCardinalityDeterminism ToolUseToolOrderToolEfficiencyAgentTrajectoryContainsNotContainsEqualsRegexOutputStructuredJSONJSONSchemaPythonSQLMarkdownXMLYAMLPIIInjectionSentimentReadabilitySemanticSimilarityEditDistanceBLEUROUGETokenCountLatencyCostCardinalityDeterminism
CorrectnessRelevanceFaithfulnessHallucinationGroundednessToxicitySafetyBiasCoherenceCompletenessConcisenessFactConsistencyHelpfulnessInstructionFollowContextRelevanceAnswerRelevanceRagFaithfulnessPairwiseEvalRubricScoreCustomJudge CorrectnessRelevanceFaithfulnessHallucinationGroundednessToxicitySafetyBiasCoherenceCompletenessConcisenessFactConsistencyHelpfulnessInstructionFollowContextRelevanceAnswerRelevanceRagFaithfulnessPairwiseEvalRubricScoreCustomJudge

Eval report preview

report.to_html("report.html")

Execution trace preview

trace_to_html(result.trace)

Live · no server required

Design workflows in the browser.

The only open-source agent builder that runs in the browser with zero installation. Drag nodes, connect agents, test with real APIs, export runnable Python. 49KB gzipped. No signup. No CDN. No Electron.

Best on desktop

The visual builder needs more room.

The drag-and-drop canvas is designed for screens 768px and wider. Open it in a new tab to try it on a desktop, or come back from a laptop.

Open builder →
bundle size
selectools
49KB
electron
67MB
49KB
gzipped over the wire
1400x lighter than electron
package.json
"name": "builder", "version": "1.0.0", "dependencies": {}
0 deps
no React, no build step
single HTML file
built-in nodes
8 nodes
agent, loop, HITL, subgraph…
7 built-in templates
seat licenses
$39 / seat / mo $0 forever
vs LangGraph Studio
Apache-2.0, no signup
Open Full Builder → Live Simulations 96 Examples
FeatureselectoolsLangGraph Studion8nFlowiseDifyRivet
PriceFree, foreverPaid (LangSmith)€20/mo cloudFree self-hostFree self-hostFree
Installpip installmacOS desktop appDockerDockerDockerDesktop app
Self-hostedYesNo (desktop only)YesYesYesNo
No CDN/build stepYesN/ANo (React)No (React)No (React)No (Electron)
Code export (Python)YesNoNoNoNoNo
Code export (YAML)YesNoJSON onlyJSON onlyYAMLNo
AI generationYes (NL to graph)NoNoNoNoNo
Live test from browserYesYesYesYesYesYes
Runs on GitHub PagesYesNoNoNoNoNo
Per-node cost previewYesNoNoNoNoNo
Built-in evals50 evaluatorsLangSmith (paid)NoNoNoNo

scroll → for full comparison

What you get vs. what you pay for elsewhere.

LangChain has the ecosystem. We have everything it charges extra for (traces, evals, guardrails, builder) included and free.

CapabilitySelectoolsLangChainCrewAI
Execution tracesBuilt-inLangSmith (paid)Limited logging
GuardrailsBuilt-in (5 types)NeMo (separate)Not built-in
Agent evaluationBuilt-in (50 evals)LangSmith (paid)Not built-in
Cost trackingAutomatic per-callManualNot built-in
Injection defense15 patterns + coherenceNot includedNot included
Visual builderBuilt-in + GitHub PagesLangGraph Studio (paid)Not built-in
Multi-agentAgentGraph + SupervisorLangGraphCore feature
HITL resumeExact yield pointRestarts nodeNot built-in
Composable pipelines@step + | + parallelLCEL (complex)Not built-in
Setup1 package5+ packages1 package
Deploy CLIselectools serveLangServe (separate)Enterprise only
Enterprise signalsSBOM + audit + 95% coverageNot built-inNot built-in
Migration guides4 frameworksNot availableNot available
AI-agent docs (llms.txt)Full index + contentNot availableNot available
CommunityGrowingMassiveLarge

scroll → for full comparison

3-agent pipeline
from selectools import AgentGraph result = AgentGraph.chain(planner, writer, reviewer).run("prompt") # That's it. No StateGraph, no compile().
1 line
three callables, one chain
25 lines (LangGraph) · 1 line (selectools)
framework overhead
<0.5ms
per agent call
measured across 1000 runs
tests passing
0
95% coverage
unit, integration, e2e
40 real API evals included
eval suite cost
40 test cases$0.018
3 providers$0.009
20 judge calls$0.003
total$0.03
full eval suite, all providers
vs $39/seat/mo (LangSmith)

Built for teams shipping agents to production.

I just want to know what my agent did and how much it cost. On every call.

ML / AI Engineer in production · automatically
You'll appreciate result.trace, result.usage.total_cost, and structured reasoning on every call. Not just while you're debugging. Always on, written to your store, queryable.

Where are the audit logs? And how are you preventing PII leakage?

Compliance Lead SBOM · SOC 2 · HIPAA
You'll appreciate AuditLogger with 4 privacy levels, daily JSONL rotation, PIIGuardrail with redaction-on-input, and 15 injection patterns screened on output. Published security audit + CycloneDX SBOM.

We're paying $39/seat/mo just to see what our agents are doing.

Team migrating off LangChain $0 · self-hosted
You'll appreciate Built-in traces, 50 evaluators, visual builder, and audit logging. All free, all local. No LangSmith subscription, no langchain-core, no separate eval SDK. pip install selectools.

Three paths. Pick yours.

No API key needed for the builder or examples. Add one when you’re ready to go live.

Open in Colab Star on GitHub

Type a question. Or browse the docs.

? What is Selectools? getting-started
Selectools is an open-source Python library for building production-ready AI agents with tool calling, RAG (retrieval-augmented generation), and multi-agent orchestration. It supports OpenAI, Azure OpenAI, Anthropic, Gemini, and Ollama providers with a single unified API. Install with: pip install selectools.
? How is Selectools different from LangChain? concepts
Selectools uses a single Agent class with native tool calling. No chains, no expression language, no complex abstractions. It includes built-in features that require separate paid services in LangChain: 50 evaluators (vs LangSmith at $39/seat/mo), hybrid RAG search, guardrails, audit logging, multi-agent orchestration, and a visual builder. One pip install, everything included, free.
? What LLM providers does Selectools support? providers
Five providers: OpenAI (GPT-4, GPT-5, o-series), Azure OpenAI Service, Anthropic (Claude), Google Gemini, and Ollama (local models), plus a FallbackProvider for automatic failover with circuit breaker. Includes pricing data for 152 models. For testing without any API key, use the built-in LocalProvider.
? Does Selectools have a visual builder? concepts
Yes. Selectools ships a drag-and-drop visual agent builder that runs in the browser with zero installation. Design multi-agent workflows, test with mock or real APIs, and export runnable Python or YAML. Try it now →
? How do I install Selectools? getting-started
pip install selectools. For the visual builder with Starlette server: pip install selectools[serve]. For Chroma/Pinecone/FAISS/Qdrant vector stores (plus beautifulsoup4 for HTML loading): pip install selectools[rag]. For OpenTelemetry + Langfuse observers: pip install selectools[observe]. For pgvector: pip install selectools[postgres]. Requires Python 3.9+.
? Does Selectools support streaming? advanced
Yes. astream() provides token-level async streaming with native tool call support. Tool calls are yielded as structured ToolCall objects alongside text chunks, not mixed into the text stream.
? Does Selectools support RAG? advanced
Yes. The built-in RAG pipeline includes BM25 keyword search + vector semantic search, reciprocal rank fusion (RRF), cross-encoder reranking, semantic and contextual chunking, and 7 vector store backends (memory, SQLite, Chroma, Pinecone, FAISS, Qdrant, pgvector). Documents can be loaded from files, directories, PDFs, CSVs, JSON, HTML, or URLs.
? Can I use Selectools with local models? providers
Yes. Use the OllamaProvider to run agents with any Ollama-compatible local model (Llama, Mistral, Gemma, etc.). For testing without any API or model, use the built-in LocalProvider stub.
? Does Selectools support multi-agent orchestration? advanced
Yes. AgentGraph supports directed graph orchestration with conditional routing, parallel fan-out (3 merge policies), and checkpoint-backed state. SupervisorAgent provides 4 coordination strategies: plan-and-execute, round-robin, dynamic routing, and magentic-one. Higher-level patterns include PlanAndExecute, Reflective, Debate, and TeamLead agents.
? Is Selectools production-ready? concepts
Yes. 5,203 tests at 95% coverage (including 40 real API evaluations), published security audit, SBOM (CycloneDX 1.6), formal deprecation policy, @stable/@beta markers on every public API, and a compatibility matrix covering Python 3.9 to 3.13. Migration guides for LangChain, CrewAI, AutoGen, and LlamaIndex. Apache-2.0 licensed.
no questions match. try a broader search.