ArkSim

Simulate realistic multi-turn conversations with your AI agent so you find failures before real users do.

Source repo
arklexai/arksim
Stars
★ 240
Last updated
20d ago
FARS reviewed
Dec 03, 2026
License
Apache-2.0
Primary language
Python

At a glance

How it runs
CLILibrary / SDKAgent plugin / skill
Works with
Universal · cross-platformClaude Code · OpenAI API · Claude API
Cost
Free software; you pay for model usage
Setup effort
Medium · a few setup steps
You'll need
Python package arksim (pip)OPENAI_API_KEYAnthropic 或 Google 的 API 密钥(可选,用于评估 LLM)Shell / CLINetwork accessLocal filesystemMCP Server
Typical use
Pre-launch validation of a customer-support or sales agent, checking that policy questions are answered rather than hallucinated across several turns
Not a fit if
  • Teams that only need single-prompt testing, not multi-turn conversations
Website
docs.arklex.ai ↗ set on GitHub
Maintenance
Commits in the last 30 dayslast commit 2026-11-13
Source review
64/100 · Some gaps

What does this agent do, and when should you use it?

ArkSim is an open-source Python toolkit from arklexai for catching the agent failures that only appear mid-conversation: misread intent three turns in, wrong tool calls, hallucinated policies. Its execution model runs in three stages — define scenarios (goal, user profile, knowledge level), let LLM-powered synthetic users converse with your agent turn by turn, then evaluate every turn on metrics such as helpfulness, faithfulness and goal completion. The target agent can be attached three ways: a Python class subclassing BaseAgent with an execute() method, an OpenAI-style chat_completions endpoint, or an A2A endpoint. Output is an interactive report with per-metric scores, categorized failures and full transcripts, plus a web UI for browsing results. A CLI (arksim init, arksim simulate-evaluate) makes it usable as a CI quality gate that exits non-zero below threshold, and the repo also ships a Claude Code skill pack with an MCP server. It is Apache-2.0 licensed, runs on your own infrastructure, and can use OpenAI, Anthropic or Google as the evaluation LLM.

The flow is Scenarios → Simulation → Evaluation → Reports. arksim init scaffolds config.yaml, scenarios.json and a starter my_agent.py; scenarios.json defines user goals, profiles and knowledge. arksim simulate-evaluate config.yaml then drives the simulation: LLM synthetic users push back and ask follow-ups according to their profile while talking to the agent declared under agent_config, whose agent_type is either chat_completions (an HTTP endpoint) or a2a (A2A protocol, optionally reporting tool calls through the tool call capture extension). After the conversations finish, an evaluation LLM scores each turn against metrics including built-in helpfulness, faithfulness and goal completion, or custom metrics you define. The result is per-metric scores, failure categorization and full conversation transcripts viewable in the report or the web UI; in CI, scores below the configured threshold make the run exit non-zero.

  1. Pre-launch validation of a customer-support or sales agent, checking that policy questions are answered rather than hallucinated across several turns
  2. Adding end-to-end regression tests to agents built on LangGraph, CrewAI, AutoGen, LangChain or similar frameworks without touching the framework code
  3. Wiring an agent quality gate into GitHub Actions or pytest so every PR runs simulations and blocks merges below threshold
  4. Black-box evaluation of a remotely exposed A2A or Chat Completions agent, including checking that it calls the right tools
  5. Generating scenarios and debugging failures inline inside Claude Code via the arksim-scenarios, arksim-simulate and arksim-results skills
  6. Re-scoring an existing evaluation run with different metrics or thresholds instead of re-running all conversations

Key setup facts

Pulled from the install and usage notes below. The project README has the current values.

Install / run
  • pip install arksim
  • pip install "arksim[anthropic]"
  • pip install "arksim[google]"
  • pip install "arksim[claude]"
Environment variables
OPENAI_API_KEY
Config files
config.yaml

How do you install or deploy this agent?

Install from PyPI and export the API key for the evaluation LLM:

pip install arksim
export OPENAI_API_KEY="your-key"

For Anthropic or Google as the evaluation LLM, install the matching extra:

pip install "arksim[anthropic]"
# or
pip install "arksim[google]"

For the Claude Code skill pack and MCP server:

pip install "arksim[claude]"
arksim setup-claude

For development from source:

git clone https://github.com/arklexai/arksim.git
cd arksim
pip install -e ".[dev]"
pytest tests/

How do you use this agent?

The fastest path is to scaffold, then drop in your own agent logic:

arksim init
# Edit my_agent.py with your agent logic, then run:
arksim simulate-evaluate config.yaml

A Python agent must subclass BaseAgent and implement get_chat_id() and execute():

from arksim.simulation_engine.agent.base import BaseAgent
from arksim.simulation_engine.tool_types import AgentResponse


class MyAgent(BaseAgent):
    async def get_chat_id(self) -> str:
        return "unique-id"

    async def execute(self, user_query: str, **kwargs: object) -> str | AgentResponse:
        # Replace with your agent logic
        return "agent response"

If your agent is an HTTP service, switch to the chat_completions type in config.yaml:

