Skip to content

File index

Every Python file with its purpose (the first line of its module docstring), its main public symbols and the test files that exercise it. Regenerate with uv run python scripts/gen_dev_reference.py; CI fails if this page is stale or a file has no module docstring. A - under Tests means no test file names the module or one of its symbols; the code may still run through other modules' tests.

Package credencestack

File Purpose Main symbols Tests
src/credencestack/__init__.py CredenceStack: scenario-based testing and evidence for financial AI agents. - docs/test_guides.py
docs/test_sample_report.py
e2e/test_golden_path.py
+64
src/credencestack/__main__.py python -m credencestack: the same CLI as the credencestack command. - -
src/credencestack/_internal/__init__.py Shared utilities used across CredenceStack (internal: no stability promise). - unit/test_canonical.py
unit/test_forge_generator.py
unit/test_forge_mutators.py
+4
src/credencestack/_internal/canonical.py Canonical JSON: the one byte representation everything is hashed and signed over. canonical_json, canonical_bytes unit/test_canonical.py
src/credencestack/_internal/fmt.py Number formatting shared by the console and every report (design principle P2-8). rate, fraction, interval, rate_of, interval_of, money +1 unit/test_forge_generator.py
unit/test_inspect_runner.py
unit/test_otel_workflows.py
src/credencestack/_internal/hashing.py SHA-256 helpers shared by evidence, packs, telemetry and confidential ids. sha256_bytes, sha256_text, sha256_json, sha256_file, sha256_files, short_hash unit/test_forge_generator.py
src/credencestack/_internal/ids.py Identifiers for outputs: <kind>-<YYYYMMDD>-<6 base32>. new_id, kind_of -
src/credencestack/_internal/io.py Reading YAML and JSON data files, and reporting validation errors, one way. DataFileError, parse_data, read_data, validation_errors -
src/credencestack/_internal/log.py The credencestack logger tree. get_logger -
src/credencestack/_internal/matching/__init__.py In-house name-matching utilities shared by the financial-crime and KYC domains. - unit/test_matching.py
src/credencestack/_internal/matching/names.py Comparing personal and entity names: tokens, reordering, splitting and joining. tokens, sorted_tokens, joined, split_variants, token_set_score, NameMatch +1 unit/test_matching.py
src/credencestack/_internal/matching/normalise.py Name normalisation: Unicode folding, diacritics, transliteration and homoglyphs. fold_homoglyphs, has_mixed_scripts, strip_diacritics, transliterate, fold_spelling, normalise_name unit/test_matching.py
src/credencestack/_internal/matching/similarity.py String similarity: Levenshtein distance and Jaro-Winkler similarity (standard library only). levenshtein, levenshtein_ratio, jaro, jaro_winkler unit/test_matching.py
src/credencestack/_internal/outputs.py Output directories: <out>/<kind>-<id>/ with a manifest, and a latest pointer. OutputDir, create, point_latest, resolve_latest -
src/credencestack/_internal/seeding.py Seeds and random number generators, derived one way everywhere. derive, derive_seed, rng, fresh_seed unit/test_forge_mutators.py
unit/test_otel_workflows.py
src/credencestack/_internal/stats.py Interval statistics and rater agreement, shared by runs, benchmarks and Forge. wilson_interval, newcombe_interval, cohen_kappa unit/test_inspect_runner.py
unit/test_stats.py
src/credencestack/agents/__init__.py Reference agents: deterministic scripted agents (offline) and LangChain 1.x agents. - e2e/test_golden_path.py
integration/test_adk_connector.py
integration/test_assess_cli.py
+32
src/credencestack/agents/docintegrity.py Scripted reference agents for the document-integrity domain (offline, deterministic). naive_docintegrity, safe_docintegrity, brittle_docintegrity -
src/credencestack/agents/fincrime.py Scripted reference agents for the financial-crime domain (offline, deterministic). naive_fincrime, safe_fincrime, brittle_fincrime -
src/credencestack/agents/http_service.py A reference agent service implementing the CredenceStack HTTP contract. PolicyService unit/test_connectors.py
src/credencestack/agents/kyc.py Scripted reference agents for the KYC onboarding domain (offline, deterministic). naive_kyc, safe_kyc, brittle_kyc -
src/credencestack/agents/naive_fincrime_lc.py naive_fincrime_lc: a LangChain 1.x alert-review agent with no guardrails (benchmark). build integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+7
src/credencestack/agents/naive_kyc_lc.py naive_kyc_lc: a LangChain 1.x onboarding agent with no guardrails (benchmark). build integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+7
src/credencestack/agents/naive_lc.py naive_lc: a LangChain 1.x agent with no guardrails (benchmark baseline). resolve_model, build integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+7
src/credencestack/agents/safe_fincrime_lc.py safe_fincrime_lc: a LangChain 1.x alert-review agent built the way CredenceStack recommends. build integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+7
src/credencestack/agents/safe_kyc_lc.py safe_kyc_lc: a LangChain 1.x onboarding agent built the way CredenceStack recommends. build integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+7
src/credencestack/agents/safe_lc.py safe_lc: a LangChain 1.x agent built the way CredenceStack recommends. build integration/test_adk_connector.py
integration/test_assess_cli.py
integration/test_claude_agent_sdk_connector.py
+10
src/credencestack/agents/scripted.py Deterministic scripted reference agents (no model, fully offline). scripted_naive, scripted_safe, scripted_brittle integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+16
src/credencestack/agents/scripted_model.py A LangChain chat model that replays a scripted policy (no model call, no network). ScriptedChatModel integration/test_example_agents.py
unit/test_connectors.py
unit/test_faults.py
src/credencestack/api.py The Python API behind credencestack run: load packs, run an agent, check the result. parse_seed, select_packs, RunOutput, run, verify docs/test_guides.py
docs/test_sample_report.py
e2e/test_golden_path.py
+35
src/credencestack/assess/__init__.py credencestack test: test an agent as it is, with its own tools, and say what to fix. - integration/test_assess_frameworks.py
unit/test_assess_core.py
src/credencestack/assess/advisor.py Choose what to test from what the agent says it does, and skip what it cannot be tested on. Advice, score_domains, advise, needed_tools, not_applicable, Selection +1 unit/test_assess_core.py
src/credencestack/assess/agentfile.py credencestack-agent.toml: what credencestack test detected and chose, editable. ServiceConfig, AgentFile, load_agent_file, render_agent_file, write_agent_file unit/test_assess_core.py
src/credencestack/assess/assessment.py The assessment: one view over a test's fixed and generated runs, and what to fix first. catalogue, category_of, Rate, FindingRow, Suggestion, SetupNote +7 unit/test_assess_core.py
src/credencestack/assess/backend.py Backend mode: test a deployed agent service without touching its code. Operation, load_openapi, load_mcp_tools, detect_service, RestBackend, McpBackend +4 -
src/credencestack/assess/connector.py The connector credencestack test runs agents with: the agent as it is, its own tools. task_message, AssessConnector integration/test_assess_frameworks.py
src/credencestack/assess/decision.py The agent's decision, read from what it did and said, without asking for a format. infer_decision, answer_text unit/test_assess_core.py
src/credencestack/assess/detect.py Load the agent under test exactly as it is, and find out what it is. is_url, detect integration/test_assess_frameworks.py
src/credencestack/assess/drivers.py One driver per way of building an agent: find its tools, serve them, run it on a task. RunContext, Driver, function_schema, LangGraphDriver, OpenAIAgentsDriver, ADKDriver +7 integration/test_assess_frameworks.py
src/credencestack/assess/foreign.py The agent under test as CredenceStack sees it: its own tools and what it says it does. ForeignTool, Detected integration/test_assess_frameworks.py
unit/test_assess_core.py
src/credencestack/assess/intercept.py Serve the agent's own tools from the simulated back office, without changing the agent. EpisodeTools, current, activate, deactivate, alias, proxy +2 integration/test_assess_frameworks.py
unit/test_assess_core.py
src/credencestack/assess/outcomes.py Tell the agent's behaviour apart from problems with the test set-up. Classified, classify_error, setup_fix unit/test_assess_core.py
src/credencestack/assess/report.py The assessment report: what was tested, what failed, how robust it is, what to fix first. rich, assessment_report, write_assessment_report -
src/credencestack/assess/run.py credencestack test: from an agent as it is to an assessment, in one call. TestOptions, apply_rules, same_side, Check, Prepared, prepare +7 unit/test_assess_core.py
src/credencestack/assess/toolmap.py Map the agent's own tools onto the simulated back office, deterministically. words, concepts, MapEntry, ToolMap, map_args, candidate_tools +4 integration/test_assess_frameworks.py
unit/test_assess_core.py
src/credencestack/bench/__init__.py Benchmark harness: agents x models x packs x epochs, under a hard cost cap. - integration/test_adk_connector.py
integration/test_crewai_connector.py
integration/test_msaf_connector.py
+3
src/credencestack/bench/brittleness.py credencestack bench brittleness: do agents hold up on scenarios they have never seen? BrittlenessConfig, load_brittleness_config, BrittlenessRun, run_brittleness, summarise, read_rows unit/test_brittleness.py
src/credencestack/bench/config.py The benchmark configuration (bench.yaml). FrameworkAgent, BenchConfigError, Price, BenchConfig, config_id, load_bench_config integration/test_adk_connector.py
integration/test_crewai_connector.py
integration/test_msaf_connector.py
+3
src/credencestack/bench/cost.py The benchmark's cost meter and hard cap. BudgetExhausted, CostMeter, ModelCallGuard integration/test_adk_connector.py
integration/test_crewai_connector.py
integration/test_msaf_connector.py
+2
src/credencestack/bench/guard.py The LangChain callback that enforces the benchmark's cost cap (needs langchain). CostGuard -
src/credencestack/bench/runner.py bench run: every configuration, one evidence bundle each, under one cost cap. BenchError, ConfigResult, BenchRun, default_model_factory, load_packs, episodes_planned +4 unit/test_bench.py
src/credencestack/cli/__init__.py The credencestack command line: one grammar, shared flags, one console. main integration/test_assess_cli.py
integration/test_confidential_bundles.py
integration/test_evidence_bundle.py
+21
src/credencestack/cli/bench.py credencestack bench: benchmark agents and models (the commands that can spend money). load_config, confirm, run, brittleness, write_brittleness_manifest, write_bench_report integration/test_manifests.py
unit/test_bench.py
unit/test_brittleness.py
+1
src/credencestack/cli/common.py Helpers the commands share: settings for flags, packs, telemetry and the gate. with_otel, with_packs, with_mutators, registry, fail_on_threshold, gate_failures +2 unit/test_conformance.py
unit/test_forge_mutators.py
unit/test_otel.py
+2
src/credencestack/cli/config.py credencestack config: show the resolved settings, create a credencestack.toml. show, template, init integration/test_manifests.py
src/credencestack/cli/connectors.py credencestack connectors: list the connectors and check one with the conformance kit. list_connectors, check integration/test_manifests.py
unit/test_conformance.py
unit/test_settings.py
src/credencestack/cli/console.py The one module that prints: header, progress, tables, numbers, errors, closing block. no_color_requested, Output -
src/credencestack/cli/doctor.py credencestack doctor and credencestack version. doctor, version unit/test_cli.py
src/credencestack/cli/env.py credencestack env: the simulated back office as an environment. serve, episode, export unit/test_env_rl.py
unit/test_otel_workflows.py
src/credencestack/cli/evidence.py credencestack evidence: verify, export, inspect and keygen; signing helpers. signing_key, sign_dir, verify, export, inspect_dir, keygen integration/test_confidential_bundles.py
integration/test_evidence_bundle.py
integration/test_manifests.py
+6
src/credencestack/cli/framework.py How every command is declared: global flags, error handling and exit codes, once. command unit/test_cli_grammar.py
unit/test_otel_workflows.py
src/credencestack/cli/generate.py credencestack generate: new, correctly labelled scenarios from seed scenarios. generate unit/test_brittleness.py
unit/test_cli_grammar.py
unit/test_env_rl.py
+4
src/credencestack/cli/grammar.py The command grammar: every command, its help group, and the flag vocabulary. - unit/test_cli_grammar.py
src/credencestack/cli/mutators.py credencestack mutators: list and describe Forge's mutators. list_mutators, show unit/test_forge_mutators.py
src/credencestack/cli/options.py The shared flags (design principle P2-3): one definition each, reused by every command. - -
src/credencestack/cli/otel.py credencestack otel: check the endpoint and print a scenario's spans. check, tree, print_spans unit/test_otel.py
unit/test_otel_workflows.py
src/credencestack/cli/packs.py credencestack packs: list, show, validate, init and schema. summary, list_packs, show, validate, init, schema integration/test_manifests.py
unit/test_builtin_packs.py
unit/test_cli.py
+4
src/credencestack/cli/profiles.py credencestack profiles: validate, explain and import authority profiles and policies. validate, explain, import_warrant, profile_from_answers, init unit/test_cli_authority.py
unit/test_policy_cli.py
unit/test_tenuo.py
src/credencestack/cli/report.py credencestack report: rebuild an output directory's report. report integration/test_evidence_bundle.py
unit/test_cli.py
unit/test_reports.py
+1
src/credencestack/cli/run.py credencestack run and credencestack demo: run agents against packs. connector_options, resolve_target, check_connector, apply_policy, apply_profile, load_runtime_logs +5 integration/test_manifests.py
unit/test_brittleness.py
unit/test_cli.py
+5
src/credencestack/cli/test.py credencestack test: test an agent as it is, and say what to fix. test unit/test_otel_workflows.py
src/credencestack/connectors/__init__.py Connectors connect agents (Python code, HTTP services, LangChain 1.x) to CredenceStack. get_connector integration/test_adk_connector.py
integration/test_assess_frameworks.py
integration/test_claude_agent_sdk_connector.py
+21
src/credencestack/connectors/adk.py The adk connector: Google Agent Development Kit agents (google-adk 2.14). EnvTool, env_tools, require_confirmation, CredenceStackPlugin, ScriptedLlm, GoogleADKConnector +1 integration/test_adk_connector.py
integration/test_assess_frameworks.py
integration/test_claude_agent_sdk_connector.py
src/credencestack/connectors/claude_agent_sdk.py The claude-agent-sdk connector: Claude Agent SDK agents (claude-agent-sdk 0.2). tool_name, env_sdk_tools, ScriptedTransport, ask_for, ClaudeAgentSDKConnector, build_connector integration/test_claude_agent_sdk_connector.py
unit/test_integrations.py
src/credencestack/connectors/conformance/__init__.py The connector conformance kit: does a connector deliver the agent's behaviour faithfully? - integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+6
src/credencestack/connectors/conformance/report.py The conformance report: JSON for machines, a short table for people. CheckResult, ScenarioSummary, ConformanceReport, verdict_for, committed_report unit/test_conformance.py
src/credencestack/connectors/conformance/runner.py Run the conformance scenarios through a connector and check what the connector delivered. fingerprint, run_conformance integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+5
src/credencestack/connectors/conformance/scenarios.py The ten conformance scenarios, taken unchanged from the public packs. ConformanceScenario, load_conformance_scenarios unit/test_conformance.py
unit/test_otel_workflows.py
src/credencestack/connectors/crewai.py The crewai connector: CrewAI crews (crewai 1.15). EnvTool, env_tools, register_hooks, ScriptedCrewLLM, CrewAIConnector, build_connector integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
src/credencestack/connectors/errors.py How connectors describe an agent run that failed. error_text -
src/credencestack/connectors/http.py Connector for agents running as HTTP services (JSON over HTTP). HttpContractError, HttpConnector, build_connector integration/test_claude_agent_sdk_connector.py
unit/test_connectors.py
unit/test_otel.py
src/credencestack/connectors/langchain.py Connector for LangChain 1.x agents (create_agent) and raw LangGraph graphs. SuspensionControl, SuspensionMiddleware, env_tools, build_prompt, parse_output, LangChainConnector +1 integration/test_claude_agent_sdk_connector.py
integration/test_example_agents.py
unit/test_connectors.py
+1
src/credencestack/connectors/loading.py Loading an agent, factory or function from a module:function string. load_callable -
src/credencestack/connectors/mcp.py The mcp connector: test any MCP-capable agent, whatever its framework. task_document, parse_answer, MCPConnector, build_connector integration/test_claude_agent_sdk_connector.py
integration/test_mcp_connector.py
src/credencestack/connectors/mcp_bridge.py A stdio MCP server that forwards to an episode's Streamable HTTP server. bridge, main integration/test_mcp_connector.py
src/credencestack/connectors/mcp_server.py The simulated back office as an MCP server (official MCP Python SDK, mcp 2.x). tool_definition, tool_result, tool_error, EnvironmentMCPServer, free_port integration/test_mcp_connector.py
unit/test_builtin_packs.py
unit/test_otel.py
src/credencestack/connectors/msaf.py The msaf connector: Microsoft Agent Framework agents (Python, agent-framework-core 1.26). env_function_tools, require_approval, ScriptedChatClient, MSAFConnector, build_connector integration/test_assess_frameworks.py
integration/test_claude_agent_sdk_connector.py
integration/test_msaf_connector.py
src/credencestack/connectors/openai_agents.py The openai-agents connector: OpenAI Agents SDK agents (openai-agents 0.25). Suspended, env_function_tools, scripted_model, OpenAIAgentsConnector, with_approval, build_connector integration/test_claude_agent_sdk_connector.py
integration/test_example_agents.py
integration/test_openai_agents_connector.py
+2
src/credencestack/connectors/prompting.py The task prompt every model-driven connector sends, and how scripted models read it back. build_prompt, parse_task, parse_answer_text unit/test_connectors.py
src/credencestack/connectors/protocol.py The v1 agent connector protocol: how CredenceStack drives an agent in the simulated environment. TaskInfo, Capabilities, RunHandle, Connector, ToolCall, ToolResult +3 integration/test_assess_frameworks.py
integration/test_crewai_connector.py
unit/test_conformance.py
+1
src/credencestack/connectors/python.py Connector for agents written as Python code. execute, CallableContext, PythonConnector, build_connector integration/test_claude_agent_sdk_connector.py
integration/test_domain_packs.py
integration/test_example_agents.py
+7
src/credencestack/connectors/registry.py Every connector CredenceStack knows, in one place. ConnectorNotInstalled, ConnectorOptions, ConnectorSpec, get_spec, build_connector, scripted_policy +1 integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
integration/test_crewai_connector.py
+6
src/credencestack/connectors/strands.py The strands connector: AWS Strands Agents (strands-agents 1.65). env_agent_tools, CredenceStackHooks, ScriptedStrandsModel, StrandsConnector, build_connector integration/test_assess_frameworks.py
integration/test_claude_agent_sdk_connector.py
integration/test_strands_connector.py
src/credencestack/core/__init__.py Core domain models shared by every CredenceStack module. - integration/test_domain_packs.py
integration/test_example_agents.py
unit/test_assess_core.py
+13
src/credencestack/core/findings.py Findings: what a grader concluded about one step of one scenario epoch. Finding, default_pillars unit/test_assess_core.py
unit/test_core.py
unit/test_inspect_runner.py
+1
src/credencestack/core/pillars.py The six pillars evidence is organised around (OCC Bulletin 2026-54, indicative). Pillar unit/test_core.py
unit/test_inspect_runner.py
src/credencestack/core/results.py Per-epoch run results. RunResult unit/test_assess_core.py
unit/test_core.py
unit/test_inspect_runner.py
+1
src/credencestack/core/scenario.py Scenario and pack models. InjectionGoal, Injection, LedgerExpectation, Expected, AuthorityBinding, ExpectedDecision +7 integration/test_domain_packs.py
integration/test_example_agents.py
unit/test_builtin_packs.py
+11
src/credencestack/core/trace.py Flat trace events: the ordered record of everything that happened in one epoch. TraceEvent unit/test_assess_core.py
unit/test_core.py
unit/test_kyc_grader.py
src/credencestack/core/visibility.py Scenario visibility: whether a scenario's content may appear in shared outputs. is_confidential, confidential_ref, shown_id unit/test_forge_mutators.py
unit/test_otel.py
unit/test_visibility.py
src/credencestack/domains/__init__.py Business domains: payments, financial crime, document integrity, KYC onboarding. load_object unit/test_docintegrity_grader.py
unit/test_fincrime_grader.py
unit/test_kyc_grader.py
+1
src/credencestack/domains/docintegrity/__init__.py The docintegrity domain: policy model and deterministic grader. - unit/test_docintegrity_grader.py
src/credencestack/domains/docintegrity/policy.py The document-integrity policy model. DocIntegrityPolicy unit/test_docintegrity_grader.py
src/credencestack/domains/fincrime/__init__.py The fincrime domain: policy model and deterministic grader. - unit/test_fincrime_grader.py
src/credencestack/domains/fincrime/policy.py The financial-crime (sanctions screening and alert review) policy model. MatchingPolicy, DiscountPolicy, OwnershipPolicy, AuthorityPolicy, RationalePolicy, ScreeningPolicy +1 unit/test_fincrime_grader.py
src/credencestack/domains/kyc/__init__.py The kyc domain: policy model and deterministic grader. - unit/test_kyc_grader.py
src/credencestack/domains/kyc/policy.py The KYC and KYB onboarding policy model. RiskMatrix, EddTriggers, ApprovalPolicy, KycPolicy unit/test_kyc_grader.py
src/credencestack/domains/policy.py Domain policies: YAML files, like authority profiles, one model per domain. PolicyError, ConfidentialityPolicy, PolicyBase, policy_model, parse_policy, load_policy +2 unit/test_docintegrity_grader.py
unit/test_fincrime_grader.py
unit/test_kyc_grader.py
+1
src/credencestack/domains/source.py Resolve the domain policy a scenario is tested against. scenario_policy -
src/credencestack/env/__init__.py The simulated finance back office, and CredenceEnv: the same worlds step by step. - integration/test_mcp_connector.py
unit/test_api.py
unit/test_conformance.py
+12
src/credencestack/env/clock.py A simulated clock: time only moves when the environment says so. SimClock unit/test_env.py
src/credencestack/env/documents_world.py Documents and systems of record: the tools of the documents and registry families. DocumentsWorld -
src/credencestack/env/environment.py The simulated finance back office one agent works in during one episode. World, ToolError, CallInfo, validate_args, Environment unit/test_control.py
unit/test_docintegrity_grader.py
unit/test_env.py
+4
src/credencestack/env/export.py credencestack env export: generated tasks as JSONL for training and evaluation. export_tasks, write_env_manifest -
src/credencestack/env/families.py Tool families: the groups of environment tools a scenario can declare. specs_for, scenario_families unit/test_fincrime_grader.py
src/credencestack/env/faults.py The fault wrappers and how scenario fault specs become them. Fault, Timeout, Stale, PartialFailure, RateLimited, Outage +4 unit/test_faults.py
src/credencestack/env/fincrime/__init__.py Financial-crime world: synthetic watch-lists, parties, alerts and their tools. - unit/test_fincrime_grader.py
src/credencestack/env/fincrime/models.py Data models of the financial-crime world: watch-list, parties, ownership, payments, alerts. WatchEntry, WatchList, Party, OwnershipEdge, PaymentMessage, Attachment +3 unit/test_fincrime_grader.py
src/credencestack/env/fincrime/screening.py Screening primitives shared by the environment's tools, the grader and the reference agents. load_watchlist, MatchSettings, entry_match, IdentifierCheck, compare_identifiers, shared_identifiers +1 unit/test_fincrime_grader.py
src/credencestack/env/fincrime/world.py The financial-crime world: screening and case-management tools over synthetic data. FincrimeWorld -
src/credencestack/env/gym.py A Gymnasium adapter for :class:~credencestack.env.CredenceEnv (optional). CredenceGymEnv unit/test_env_gym.py
src/credencestack/env/injection.py Planting a scenario's prompt-injection payloads in tool results, and spotting the goal. place, inject, matches_goal unit/test_env_v1.py
src/credencestack/env/killswitch.py The kill switch: send a scenario's suspension signal and measure how the agent stops. KillSwitchReport, KillSwitch unit/test_control.py
src/credencestack/env/kyc/__init__.py KYC onboarding world: applications, PEP and adverse-media data, and their tools. - unit/test_kyc_grader.py
src/credencestack/env/kyc/models.py Data models of the KYC and KYB onboarding world. Person, Application, DeclaredOwner, PepRecord, MediaItem, KycSeed unit/test_kyc_grader.py
src/credencestack/env/kyc/world.py The KYC onboarding world: applications, declarations, PEP and adverse-media checks, decisions. KycWorld -
src/credencestack/env/models.py State of the simulated finance back office: what a scenario seeds and what it records. BankDetailsChange, Vendor, Message, InvoiceRevision, Invoice, ReviewerPolicy +8 unit/test_conformance.py
unit/test_docintegrity_grader.py
unit/test_env.py
+5
src/credencestack/env/rate.py Tool-call rate observer: how bursty an agent's calls are, in simulated time. RateObserver unit/test_control.py
src/credencestack/env/registry.py A synthetic company registry, and the documents agents read (shared by two domains). Shareholder, RegistryCompany, LineItem, Document, LedgerEntry, BankAccountRecord unit/test_docintegrity_grader.py
unit/test_kyc_grader.py
src/credencestack/env/rl.py CredenceEnv: CredenceStack's worlds as a step-by-step environment for research and training. RewardWeights, reward_weights, ScenarioSource, FixedScenarios, GeneratedScenarios, EpisodeOutcome +6 unit/test_env_gym.py
unit/test_env_rl.py
unit/test_forge_mutators.py
+1
src/credencestack/env/tools.py The tools the simulated back office exposes to agents, as data. ToolSpec integration/test_mcp_connector.py
src/credencestack/errors.py The exception hierarchy every command maps to an exit code. CredenceStackError, UsageError, ConfigError, InputError, DependencyError, VerificationError +1 unit/test_api.py
unit/test_bench.py
unit/test_env_rl.py
+3
src/credencestack/evidence/__init__.py Evidence bundles: results, traces, framework mappings, manifests and signatures. - docs/test_sample_report.py
integration/test_confidential_bundles.py
integration/test_evidence_bundle.py
+9
src/credencestack/evidence/bundle.py Write an evidence bundle: one self-describing directory per run. BundleError, RunInfo, scenario_catalogue, copy_authority, pack_entries, write_bundle +5 integration/test_confidential_bundles.py
unit/test_bench.py
unit/test_gate.py
+2
src/credencestack/evidence/chain.py Hash-chained JSONL trace logs. record_hash, chain_records, dumps_chain, ChainFailure, verify_chain integration/test_evidence_bundle.py
unit/test_canonical.py
src/credencestack/evidence/export.py credencestack evidence export: a shareable copy of an output directory. ExportResult, export_bundle integration/test_confidential_bundles.py
unit/test_otel.py
src/credencestack/evidence/frameworks.py Framework mappings: findings grouped by the six pillars, then by framework reference. PrimaryFramework, Framework, Reference, FrameworkMap, load_framework_map, build_mappings integration/test_confidential_bundles.py
integration/test_evidence_bundle.py
src/credencestack/evidence/gate.py The gate: does a run's evidence fail CI? (run --fail-on, evidence inspect). GateError, GateResult, check_threshold, gate, read_results, evaluate_gate +1 integration/test_github_workflows.py
unit/test_gate.py
src/credencestack/evidence/manifest.py The manifest every output directory carries: credencestack.evidence/v1. OutputFile, ProfileInput, PackInput, Inputs, Environment, OtelRef +10 integration/test_evidence_bundle.py
integration/test_github_workflows.py
integration/test_manifests.py
src/credencestack/evidence/merkle.py Merkle root over the bundle's files. leaf_hash, node_hash, merkle_root integration/test_evidence_bundle.py
unit/test_canonical.py
unit/test_verify.py
src/credencestack/evidence/pipeline.py Run packs through Inspect and write the evidence bundle: the library behind run. BundleRun, run_to_bundle integration/test_confidential_bundles.py
unit/test_otel.py
unit/test_otel_workflows.py
src/credencestack/evidence/privacy.py What a bundle may say about confidential scenarios. withheld_message, redact_result, redact_catalogue_entry, split_reconciliation -
src/credencestack/evidence/signing.py Ed25519 keys and DSSE-style signatures over an evidence bundle. KeyFileError, pae, b64, unb64, key_id, inside_git_worktree +7 docs/test_sample_report.py
integration/test_confidential_bundles.py
integration/test_github_workflows.py
+2
src/credencestack/evidence/verify.py Verify an evidence bundle: file hashes, trace chains, Merkle root and signature. VerifyResult, verify_bundle, manifest_digest docs/test_sample_report.py
integration/test_confidential_bundles.py
integration/test_github_workflows.py
+4
src/credencestack/forge/__init__.py Forge: unlimited new, correctly labelled scenarios from a seed, with a difficulty dial. - e2e/test_golden_path.py
unit/test_api.py
unit/test_env_rl.py
+4
src/credencestack/forge/difficulty.py The difficulty dial, read from forge/difficulty.yaml. Level, Dial, dial, parse_levels unit/test_forge_generator.py
src/credencestack/forge/generator.py The generator: seed scenarios plus stacked mutators, labelled by the graders. Applied, Generated, Generation, GenerateConfig, scenario_data, generate e2e/test_golden_path.py
unit/test_env_rl.py
unit/test_forge_generator.py
+3
src/credencestack/forge/label.py Labelling: the grader decides what a correct agent does in a (generated) scenario. Undecidable, Ambiguous, Label, label, NeedsSeed, unclean_reason unit/test_forge_generator.py
unit/test_forge_mutators.py
src/credencestack/forge/mutator.py The mutator interface: one deterministic change to a scenario. Change, as_dict, as_list, NotApplicable, MutatorError, Mutator unit/test_forge_mutators.py
src/credencestack/forge/mutators/__init__.py The shipped mutators, one module per family. - -
src/credencestack/forge/mutators/_util.py Helpers shared by the shipped mutators (scenario access, the profile in force). profile, agent_id, pay_grant, is_clean, task_invoice, vendor +2 -
src/credencestack/forge/mutators/adversarial.py Adversarial mutators: prompt injections from a rule-based phrase grammar (no model). phrase, formatted, Plant, Rephrase, Encode, Move +1 -
src/credencestack/forge/mutators/docintegrity.py Document-integrity mutators: what a document says against itself and the records. Reconciled, TotalsMismatch, BankMismatch, PagesInconsistent, ImpossibleDates, RegistryConflict +1 -
src/credencestack/forge/mutators/fincrime.py Financial-crime mutators: screening names, identifiers and ownership. name_alerts, ExactMatch, ClearNonMatch, Alias, Transliteration, Homoglyph +5 -
src/credencestack/forge/mutators/kyc.py KYC and KYB mutators: documents, PEPs, ownership, the registry and the risk matrix. MissingDocument, PepDirector, HiddenOwner, RegistryConflict, RiskBoundary, EddJurisdiction -
src/credencestack/forge/mutators/payments.py Payments mutators: amounts, splits, period totals, payees, approvals, hours, currency. LimitEdge, Split, MonthlyTotal, NewPayee, DualApproval, OutOfHours +2 -
src/credencestack/forge/mutators/resilience.py Resilience mutators: faults and the kill switch, on single-invoice tasks. TimeoutTiming, RateLimit, ApprovalOutage, StaleBalance, KillSwitch -
src/credencestack/forge/mutators/thirdparty.py Third-party mutators: partner agents' credentials, request velocity and scope. CredentialState, Velocity, ScopeCreep -
src/credencestack/forge/output.py Writing a generation: one pack directory per source pack and visibility. pack_name, write_generation, write_manifest_for, read_rows unit/test_env_rl.py
unit/test_forge_generator.py
unit/test_forge_mutators.py
+1
src/credencestack/forge/registry.py Every mutator: the shipped ones and plugins from --mutator-path. Registry, shown_id, builtin_mutators, load_registry, select e2e/test_golden_path.py
unit/test_env_rl.py
unit/test_forge_generator.py
+3
src/credencestack/forge/validate.py credencestack generate --validate: re-check a generated directory against the graders. relabel_mismatches, validate_dir -
src/credencestack/graders/__init__.py Graders: the deterministic rules that decide what should happen and judge what did. grader_for integration/test_claude_agent_sdk_connector.py
integration/test_domain_packs.py
unit/test_authority_grader.py
+7
src/credencestack/graders/authority.py The authority grader: a pure, deterministic decision for one proposed action. Rule, ActionArgs, DecisionContext, PriorAction, Decision, decide unit/test_authority_grader.py
unit/test_integrations.py
unit/test_kyc_grader.py
+1
src/credencestack/graders/base.py The pluggable domain-grader interface. ExpectedItem, ExpectedOutcome, DomainGrader, domain_finding -
src/credencestack/graders/docintegrity.py The document-integrity grader: is the document consistent with the systems of record? DocumentAssessment, assess_document, DocIntegrityGrader unit/test_docintegrity_grader.py
src/credencestack/graders/domain.py Domain findings: run the scenario's domain grader over one episode. expected_outcome, domain_findings, recorded_ratings, consistency_findings unit/test_kyc_grader.py
src/credencestack/graders/fincrime.py The financial-crime grader: expected alert dispositions and payment actions, and findings. AlertAssessment, list_is_stale, assess_alert, payment_action, screening_unavailable, FincrimeGrader +1 unit/test_fincrime_grader.py
src/credencestack/graders/judge.py Advisory LLM judge for the quality of escalation and refusal messages. CalibrationExample, Calibration, Verdict, load_calibration_set, prompt_for, parse_verdict +2 unit/test_inspect_runner.py
src/credencestack/graders/kyc.py The KYC onboarding grader: documents, owners, risk rating, EDD, approver and decision. KycAssessment, effective_owners, declaration_conflicts, related_people, rate, assess_application +2 unit/test_inspect_runner.py
unit/test_kyc_grader.py
src/credencestack/graders/outcome.py Check an episode against its scenario's declared expected outcomes. OutcomeCheck, check_outcome integration/test_claude_agent_sdk_connector.py
integration/test_domain_packs.py
unit/test_builtin_packs.py
src/credencestack/graders/oversight.py Oversight metrics: how much the agent involved humans, and how controllable it was. OversightMetrics, oversight_metrics unit/test_inspect_runner.py
src/credencestack/graders/payments.py The payments domain grader: the authority grader and its scorer behind the domain interface. PaymentsGrader -
src/credencestack/graders/record.py A self-contained, serialisable record of one episode, for scorers and logs. ControlRecord, EpisodeRecord unit/test_inspect_runner.py
unit/test_kyc_grader.py
src/credencestack/graders/scoring.py Finding-level scorers for v1 episodes. Step, AuthorityComplianceScorer, ResilienceScorer, InjectionScorer, ThirdPartyScorer, all_findings integration/test_claude_agent_sdk_connector.py
integration/test_domain_packs.py
unit/test_inspect_runner.py
src/credencestack/graders/stats.py Run statistics: pass rates with Wilson intervals by scenario, pillar, domain and visibility. PassRate, RateDifference, ScenarioSummary, RunStatistics, run_statistics unit/test_inspect_runner.py
src/credencestack/integrations/__init__.py Integrations with external authority and control layers. - integration/test_confidential_bundles.py
unit/test_integrations.py
unit/test_tenuo.py
src/credencestack/integrations/ap2.py AP2-style mandates (Agent Payments Protocol) as temporary authority profiles. PaymentCurrencyAmount, PaymentItem, PaymentDetailsInit, PaymentRequest, IntentMandate, CartContents +9 unit/test_integrations.py
src/credencestack/integrations/atryum.py Importer for Atryum audit/decision records (JSONL). load_mapping, AtryumSource unit/test_integrations.py
src/credencestack/integrations/base.py Runtime decision sources: what an external control layer decided at run time. RuntimeDecision, RuntimeDecisionSource, RuntimeLogError, register_source, available_sources, parse_spec +1 integration/test_confidential_bundles.py
unit/test_integrations.py
src/credencestack/integrations/reconcile.py Three-way reconciliation: what the agent did, what the runtime layer decided, and policy. Attempted, ReconciliationRow, ControlGap, RunReconciliation, reconcile_episode, reconcile_run unit/test_integrations.py
src/credencestack/integrations/tenuo.py Import a Tenuo warrant as a CredenceStack authority profile (credencestack[tenuo]). WarrantImport, load_warrant, warrant_to_profile unit/test_tenuo.py
src/credencestack/otel/__init__.py OpenTelemetry traces for CredenceStack runs (the [otel] extra). TelemetryNotInstalled, available, active, start, stop, use +3 unit/test_api.py
unit/test_otel.py
unit/test_otel_workflows.py
+1
src/credencestack/otel/config.py Telemetry configuration: the [otel] settings plus the standard OTEL_* variables. TelemetryConfigError, TelemetryConfig, traces_endpoint, resolve, endpoint_label, otlp_hint unit/test_otel.py
unit/test_otel_workflows.py
src/credencestack/otel/hub.py The active telemetry of a command: its session and the run being traced. Telemetry unit/test_otel.py
src/credencestack/otel/metrics.py Metrics (--otel-metrics): a few low-cardinality counters and histograms. build_metric_exporter, Metrics -
src/credencestack/otel/redaction.py Redaction and size caps for captured content (only with --otel-capture-content). denylist, redact, cap, to_text, clean unit/test_otel.py
src/credencestack/otel/semconv.py Every span, event and attribute name CredenceStack emits, in one place. run_span_name, scenario_span_name, grade_span_name, generate_span_name, generated_span_name, episode_span_name +11 unit/test_otel_workflows.py
src/credencestack/otel/spans.py The span model: one trace per scenario epoch (default) or one per run. provider_of, wall_ns, max_severity, profile_hash, forge_attributes, scenario_attributes +2 unit/test_otel.py
src/credencestack/otel/testing.py Capture spans in memory: for tests, golden files and credencestack otel print. capture unit/test_otel.py
unit/test_otel_workflows.py
src/credencestack/otel/tracer.py The tracer provider, exporters and export accounting for one command. explain, CountingExporter, OtlpJsonFileExporter, TelemetryUnavailable, build_exporter, build_resource +1 unit/test_otel.py
src/credencestack/otel/validate.py Check exported spans against the span model, and normalise them for golden files. check_episode, normalise, unregistered unit/test_otel_workflows.py
src/credencestack/otel/workflows.py Spans of the other workflows: generation, environment episodes and benchmarks. GenerationSpans, sampled, start_env_episode, BenchSpans unit/test_otel_workflows.py
src/credencestack/packs/__init__.py Scenario packs: models, loading and schema export. - e2e/test_golden_path.py
integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
+28
src/credencestack/packs/builtin/__init__.py The scenario packs that ship with CredenceStack. builtin_pack_names, builtin_pack_path integration/test_confidential_bundles.py
integration/test_domain_packs.py
integration/test_github_workflows.py
+9
src/credencestack/packs/loader.py Load and validate packs and scenarios from disk. PackError, read_manifest, resolve_profile_ref, resolve_fixture, load_scenario, scenario_from_data +7 e2e/test_golden_path.py
integration/test_adk_connector.py
integration/test_claude_agent_sdk_connector.py
+26
src/credencestack/packs/models.py Scenario and pack models (defined in :mod:credencestack.core.scenario). - -
src/credencestack/packs/schema.py The JSON Schema of scenario files. scenario_json_schema, render_schema unit/test_schema.py
src/credencestack/profiles/__init__.py Authority profiles: who or what may do what, up to which limit. - docs/test_guides.py
integration/test_claude_agent_sdk_connector.py
integration/test_domain_packs.py
+7
src/credencestack/profiles/profile.py Authority profiles: who or what may do what, up to which limit. PeriodLimit, BoundObject, ActionGrant, AgentAuthority, BusinessHours, Controls +4 docs/test_guides.py
unit/test_authority_grader.py
unit/test_connectors.py
+3
src/credencestack/profiles/schema.py JSON Schema export for authority profiles. authority_json_schema, render_authority_schema unit/test_schema.py
src/credencestack/profiles/source.py Resolve the authority profile a scenario is tested against. load_authority_source, scenario_profile, binding_history integration/test_claude_agent_sdk_connector.py
integration/test_domain_packs.py
unit/test_integrations.py
src/credencestack/profiles/steps.py Classify one consequential step against what the authority profile expects. classify_step -
src/credencestack/reports/__init__.py One report engine for every kind of report. - integration/test_end_to_end_script.py
unit/test_bench.py
unit/test_brittleness.py
+1
src/credencestack/reports/bench.py The bench report: charts, benchmark.md and benchmark.html from a bench-<id>/. BenchReportError, read_results, domain_rows, generalisation_rows, deltas, bench_report +1 integration/test_end_to_end_script.py
unit/test_bench.py
src/credencestack/reports/brittleness.py The brittleness report: curve, fixed-to-generated gap, sensitivity and over-caution. draw, brittleness_report, write_report unit/test_bench.py
unit/test_brittleness.py
src/credencestack/reports/charts.py The one chart style: series colours, line styles and markers from the design tokens. series, bar, pyplot, legend, save unit/test_reports.py
src/credencestack/reports/evidence.py The evidence report of a run, built from the bundle's own files. trace_ids, build_context, evidence_report, write_evidence_report, evidence_markdown -
src/credencestack/reports/model.py The one report data model: every report is a :class:Report of blocks. Text, code, link, bold, toned, Block +14 unit/test_reports.py
src/credencestack/reports/render.py Render a :class:~credencestack.reports.model.Report as HTML or Markdown. tokens, css, render_html, render_sections_markdown, render_markdown unit/test_reports.py
src/credencestack/runner/__init__.py Run scenarios: one episode at a time (:mod:.episode) or packs through Inspect. - integration/test_adk_connector.py
integration/test_assess_frameworks.py
integration/test_claude_agent_sdk_connector.py
+19
src/credencestack/runner/episode.py Run one scenario once (one epoch) in the simulated environment. Episode, build_environment, task_info, prepare_episode, run_episode, record_episode integration/test_adk_connector.py
integration/test_assess_frameworks.py
integration/test_claude_agent_sdk_connector.py
+18
src/credencestack/runner/inspect_runner.py Run scenario packs with UK AISI's Inspect (inspect_ai). episode_solver, authority_scorer, resilience_scorer, injection_scorer, thirdparty_scorer, outcome_scorer +4 integration/test_domain_packs.py
integration/test_example_agents.py
unit/test_inspect_runner.py
src/credencestack/settings.py Settings: one typed object for every configurable value, and where each came from. OutputSettings, PacksSettings, MutatorsSettings, RunSettings, EvidenceSettings, OtelSettings +9 integration/test_github_workflows.py
unit/test_api.py
unit/test_cli.py
+8

Scripts

File Purpose Main symbols Tests
scripts/build_sample_report.py Build the published sample evidence report (offline, public packs only). cs, main -
scripts/calibrate_judge.py Calibrate the advisory judge against the hand-labelled messages (calls a real model). main -
scripts/check_dist.py Check built distributions contain only what should be published. names, problems, main integration/test_github_workflows.py
unit/test_check_dist.py
scripts/check_synthetic.py Check that the shipped domain data is synthetic. imo_valid, data_files, load_denylist, check, main unit/test_synthetic_data.py
scripts/docs_audit.py Audit the documentation against the code; print a short report; exit 1 on any problem. doc_pages, check_generated, check_links, check_nav, glossary_terms, check_glossary +9 -
scripts/fill_article.py Fill the launch article's placeholders from a brittleness output directory. pct, points, hook_facts, metrics, fill, main e2e/test_golden_path.py
unit/test_brittleness.py
scripts/gen_dev_reference.py Generate the developer reference: the file index and the per-package API tables. module_name, symbols, load_tests, covering_tests, file_index, cell +10 docs/test_dev_reference.py
integration/test_github_workflows.py
scripts/gen_doc_examples.py Generate every input and output example the documentation shows, by running the code. Guide, installed, Scratch, command_text, summary_part, failures_table +15 docs/test_dev_reference.py
docs/test_guides.py
integration/test_github_workflows.py
scripts/gen_docs_reference.py Generate the documentation pages that are derived from data in the package. builtin_packs, pack_page, scenario_table, findings_table, index_page, frameworks_page +4 integration/test_github_workflows.py
unit/test_docs_reference.py
scripts/gen_goldens.py Write (or check) the golden files for CLI help, manifests and report data models. normalise, cli_help, outputs, manifest_golden, report_goldens, goldens +1 unit/test_goldens.py
scripts/gen_otel_golden.py Write (or check) the OpenTelemetry golden span trees: per connector and per workflow. installed, workflow, golden, render, main unit/test_otel_golden.py
unit/test_otel_workflows.py
scripts/gen_tokens.py Generate the CSS design tokens from src/credencestack/reports/tokens.json. variables, docs_css, website_css, outputs, main -
scripts/gen_website_facts.py Generate docs/dev/website-facts.json: every fact the website shows, from the code. positioning, packs, mutators, levels, forge_demo, hook +4 -
scripts/release_version.py Check that a release tag, pyproject.toml and CHANGELOG.md agree, and extract the notes. normalise, package_version, changelog_section, main integration/test_github_workflows.py
unit/test_release_version.py
scripts/screenshot_reports.py Screenshot the sample reports at desktop and phone widths (needs a local Chrome). chrome, strip, main -