agent_config:
  agent_type: chat_completions
  agent_name: my-agent
  api_config:
    endpoint: http://localhost:8000/v1/chat/completions

A2A agents use the same shape with a different type:

agent_config:
  agent_type: a2a
  agent_name: my-agent
  api_config:
    endpoint: http://localhost:9999/agent

To explore a working example first:

arksim examples
cd examples/e-commerce
arksim simulate-evaluate config.yaml

Safety boundaries, hardening & integrations

Operational blast radius, source-verified safety controls, and first-run hardening steps before connecting this agent to real workspaces.

Declared capability surface (blast radius)

Local shell command execution

Can run terminal commands; pair with approval gates or container/OS sandboxing.

Local filesystem read/write

Modifies local files; work on a clean Git branch or dedicated worktree.

Outbound network access

Makes outbound requests; verify telemetry settings and model data routing on private repos.

External MCP tool bridge

Inherits capabilities of connected MCP servers; audit third-party servers before enabling.

What are this agent's strengths and limitations?

Pros
  • Simulation-first design: synthetic users with distinct profiles, goals and knowledge levels push back and follow up, surfacing context loss and self-contradiction that single-prompt tests miss
  • Broad agent support through three attachment paths — BaseAgent subclass, Chat Completions endpoint, or A2A — with runnable examples for 14+ frameworks including Claude Agent SDK, OpenAI Agents SDK, Google ADK, LangGraph, CrewAI, AutoGen and LlamaIndex
  • Usable as a CI quality gate that exits non-zero below threshold, with documented pytest and GitHub Actions setup
  • Evaluation LLM is swappable across OpenAI, Anthropic and Google, and the code is Apache-2.0 and self-hosted so data stays on your infrastructure
  • Ships a native Claude Code skill pack plus MCP server, with setup-claude supporting --dry-run preview and manifest-based --uninstall that leaves third-party arksim-* skills alone
Limitations
  • Requires an external LLM API key (OPENAI_API_KEY by default), so both simulation and evaluation incur per-call model costs and cannot run air-gapped
  • Python-class onboarding means writing get_chat_id() and execute() yourself and authoring domain-specific scenarios.json before results are meaningful
  • Tool-call visibility for A2A agents needs the separate tool call capture extension wired in, otherwise evaluation sees less of what happened
  • The tooling is Python-centric; TypeScript stacks such as Mastra and Vercel AI SDK are reachable only through the HTTP endpoint route
  • Scoring is LLM-based with no published benchmark in the repo for metric consistency or reproducibility across runs

How does this agent compare with similar options?

Key facts side by side with the most closely related agents.

Agent Source review Form / cost Stars Updated Language Full support on
ArkSim This agent 64 · Some gaps CLIFree + model costs ★ 240 20d ago Python Claude Code · OpenAI API · Claude API
OpenBrowser 51 · Major gaps CLIFreemium ★ 279 1d ago Python Codex · Claude Code · Claude.ai · OpenAI API · Claude API
Generative AI with LangChain 41 · Major gaps Library / SDKFree + model costs ★ 1.5k 3mo ago Jupyter Notebook OpenAI API · Claude API
lcc — Local Context Compiler 77 · Good CLIFree ★ 20 1d ago Python Claude Code

How does FollowAgents rate this agent?

FollowAgents source review · FARS-2.1
Some gaps
64/ 100 5-point scale 3.2 / 5
Trust 17/29
Reliability 8/14
Adaptability 12/18
Convention 13/18
Effectiveness 9/13
Verifiability 5/8
Why each dimension lost points
Trust17 / 29 · 2.9/5

Least privilege scores 2: Claude skills restrict tooling via allowed-tools, setup-claude tracks installs through a manifest, and the PreToolUse hook blocks edits to .env/secrets, but draft-pr/pre-review/review-pr grant broad Bash, so full marks are withheld. User confirmation scores 1: --dry-run and --force guard file operations, yet simulations/evaluations invoke paid LLM APIs with no run-cost or outbound-request confirmation in the docs. Data-flow transparency scores 1: the README claims 'Your data never leaves' while conversations and scenarios are actually sent to OpenAI/Anthropic/Google, a tension between the claim and the architecture. Sensitive data scores 2: ${ENV_VAR} resolution, no-secret commits, and hooks blocking secret directories. Dependency security scores 2: bandit plus weekly CodeQL and some upper bounds, deducted for no lockfile. External effects scores 2: examples download a GitHub tarball (nosec-annotated) and call external endpoints, refusing to overwrite an existing target. Rollback scores 2: setup-claude --uninstall removes only manifest-tracked installs and --dry-run previews, though simulation output has no rollback. Source attribution scores 2: Apache-2.0 LICENSE, enforced SPDX headers, SAGE/arXiv citation.

Reliability8 / 14 · 2.9/5

Self-consistency scores 1: README and main docs cite results/final_report.html while the Python example cites results/evaluation/final_report.html, an inconsistent output path, and example model names (gpt-6-luna, gpt-6.1-sol, gpt-5.1) are mixed and partly non-real, which was deducted. Dependency availability scores 2: public PyPI packages with version bounds but no lockfile. Failure messages score 2: config validators (CustomHTTP, ChatCompletions) emit specific errors and the CLI defines tiered exit codes and invalid-option hints.