Examples

File Purpose Main symbols Tests
examples/__init__.py Runnable examples: agents, framework guides and developer-reference scripts. - docs/test_dev_reference.py
docs/test_guides.py
docs/test_page_examples.py
+22
examples/agents/__init__.py Example agents run by the integration tests and the quickstart. - integration/test_example_agents.py
examples/agents/plain_callable.py A plain-callable agent: agent(ctx) calls tools and returns its decision. careful_agent integration/test_example_agents.py
examples/agents/policy.py A policy agent: a generator that yields tool calls and receives their results. careful_policy integration/test_example_agents.py
examples/custom-mutator/vendor_suffix.py A worked mutator plugin: the vendor's legal suffix written another way. VendorSuffix -
examples/dev/__init__.py Developer-reference examples: each script prints one API's input and output. - docs/test_dev_reference.py
examples/dev/_common.py Shared helpers for the developer-reference examples (printing and built-in scenarios). show, scenario docs/test_dev_reference.py
examples/dev/bench_report.py Benchmark: offline results -> results.csv, episodes.csv, benchmark.md and charts. - docs/test_dev_reference.py
examples/dev/bundle_builder.py Bundle builder: run results -> bundle files and manifest.json. - docs/test_dev_reference.py
examples/dev/canonical_chain.py Canonical JSON and the per-trace hash chain (and what verify_chain reports on tampering). - docs/test_dev_reference.py
examples/dev/domain_grader.py Domain grader: scenario + initial state -> expected outcome; episode -> findings. - docs/test_dev_reference.py
examples/dev/fault_wrapper.py Fault wrapper: tool call -> faulted result plus a fault trace event. - docs/test_dev_reference.py
examples/dev/grader_decide.py Grader: (profile, action, args, context, history) -> Decision. - docs/test_dev_reference.py
examples/dev/graders.py Graders: one episode's trace -> findings, for each of the four scorers. - docs/test_dev_reference.py
examples/dev/kill_switch.py Kill switch: a control event mid-episode -> the measured KillSwitchReport. - docs/test_dev_reference.py
examples/dev/matching.py Matching: two names -> the best score and the view that produced it. - docs/test_dev_reference.py
examples/dev/oversight.py Oversight metrics: episode records -> escalation, approval, suspension and rate metrics. - docs/test_dev_reference.py
examples/dev/pack_loader.py Pack loader: scenario YAML -> validated Scenario (and the error for a broken one). - docs/test_dev_reference.py
examples/dev/python_adapter.py An connector: task and tools -> trace (the Python callable connector, one episode). - docs/test_dev_reference.py
examples/dev/sign_verify.py Signer and verifier: manifest + Merkle root -> signature.json; bundle -> VerifyResult. - docs/test_dev_reference.py
examples/dev/stats.py Statistics: per-epoch results -> pass rates with Wilson 95% intervals. - docs/test_dev_reference.py
examples/dev/telemetry.py Module reference example: resolve the telemetry settings and capture one episode's spans. - docs/test_dev_reference.py
examples/frameworks/__init__.py Framework examples for the domain packs (financial crime, KYC). - integration/test_claude_agent_sdk_connector.py
examples/frameworks/claude_agent_sdk/__init__.py Claude Agent SDK example agents (payments, financial crime, KYC). - integration/test_claude_agent_sdk_connector.py
examples/frameworks/claude_agent_sdk/agent_naive.py A naive Claude Agent SDK agent: no hooks, a minimal prompt (the baseline to improve on). build integration/test_claude_agent_sdk_connector.py
examples/frameworks/claude_agent_sdk/agent_safe.py A safe Claude Agent SDK agent: SDK-native approval hooks and a fail-closed prompt. build integration/test_claude_agent_sdk_connector.py
examples/frameworks/mcp/__init__.py Framework examples for the domain packs (financial crime, KYC). - -
examples/frameworks/mcp/fincrime_safe.py A safe MCP alert-review agent: the safe financial-crime policy over MCP, with a kill switch. - -
examples/frameworks/mcp/kyc_safe.py A safe MCP onboarding agent: the safe KYC policy over MCP, with a kill switch. - -
examples/frameworks/openai_agents/__init__.py Framework examples for the domain packs (financial crime, KYC). - -
examples/frameworks/openai_agents/fincrime_safe.py A safe OpenAI Agents SDK alert-review agent (financial-crime domain). build -
examples/frameworks/openai_agents/kyc_safe.py A safe OpenAI Agents SDK onboarding agent (KYC domain). build -
examples/guides/__init__.py Tutorial code for the framework guides: a naive and a safe agent per framework. - integration/test_adk_connector.py
integration/test_crewai_connector.py
integration/test_example_agents.py
+5
examples/guides/crewai/__init__.py The CrewAI guide: naive and safe agents and the CI workflow. - integration/test_crewai_connector.py
live/test_live_connectors.py
examples/guides/crewai/agent_naive.py A naive CrewAI crew: one agent, no guardrails (a baseline). build integration/test_crewai_connector.py
live/test_live_connectors.py
examples/guides/crewai/agent_safe.py A safer CrewAI crew: a fail-closed role, a tool-call budget, no delegation. build integration/test_crewai_connector.py
live/test_live_connectors.py
examples/guides/fincrime/__init__.py Guide example: the fincrime domain with a LangGraph agent. - -
examples/guides/fincrime/agent_naive.py A naive sanctions alert-review agent (LangGraph): the tools and a one-line prompt. chat_model, build -
examples/guides/fincrime/agent_safe.py A safe sanctions alert-review agent (LangGraph): policy first, fail closed, never tip off. chat_model, build -
examples/guides/google_adk/__init__.py The Google ADK guide: naive and safe agents and the CI workflow. - integration/test_adk_connector.py
live/test_live_connectors.py
examples/guides/google_adk/agent_naive.py A naive Google ADK agent: no confirmation, no guardrails (a baseline). build integration/test_adk_connector.py
live/test_live_connectors.py
examples/guides/google_adk/agent_safe.py A safe Google ADK agent: native tool confirmation above the mandate's limit. build integration/test_adk_connector.py
live/test_live_connectors.py
examples/guides/kyc/__init__.py Guide example: the kyc domain with a LangGraph agent. - -
examples/guides/kyc/agent_naive.py A naive onboarding agent (LangGraph): the tools and a one-line prompt. chat_model, build -
examples/guides/kyc/agent_safe.py A safe onboarding agent (LangGraph): policy first, EDD and senior approval, never tip off. chat_model, build -
examples/guides/langgraph/__init__.py The LangChain and LangGraph guide: naive and safe agents and the CI workflow. - integration/test_example_agents.py
examples/guides/langgraph/agent_naive.py A naive LangGraph agent: CredenceStack's tools and nothing else (a baseline). chat_model, build integration/test_example_agents.py
examples/guides/langgraph/agent_safe.py A safe LangGraph agent: human approval, a kill switch and a tool budget. build integration/test_example_agents.py
examples/guides/mcp/__init__.py The MCP (any framework) guide: naive and safe agents and the CI workflow. - integration/test_mcp_connector.py
examples/guides/mcp/agent_naive.py A naive MCP agent: replays the naive policy over MCP, offline, with no control endpoint. - integration/test_mcp_connector.py
examples/guides/mcp/agent_safe.py A safe MCP agent: the safe policy, plus a control endpoint for the kill switch. - integration/test_mcp_connector.py
examples/guides/mcp/scripted_agent.py A minimal MCP-client agent: replays a scripted policy over MCP, offline. serve_control, to_result, run, main integration/test_mcp_connector.py
examples/guides/msaf/__init__.py The Microsoft Agent Framework guide: naive and safe agents and the CI workflow. - integration/test_msaf_connector.py
live/test_live_connectors.py
examples/guides/msaf/agent_naive.py A naive Microsoft Agent Framework agent: no approvals, no guardrails (a baseline). make_client, build integration/test_msaf_connector.py
live/test_live_connectors.py
examples/guides/msaf/agent_safe.py A safe Microsoft Agent Framework agent: native approvals and a fail-closed prompt. build integration/test_msaf_connector.py
live/test_live_connectors.py
examples/guides/openai_agents/__init__.py The OpenAI Agents SDK guide: naive and safe agents and the CI workflow. - integration/test_openai_agents_connector.py
live/test_live_connectors.py
examples/guides/openai_agents/agent_naive.py A naive OpenAI Agents SDK agent: no approvals, no guardrails (a baseline). build integration/test_openai_agents_connector.py
live/test_live_connectors.py
examples/guides/openai_agents/agent_safe.py A safe OpenAI Agents SDK agent: native approvals and a fail-closed prompt. build integration/test_openai_agents_connector.py
live/test_live_connectors.py
examples/guides/strands/__init__.py The AWS Strands guide: naive and safe agents and the CI workflow. - integration/test_strands_connector.py
live/test_live_connectors.py
examples/guides/strands/agent_naive.py A naive Strands agent: no approvals, no guardrails (a baseline). build integration/test_strands_connector.py
live/test_live_connectors.py
examples/guides/strands/agent_safe.py A safe Strands agent: an approval interrupt above the mandate's limit. ApprovalHook, build integration/test_strands_connector.py
live/test_live_connectors.py
examples/test_your_agent/__init__.py Example agents for credencestack test: ordinary agents, unaware of CredenceStack. - integration/test_assess_cli.py
integration/test_assess_frameworks.py
examples/test_your_agent/from_scratch/__init__.py An accounts-payable agent written from scratch. - integration/test_assess_cli.py
integration/test_assess_frameworks.py
examples/test_your_agent/from_scratch/agent.py An accounts-payable agent written from scratch: a model, five tools and a loop. get_bill, get_supplier, check_my_limits, ask_manager_approval, create_payment, run integration/test_assess_cli.py
integration/test_assess_frameworks.py
examples/test_your_agent/http_service/__init__.py An accounts-payable agent deployed as an HTTP service. - integration/test_assess_cli.py
examples/test_your_agent/http_service/service.py An accounts-payable agent deployed as an HTTP service. call_tool, handle, Handler, serve integration/test_assess_cli.py
examples/test_your_agent/langgraph/__init__.py An accounts-payable agent built with LangChain's create_agent. - integration/test_assess_frameworks.py
examples/test_your_agent/langgraph/agent.py An accounts-payable agent built with LangChain's create_agent (LangGraph). get_bill, get_supplier, check_my_limits, ask_manager_approval, create_payment integration/test_assess_frameworks.py
examples/test_your_agent/offline_ap.py The offline "model" the example accounts-payable agents use when no real model is set. decide, parse integration/test_assess_cli.py
integration/test_assess_frameworks.py
examples/test_your_agent/offline_models.py Offline stand-ins for a real model, for the example agents (no API key, no network). langchain_model, openai_agents_model integration/test_assess_cli.py
integration/test_assess_frameworks.py
examples/test_your_agent/openai_agents/__init__.py An accounts-payable agent built with the OpenAI Agents SDK. - integration/test_assess_frameworks.py
examples/test_your_agent/openai_agents/agent.py An accounts-payable agent built with the OpenAI Agents SDK. get_bill, get_supplier, check_my_limits, ask_manager_approval, create_payment integration/test_assess_frameworks.py