Adaptability12 / 18 · 3.3/5

Audience and scenarios score 2: developer-facing multi-turn simulation and evaluation with happy-path/out-of-scope/ambiguous/multi-step scenarios and bank-insurance, e-commerce, customer-service, openclaw examples. Capability boundaries score 2: docs explain simulation/evaluation/re-evaluation roles but do not systematically state the evaluator's own limits (LLM-judge non-determinism). Trigger precision scores 2: skills include 'when to use', argument-hint, disable-model-invocation, and clear descriptions. Environment fit scores 2: Python 3.10-3.13, multiple providers, and Python-class/chat_completions/a2a/custom_http agent types.

Convention13 / 18 · 3.6/5

Information architecture scores 2: source/tests/docs/examples/integrations layering with versioned Mintlify docs. Install notes score 3: requirements, PyPI, provider extras, source install, and verification are all present. Naming stability scores 2: consistent skill names and Conventional Commits enforcement. Examples and FAQ score 2: arksim examples and Quickstart Option A/B, deducted for no standalone FAQ. Known limitations score 1: SECURITY lists out-of-scope items but there is no account of the tool's own evaluation limits. License scores 3: full LICENSE, pyproject declaration, enforced SPDX headers. Versioning/changelog scores 2: CHANGELOG.md convention, versioned docs, release-please, hatch-vcs. Maintenance responsibility scores 2: CONTRIBUTING, SECURITY contact, authors, deducted for unverified publisher identity and no visible CODEOWNERS.

Effectiveness9 / 13 · 3.5/5

Output usability scores 2: interactive HTML report, evaluation.json, web UI, per-metric scores, failure categories, per-turn transcripts, and CI exit-code gating. Marginal value scores 2: simulation-first synthetic multi-turn users is a distinct angle, plus 14+ framework support and Claude Code integration. Cost-benefit scores 2: docs note re-evaluation is cheaper than re-simulation, but overall paid-LLM dependence is not quantified.

Verifiability5 / 8 · 3.1/5

Claim traceability scores 2: capability claims link to docs and an arXiv citation. Cross-source corroboration scores 2: README/docs/code broadly align, deducted for output-path and model-name inconsistencies. Fact/inference separation scores 2: skills explicitly treat user files as untrusted data rather than instructions and distinguish metric types, but 'data never leaves' style marketing blurs fact and claim.

Risks and how to mitigate them
  • The README's 'Your data never leaves' conflicts with outbound calls that send conversation data to OpenAI/Anthropic/Google; data does leave the machine.
  • Simulations and evaluations call paid LLM APIs with no cost estimate or pre-run confirmation; budget accordingly before large runs.
  • Some skills (draft-pr/pre-review/review-pr) grant broad Bash access; review before enabling them in sensitive repositories.
  • Output paths (results/final_report.html vs results/evaluation/final_report.html) and example model names are inconsistent; do not assume a fixed directory layout.
  • Publisher identity is not verified by the FollowAgents enterprise registry; verify provenance before installing the third-party package.
Evidence confidence: Low Reviewed Dec 03, 2026 Reviewed revision 2faa6e48977d
See the full review method →
Maintain this project? Add the FARS badge to your README

The badge shows the current review score and verdict and links back to this page. It refreshes about once an hour after a re-review.

FARS

[![FARS review](https://followagents.com/badge/arksim.svg)](https://followagents.com/en/agents/arksim)
<a href="https://followagents.com/en/agents/arksim"><img src="https://followagents.com/badge/arksim.svg" alt="FARS review"></a>

FAQ

Is ArkSim itself paid, and what else will I be billed for?
The software is Apache-2.0 open source and self-hosted with no licence fee. Both the synthetic users and the evaluator are LLMs, so you supply API keys — OPENAI_API_KEY by default, or the Anthropic/Google key after installing arksim[anthropic] or arksim[google] — and pay the model provider per call.
Does my agent have to be written in Python?
No. Besides the BaseAgent subclass, you can set agent_type to chat_completions or a2a and point at any HTTP endpoint, which is how the repo's Mastra and Vercel AI SDK examples are integrated.
Where does the conversation data go?
The README states it runs on your own infrastructure and your data never leaves it; however, simulated conversations are sent to whichever LLM provider you configure for simulation and evaluation, so review that provider's policy against your compliance needs.
Can it block a bad pull request in CI?
Yes — the README documents using ArkSim as a quality gate that exits non-zero when the agent falls below threshold, and links to pytest and GitHub Actions setup guides.
How does the Claude Code integration work?
Install arksim[claude], run arksim setup-claude to write .mcp.json and .claude/skills/arksim-*, then restart Claude Code or run /mcp. You can then invoke skills such as arksim-simulate, arksim-evaluate, arksim-scenarios, arksim-results and arksim-ui.
Was this page helpful?
View on GitHub ↗ Install ↓

Host ecosystems

Compare agents like this one

The same FARS review applied across the shortlist this agent qualifies for.

Related concepts