failproofai 1.0.1 → 1.0.2-beta.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next/standalone/.next/BUILD_ID +1 -1
- package/.next/standalone/.next/build-manifest.json +3 -3
- package/.next/standalone/.next/prerender-manifest.json +6 -6
- package/.next/standalone/.next/required-server-files.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page.js +2 -2
- package/.next/standalone/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_global-error.html +1 -1
- package/.next/standalone/.next/server/app/_global-error.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +6 -6
- package/.next/standalone/.next/server/app/_global-error.segments/_full.segment.rsc +7 -7
- package/.next/standalone/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/standalone/.next/server/app/_not-found/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page.js +2 -2
- package/.next/standalone/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/_not-found.html +1 -1
- package/.next/standalone/.next/server/app/_not-found.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/api/audit/invite/route.js +3 -2
- package/.next/standalone/.next/server/app/api/audit/invite/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/run/route.js +5 -4
- package/.next/standalone/.next/server/app/api/audit/run/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/audit/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js +2 -2
- package/.next/standalone/.next/server/app/api/auth/login-request/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js +4 -3
- package/.next/standalone/.next/server/app/api/auth/login-verify/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/logout/route.js +4 -4
- package/.next/standalone/.next/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/auth/status/route.js +4 -4
- package/.next/standalone/.next/server/app/api/auth/status/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/api/download/[project]/[session]/route.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/audit/page.js +2 -2
- package/.next/standalone/.next/server/app/audit/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/audit/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/index.html +1 -1
- package/.next/standalone/.next/server/app/index.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/__PAGE__.segment.rsc +14 -14
- package/.next/standalone/.next/server/app/index.segments/_full.segment.rsc +15 -15
- package/.next/standalone/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/standalone/.next/server/app/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/page.js +2 -2
- package/.next/standalone/.next/server/app/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/policies/page/server-reference-manifest.json +66 -22
- package/.next/standalone/.next/server/app/policies/page.js +5 -4
- package/.next/standalone/.next/server/app/policies/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/policies/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page.js +2 -2
- package/.next/standalone/.next/server/app/project/[name]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/react-loadable-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page/server-reference-manifest.json +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js +2 -2
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/project/[name]/session/[sessionId]/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/projects/page/server-reference-manifest.json +1 -1
- package/.next/standalone/.next/server/app/projects/page.js +2 -2
- package/.next/standalone/.next/server/app/projects/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/projects/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/app/settings/page/server-reference-manifest.json +4 -4
- package/.next/standalone/.next/server/app/settings/page.js +1 -1
- package/.next/standalone/.next/server/app/settings/page.js.nft.json +1 -1
- package/.next/standalone/.next/server/app/settings/page_client-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/chunks/{[externals]__1qzqcio._.js → [externals]__0e32-7c._.js} +1 -1
- package/.next/standalone/.next/server/chunks/[externals]__1s462yl._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__01eqny5._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_0xu5z._.js +1 -1
- package/.next/standalone/.next/server/chunks/{[root-of-the-server]__1p8poxd._.js → [root-of-the-server]__0igxt32._.js} +2 -2
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0neqlu-._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0o07qi9._.js +3 -0
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0t9oqnn._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0bs-v8p._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0tovk6q._.js +3 -0
- package/.next/standalone/.next/server/chunks/_0trp3yc._.js +3 -0
- package/.next/standalone/.next/server/chunks/_185gyk9._.js +3 -0
- package/.next/standalone/.next/server/chunks/_1ek68ln._.js +5 -6
- package/.next/standalone/.next/server/chunks/lib_telemetry-id_ts_1k8gj9o._.js +3 -0
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_09d5c79._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_04op_ou._.js} +1 -1
- package/.next/standalone/.next/server/chunks/{node_modules_posthog-node_dist_entrypoints_index_node_mjs_1d2g73o._.js → node_modules_posthog-node_dist_entrypoints_index_node_mjs_0dr20uz._.js} +1 -1
- package/.next/standalone/.next/server/chunks/package_json_[json]_cjs_1nxcc4v._.js +1 -1
- package/.next/standalone/.next/server/chunks/src_hooks_0xbw3bu._.js +12 -0
- package/.next/standalone/.next/server/chunks/src_hooks_fp-home_ts_09kv0bn._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__013jr2b._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__01wy8d-._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__02npjtd._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__0spkm68._.js → [root-of-the-server]__07gm3zl._.js} +21 -20
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0da85px._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0ftmoxc._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0oa1lav._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0p-5p8u._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0s740oi._.js +6 -0
- package/.next/standalone/.next/server/chunks/ssr/{[root-of-the-server]__07tbbf3._.js → [root-of-the-server]__0zig5sv._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__192nhvh._.js +5 -0
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1p2otjt._.js +4 -0
- package/.next/standalone/.next/server/chunks/ssr/{_0lvyuv4._.js → _00e9tnf._.js} +2 -2
- package/.next/standalone/.next/server/chunks/ssr/_08x1r5t._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/{_0u5zauv._.js → _12l4a_k._.js} +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1u8-lu2._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/_1zopuov._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_audit__components_audit-dashboard_tsx_0p9ud47._.js +13 -13
- package/.next/standalone/.next/server/chunks/ssr/app_global-error_tsx_1kp6l3x._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/app_policies_hooks-client_tsx_19dqvpc._.js +2 -2
- package/.next/standalone/.next/server/chunks/ssr/app_settings_settings-client_tsx_20lq-mq._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_08o7bqo._.js +10 -0
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_builtin-policies_ts_09j2ndl._.js +1 -1
- package/.next/standalone/.next/server/chunks/ssr/src_hooks_fp-home_ts_0je3xkv._.js +1 -1
- package/.next/standalone/.next/server/middleware-build-manifest.js +3 -3
- package/.next/standalone/.next/server/middleware.js +1 -1
- package/.next/standalone/.next/server/pages/404.html +1 -1
- package/.next/standalone/.next/server/pages/500.html +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.js +1 -1
- package/.next/standalone/.next/server/server-reference-manifest.json +71 -27
- package/.next/standalone/.next/static/chunks/{37fcpc36x9gpe.js → 0eqky-7n7dgdm.js} +1 -1
- package/.next/standalone/.next/static/chunks/{1ide1wl2f7zi1.js → 0sa9v5mhc8861.js} +13 -13
- package/.next/standalone/.next/static/chunks/1mfzsja6ftim5.css +2 -0
- package/.next/standalone/.next/static/chunks/{3k7mxbp9hiom0.js → 1nuqytbta44af.js} +1 -1
- package/.next/standalone/.next/static/chunks/1sl2xmn9inx3y.js +6 -0
- package/.next/standalone/.next/static/chunks/{2_2lhuojq2xop.js → 2aawsjld9ied_.js} +1 -1
- package/.next/standalone/.next/static/chunks/2gn7ut4svofm2.js +1 -0
- package/.next/standalone/.next/static/chunks/{31s1smp-g7gks.js → 2hs7ycvsav7v2.js} +1 -1
- package/.next/standalone/.next/static/chunks/{0k5050ezjvv49.js → 2i2yt3hzjredm.js} +1 -1
- package/.next/standalone/.next/static/chunks/{3c808qrfcq0im.js → 35xg6retpe6rp.js} +1 -1
- package/.next/standalone/.next/static/chunks/{2zpp1we2jv6tb.js → 3y54nw0i7dsjl.js} +1 -1
- package/.next/standalone/SECURITY.md +5 -4
- package/.next/standalone/app/actions/get-hooks-config.ts +108 -17
- package/.next/standalone/app/actions/pack-actions.ts +153 -0
- package/.next/standalone/app/audit/_components/run-progress.tsx +1 -1
- package/.next/standalone/app/audit/_components/share-templates.ts +13 -13
- package/.next/standalone/app/policies/hooks-client.tsx +320 -14
- package/.next/standalone/components/navbar.tsx +2 -28
- package/.next/standalone/components/reach-developers.tsx +8 -1
- package/.next/standalone/docs-old/agenteye/python-sdk-skill.mdx +1 -1
- package/.next/standalone/docs-old/agenteye/python-sdk.mdx +59 -35
- package/.next/standalone/docs-old/i18n/README.ar.md +1 -0
- package/.next/standalone/docs-old/i18n/README.de.md +1 -0
- package/.next/standalone/docs-old/i18n/README.es.md +1 -0
- package/.next/standalone/docs-old/i18n/README.fr.md +1 -0
- package/.next/standalone/docs-old/i18n/README.he.md +1 -0
- package/.next/standalone/docs-old/i18n/README.hi.md +1 -0
- package/.next/standalone/docs-old/i18n/README.it.md +1 -0
- package/.next/standalone/docs-old/i18n/README.ja.md +1 -0
- package/.next/standalone/docs-old/i18n/README.ko.md +1 -0
- package/.next/standalone/docs-old/i18n/README.pt-br.md +1 -0
- package/.next/standalone/docs-old/i18n/README.ru.md +1 -0
- package/.next/standalone/docs-old/i18n/README.tr.md +1 -0
- package/.next/standalone/docs-old/i18n/README.vi.md +1 -0
- package/.next/standalone/docs-old/i18n/README.zh.md +1 -0
- package/.next/standalone/fp-cloud-cli/CHANGELOG.md +431 -0
- package/.next/standalone/fp-cloud-cli/LICENSE +42 -0
- package/.next/standalone/fp-cloud-cli/MANIFEST.in +10 -0
- package/.next/standalone/fp-cloud-cli/README.md +259 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/__init__.py +10 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/__main__.py +4 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/_click_compat.py +64 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/_context.py +332 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/_version.py +1 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/analytics.py +432 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/analytics_config.py +77 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/analytics_registry.py +83 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/app.py +492 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/auth.py +160 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/client.py +1694 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/__init__.py +0 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/_write.py +214 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/agent_cmds.py +407 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/alerts_cmds.py +445 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/audits_cmds.py +1054 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/auth_cmds.py +512 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/errors_cmds.py +190 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/evals_cmds.py +161 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/events_cmds.py +159 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/fleet_cmds.py +416 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/guardrails_cmds.py +148 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/incidents_cmds.py +472 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/keys_cmds.py +407 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/list_cmds.py +63 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/orgs_cmds.py +319 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/policies_cmds.py +499 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/queries_cmds.py +378 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/sessions_cmds.py +151 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/settings_cmds.py +150 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/usage_cmds.py +35 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/commands/users_cmds.py +404 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/config.py +330 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/dates.py +78 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/enforcement.py +345 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/errors.py +98 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/models.py +891 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/orgs.py +30 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/output.py +6593 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/permissions.py +208 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/policy_check.py +290 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/py.typed +0 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/select.py +322 -0
- package/.next/standalone/fp-cloud-cli/fp_cli/theme.py +53 -0
- package/.next/standalone/fp-cloud-cli/pyproject.toml +106 -0
- package/.next/standalone/fp-cloud-cli/skill/SKILL.md +302 -0
- package/.next/standalone/fp-cloud-cli/skill/agents/openai.yaml +8 -0
- package/.next/standalone/fp-cloud-cli/skill/references/commands.md +254 -0
- package/.next/standalone/fp-cloud-cli/tests/__init__.py +0 -0
- package/.next/standalone/fp-cloud-cli/tests/conftest.py +92 -0
- package/.next/standalone/fp-cloud-cli/tests/test_alerting.py +644 -0
- package/.next/standalone/fp-cloud-cli/tests/test_analytics.py +385 -0
- package/.next/standalone/fp-cloud-cli/tests/test_audits.py +950 -0
- package/.next/standalone/fp-cloud-cli/tests/test_auth.py +98 -0
- package/.next/standalone/fp-cloud-cli/tests/test_auth_mode.py +272 -0
- package/.next/standalone/fp-cloud-cli/tests/test_click_compat.py +118 -0
- package/.next/standalone/fp-cloud-cli/tests/test_client.py +299 -0
- package/.next/standalone/fp-cloud-cli/tests/test_commands.py +814 -0
- package/.next/standalone/fp-cloud-cli/tests/test_config.py +99 -0
- package/.next/standalone/fp-cloud-cli/tests/test_dashboards_agent.py +340 -0
- package/.next/standalone/fp-cloud-cli/tests/test_dates.py +76 -0
- package/.next/standalone/fp-cloud-cli/tests/test_enforcement_logic.py +481 -0
- package/.next/standalone/fp-cloud-cli/tests/test_facets.py +170 -0
- package/.next/standalone/fp-cloud-cli/tests/test_failproofai_home.py +722 -0
- package/.next/standalone/fp-cloud-cli/tests/test_fp_home_contract.py +198 -0
- package/.next/standalone/fp-cloud-cli/tests/test_hardening.py +186 -0
- package/.next/standalone/fp-cloud-cli/tests/test_help_table_coverage.py +127 -0
- package/.next/standalone/fp-cloud-cli/tests/test_keys_queries.py +496 -0
- package/.next/standalone/fp-cloud-cli/tests/test_list.py +59 -0
- package/.next/standalone/fp-cloud-cli/tests/test_multivalue.py +183 -0
- package/.next/standalone/fp-cloud-cli/tests/test_no_customer_identifiers.py +168 -0
- package/.next/standalone/fp-cloud-cli/tests/test_operator.py +492 -0
- package/.next/standalone/fp-cloud-cli/tests/test_orgs.py +692 -0
- package/.next/standalone/fp-cloud-cli/tests/test_output.py +1732 -0
- package/.next/standalone/fp-cloud-cli/tests/test_policy_check.py +191 -0
- package/.next/standalone/fp-cloud-cli/tests/test_readme_matches_reality.py +125 -0
- package/.next/standalone/fp-cloud-cli/tests/test_review_fixes.py +161 -0
- package/.next/standalone/fp-cloud-cli/tests/test_telemetry_completeness.py +90 -0
- package/.next/standalone/fp-cloud-cli/tests/test_usage.py +115 -0
- package/.next/standalone/fp-cloud-cli/tests/test_v1_origin_diagnostic.py +70 -0
- package/.next/standalone/fp-cloud-cli/tests/test_v1_routing.py +214 -0
- package/.next/standalone/fp-cloud-cli/tests/test_whoami.py +104 -0
- package/.next/standalone/fp-cloud-cli/uv.lock +552 -0
- package/.next/standalone/package.json +29 -22
- package/.next/standalone/sdk/python/CHANGELOG.md +70 -0
- package/.next/standalone/sdk/python/LICENSE +42 -0
- package/.next/standalone/sdk/python/MANIFEST.in +21 -0
- package/.next/standalone/sdk/python/README.md +466 -0
- package/.next/standalone/sdk/python/docs/README.md +249 -0
- package/.next/standalone/sdk/python/docs/_shared/README.md +43 -0
- package/.next/standalone/sdk/python/docs/_shared/__init__.py +195 -0
- package/.next/standalone/sdk/python/docs/crewai/README.md +328 -0
- package/.next/standalone/sdk/python/docs/crewai/examples/quickstart.py +61 -0
- package/.next/standalone/sdk/python/docs/crewai/examples/research_crew.py +92 -0
- package/.next/standalone/sdk/python/docs/langgraph/README.md +481 -0
- package/.next/standalone/sdk/python/docs/langgraph/examples/quickstart.py +51 -0
- package/.next/standalone/sdk/python/docs/langgraph/examples/research_agent.py +86 -0
- package/.next/standalone/sdk/python/docs/langgraph/examples/supervisor_handoff.py +83 -0
- package/.next/standalone/sdk/python/docs/llama_index/README.md +332 -0
- package/.next/standalone/sdk/python/docs/llama_index/examples/quickstart.py +62 -0
- package/.next/standalone/sdk/python/docs/llama_index/examples/research_agent.py +93 -0
- package/.next/standalone/sdk/python/docs/manual/README.md +491 -0
- package/.next/standalone/sdk/python/docs/manual/examples/quickstart.py +57 -0
- package/.next/standalone/sdk/python/docs/manual/examples/research_agent.py +133 -0
- package/.next/standalone/sdk/python/docs/pydantic_ai/README.md +323 -0
- package/.next/standalone/sdk/python/docs/pydantic_ai/examples/quickstart.py +48 -0
- package/.next/standalone/sdk/python/docs/pydantic_ai/examples/research_agent.py +94 -0
- package/.next/standalone/sdk/python/failproofai_sdk/__init__.py +131 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_context.py +218 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_environment.py +78 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_events.py +752 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_resolver.py +118 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_runtime.py +21 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_schema.py +317 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_scopes.py +422 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_version.py +1 -0
- package/.next/standalone/sdk/python/failproofai_sdk/_writer.py +750 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/__init__.py +274 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/_compat.py +247 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/_core.py +1076 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/crewai.py +1669 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/langchain.py +2151 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/llama_index.py +1588 -0
- package/.next/standalone/sdk/python/failproofai_sdk/integrations/pydantic_ai.py +977 -0
- package/.next/standalone/sdk/python/failproofai_sdk/py.typed +0 -0
- package/.next/standalone/sdk/python/pyproject.toml +92 -0
- package/.next/standalone/sdk/python/skill/SKILL.md +399 -0
- package/.next/standalone/sdk/python/skill/agents/openai.yaml +8 -0
- package/.next/standalone/sdk/python/skill/references/events.md +234 -0
- package/.next/standalone/sdk/python/skill/references/frameworks.md +314 -0
- package/.next/standalone/sdk/python/skill/references/install.md +100 -0
- package/.next/standalone/sdk/python/skill/references/integration.md +352 -0
- package/.next/standalone/sdk/python/tests/__init__.py +0 -0
- package/.next/standalone/sdk/python/tests/conftest.py +169 -0
- package/.next/standalone/sdk/python/tests/integrations/__init__.py +6 -0
- package/.next/standalone/sdk/python/tests/integrations/test_crewai.py +1299 -0
- package/.next/standalone/sdk/python/tests/integrations/test_langchain.py +2338 -0
- package/.next/standalone/sdk/python/tests/integrations/test_llama_index.py +1576 -0
- package/.next/standalone/sdk/python/tests/integrations/test_pydantic_ai.py +1102 -0
- package/.next/standalone/sdk/python/tests/test_context.py +410 -0
- package/.next/standalone/sdk/python/tests/test_docs.py +411 -0
- package/.next/standalone/sdk/python/tests/test_durability.py +1352 -0
- package/.next/standalone/sdk/python/tests/test_encoding.py +571 -0
- package/.next/standalone/sdk/python/tests/test_integrations.py +1127 -0
- package/.next/standalone/sdk/python/tests/test_no_customer_identifiers.py +214 -0
- package/.next/standalone/sdk/python/tests/test_packaging.py +185 -0
- package/.next/standalone/sdk/python/tests/test_resolver_umbrella.py +178 -0
- package/.next/standalone/sdk/python/tests/test_scopes.py +487 -0
- package/.next/standalone/sdk/python/tests/test_sdk.py +923 -0
- package/.next/standalone/sdk/python/tests/test_server_contract.py +650 -0
- package/.next/standalone/sdk/python/tests/test_site_docs.py +371 -0
- package/.next/standalone/sdk/python/tests/test_skill_snippets.py +165 -0
- package/.next/standalone/sdk/python/tests/test_spool_contract.py +287 -0
- package/.next/standalone/sdk/python/tests/test_spool_creation.py +360 -0
- package/.next/standalone/sdk/python/tests/test_wire_format.py +279 -0
- package/.next/standalone/sdk/python/tests/test_zero_dependencies.py +378 -0
- package/.next/standalone/sdk/python/uv.lock +6005 -0
- package/.next/standalone/server.js +1 -1
- package/README.md +77 -21
- package/bin/failproofai.mjs +145 -11
- package/dist/cli.mjs +4482 -2205
- package/dist/index.js +5 -5
- package/dist/worker.mjs +2399 -1978
- package/package.json +29 -22
- package/policy-pack/SHA256SUMS +2 -0
- package/policy-pack/failproofai-pack.json +732 -0
- package/policy-pack/failproofai-pack.mjs +2017 -0
- package/scripts/build-policy-pack.mjs +121 -0
- package/scripts/changelog-section.py +77 -0
- package/scripts/prune-standalone.mjs +3 -0
- package/scripts/python-version.py +232 -0
- package/scripts/translate-docs/cli.ts +21 -0
- package/scripts/translate-docs/mintlify-nav.ts +85 -13
- package/scripts/translate-docs/translator.ts +66 -11
- package/src/audit/cache.ts +40 -3
- package/src/audit/cli.ts +1 -1
- package/src/audit/index.ts +1 -1
- package/src/audit/replay.ts +89 -3
- package/src/audit/report.ts +5 -5
- package/src/audit/schedule-cli.ts +49 -53
- package/src/hooks/builtin-policies.ts +217 -579
- package/src/hooks/cloud-enrollment-cli.ts +66 -27
- package/src/hooks/cloud-managed-policies.ts +6 -1
- package/src/hooks/configure-wizard.ts +1 -1
- package/src/hooks/custom-hooks-loader.ts +89 -6
- package/src/hooks/fp-home.ts +92 -4
- package/src/hooks/fp-reset.ts +26 -2
- package/src/hooks/handler.ts +181 -11
- package/src/hooks/harness-cli.ts +79 -25
- package/src/hooks/hook-activity-store.ts +13 -3
- package/src/hooks/install-prompt.ts +25 -3
- package/src/hooks/manager.ts +418 -172
- package/src/hooks/migrations.ts +2 -2
- package/src/hooks/pack-cli.ts +505 -0
- package/src/hooks/pack-failclosed.ts +189 -0
- package/src/hooks/pack-manifest.ts +344 -0
- package/src/hooks/pack-store.ts +930 -0
- package/src/hooks/policy-catalog.ts +535 -0
- package/src/hooks/policy-evaluator.ts +24 -16
- package/src/hooks/policy-presets.ts +4 -2
- package/src/hooks/policy-registry.ts +8 -2
- package/src/hooks/policy-types.ts +26 -0
- package/src/hooks/session-pause-cli.ts +33 -9
- package/src/hooks/tui.ts +570 -0
- package/src/hooks/types.ts +15 -1
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_usx0j._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0_zk340._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0agdw2a._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0d1u_na._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0oy4kxb._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__0zf034w._.js +0 -3
- package/.next/standalone/.next/server/chunks/[root-of-the-server]__1tvn4wf._.js +0 -3
- package/.next/standalone/.next/server/chunks/_0lxbzdq._.js +0 -3
- package/.next/standalone/.next/server/chunks/_1ger0a2._.js +0 -3
- package/.next/standalone/.next/server/chunks/_1zuiiy3._.js +0 -3
- package/.next/standalone/.next/server/chunks/node_modules_posthog-node_dist_entrypoints_index_node_mjs_1iiwm5e._.js +0 -3
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kc8_v5._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0kgy9da._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0mhqk5a._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0pltpn8._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0qkcyf-._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__0w0x_ok._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1_dfocn._.js +0 -4
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1bfex62._.js +0 -5
- package/.next/standalone/.next/server/chunks/ssr/[root-of-the-server]__1kzapg5._.js +0 -6
- package/.next/standalone/.next/static/chunks/36fw6yk1s6x_f.js +0 -1
- package/.next/standalone/.next/static/chunks/3tzq0260n17ae.js +0 -6
- package/.next/standalone/.next/static/chunks/3wq9x0c-7ld5d.css +0 -2
- /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_buildManifest.js +0 -0
- /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_clientMiddlewareManifest.js +0 -0
- /package/.next/standalone/.next/static/{ZklXxyA5ygsWSQz2u_zii → nwbyWT06Ud0XdXOrVJyvS}/_ssgManifest.js +0 -0
|
@@ -0,0 +1,328 @@
|
|
|
1
|
+
# CrewAI
|
|
2
|
+
|
|
3
|
+
- [Install](#install)
|
|
4
|
+
- [The integration](#the-integration)
|
|
5
|
+
- [How it attaches](#how-it-attaches)
|
|
6
|
+
- [What gets recorded](#what-gets-recorded)
|
|
7
|
+
- [A complete example](#a-complete-example)
|
|
8
|
+
- [Agent names come from roles](#agent-names-come-from-roles)
|
|
9
|
+
- [Options](#options)
|
|
10
|
+
- [Human in the loop](#human-in-the-loop)
|
|
11
|
+
- [Pitfalls](#pitfalls)
|
|
12
|
+
- [Runnable examples](#runnable-examples)
|
|
13
|
+
|
|
14
|
+
---
|
|
15
|
+
|
|
16
|
+
## Install
|
|
17
|
+
|
|
18
|
+
```bash
|
|
19
|
+
pip install 'failproofai-sdk[crewai]' # pins crewai >=1.13,<2
|
|
20
|
+
```
|
|
21
|
+
|
|
22
|
+
**Supported:** `crewai` 1.13 → 2.0. 1.13 is a capability floor, not a guess — it
|
|
23
|
+
is the release that added `started_event_id` and normalised token usage, both of
|
|
24
|
+
which the adapter relies on to pair events and report tokens.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## The integration
|
|
29
|
+
|
|
30
|
+
```python
|
|
31
|
+
import failproofai_sdk
|
|
32
|
+
|
|
33
|
+
failproofai_sdk.configure(environment="production")
|
|
34
|
+
failproofai_sdk.instrument()
|
|
35
|
+
|
|
36
|
+
with failproofai_sdk.session():
|
|
37
|
+
Crew(agents=[analyst, writer], tasks=[gather, summarise]).kickoff()
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
Nothing about your crew, agents, tasks or tools changes.
|
|
41
|
+
|
|
42
|
+
---
|
|
43
|
+
|
|
44
|
+
## How it attaches
|
|
45
|
+
|
|
46
|
+
`instrument()` constructs a listener on CrewAI's module-level
|
|
47
|
+
`crewai_event_bus` and subscribes one handler per event class.
|
|
48
|
+
|
|
49
|
+
Two details that matter if you are debugging:
|
|
50
|
+
|
|
51
|
+
**The bus dispatches by exact type, with no MRO walk.** There is no `BaseEvent`
|
|
52
|
+
catch-all to subscribe to, so the adapter carries an explicit table of every
|
|
53
|
+
class it maps. A CrewAI release that renames an event class disables exactly
|
|
54
|
+
that one hook (with a warning) rather than breaking the adapter.
|
|
55
|
+
|
|
56
|
+
**Every handler is `async def`, deliberately.** The bus dispatches *sync*
|
|
57
|
+
handlers onto a ten-worker pool where submission order is not execution order.
|
|
58
|
+
Measured on crewai 1.15.8, sync handlers produced a demonstrably wrong event
|
|
59
|
+
stream — pairs closing before they opened. Async handlers run in order.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## What gets recorded
|
|
64
|
+
|
|
65
|
+
| CrewAI | Failproof event | When |
|
|
66
|
+
|---|---|---|
|
|
67
|
+
| crew kickoff | `agent_start` / `agent_end` | the crew starts and finishes |
|
|
68
|
+
| flow start / finish | `agent_start` / `agent_end` | a flow you wrote |
|
|
69
|
+
| agent execution | nested `agent_start` / `agent_end` | `agent_id` = the **role** |
|
|
70
|
+
| task | *nothing* — recorded as a link | see below |
|
|
71
|
+
| flow method | `hook_triggered` / `hook_completed` | each `@start` / `@listen` method |
|
|
72
|
+
| guardrail | `hook_triggered` / `hook_completed` | each LLM guardrail |
|
|
73
|
+
| tool usage | `tool_use` / `tool_result` | each tool call |
|
|
74
|
+
| memory query / save / retrieve | `tool_use` / `tool_result` | named `memory.query`, `memory.save`, … |
|
|
75
|
+
| knowledge query / retrieve | `tool_use` / `tool_result` | named `knowledge.query`, … |
|
|
76
|
+
| LLM call | `model_request` / `model_response` | each model call, with usage |
|
|
77
|
+
| LLM stream chunk | *nothing* | folded into `fw_chunks`, `fw_ttft_ms` |
|
|
78
|
+
| human feedback requested | `human_wait` + `agent_pause` | the flow blocks on a person |
|
|
79
|
+
| human feedback received | `agent_resume` + `human_input` | the person answers |
|
|
80
|
+
| agent execution error | `error` + `agent_end(outcome="failed")` | the agent raises |
|
|
81
|
+
|
|
82
|
+
### Why a task emits nothing
|
|
83
|
+
|
|
84
|
+
A CrewAI task is a subset of the agent execution that runs it. Emitting both
|
|
85
|
+
would double every row in the timeline and render them as siblings, which is
|
|
86
|
+
simply wrong — the task *contains* the agent work, it does not run beside it.
|
|
87
|
+
|
|
88
|
+
The task is still recorded: it is registered as a link so its children resolve
|
|
89
|
+
to the crew above them, and its id and name ride along on the agent's own events
|
|
90
|
+
as `fw_task_id` and `fw_task_name`. You can filter by task; you just do not get
|
|
91
|
+
a duplicate span.
|
|
92
|
+
|
|
93
|
+
### Why memory and knowledge ops are tools
|
|
94
|
+
|
|
95
|
+
They are retrieval calls the agent makes. Naming them for the surface they hit
|
|
96
|
+
(`memory.query`, `knowledge.retrieve`) rather than the class that fired means
|
|
97
|
+
they show up on the tools page next to your real tools, where you actually want
|
|
98
|
+
to compare their latency.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## A complete example
|
|
103
|
+
|
|
104
|
+
```python
|
|
105
|
+
import failproofai_sdk
|
|
106
|
+
from crewai import Agent, Crew, Process, Task
|
|
107
|
+
from crewai.tools import tool
|
|
108
|
+
|
|
109
|
+
failproofai_sdk.configure(environment="production")
|
|
110
|
+
failproofai_sdk.instrument()
|
|
111
|
+
|
|
112
|
+
MODEL = "openai/gpt-4o-mini"
|
|
113
|
+
|
|
114
|
+
METRICS = {
|
|
115
|
+
"revenue": "$4.2M ARR, up 12% QoQ",
|
|
116
|
+
"churn": "3.1% monthly logo churn, up from 2.4%",
|
|
117
|
+
"nps": "41, flat",
|
|
118
|
+
}
|
|
119
|
+
|
|
120
|
+
|
|
121
|
+
@tool("lookup_metric")
|
|
122
|
+
def lookup_metric(name: str) -> str:
|
|
123
|
+
"""Look up a business metric by name. Valid: revenue, churn, nps."""
|
|
124
|
+
return METRICS.get(name.lower().strip(), "unknown metric")
|
|
125
|
+
|
|
126
|
+
|
|
127
|
+
analyst = Agent(
|
|
128
|
+
role="analyst", # <- this becomes agent_id
|
|
129
|
+
goal="pull the numbers that matter and state them plainly",
|
|
130
|
+
backstory="You read dashboards for a living and distrust round numbers.",
|
|
131
|
+
tools=[lookup_metric],
|
|
132
|
+
llm=MODEL,
|
|
133
|
+
)
|
|
134
|
+
writer = Agent(
|
|
135
|
+
role="writer",
|
|
136
|
+
goal="turn numbers into three lines an exec will actually read",
|
|
137
|
+
backstory="You write board updates. You never pad.",
|
|
138
|
+
llm=MODEL,
|
|
139
|
+
)
|
|
140
|
+
|
|
141
|
+
gather = Task(
|
|
142
|
+
description="Look up 'revenue', 'churn' and 'nps' with the tool.",
|
|
143
|
+
expected_output="Three lines, one metric each.",
|
|
144
|
+
agent=analyst,
|
|
145
|
+
)
|
|
146
|
+
summarise = Task(
|
|
147
|
+
description="Using the metrics above, write a three-line exec summary.",
|
|
148
|
+
expected_output="Exactly three lines.",
|
|
149
|
+
agent=writer,
|
|
150
|
+
context=[gather],
|
|
151
|
+
)
|
|
152
|
+
|
|
153
|
+
with failproofai_sdk.session():
|
|
154
|
+
result = Crew(
|
|
155
|
+
agents=[analyst, writer],
|
|
156
|
+
tasks=[gather, summarise],
|
|
157
|
+
process=Process.sequential,
|
|
158
|
+
).kickoff()
|
|
159
|
+
|
|
160
|
+
print(result)
|
|
161
|
+
```
|
|
162
|
+
|
|
163
|
+
This produces **17–18 events across 6 types**, with the handoff visible:
|
|
164
|
+
|
|
165
|
+
```
|
|
166
|
+
1 +0.000s agent_start crew
|
|
167
|
+
2 +0.049s agent_start analyst · under crew
|
|
168
|
+
3 +0.055s model_request gpt-5.6-terra
|
|
169
|
+
4 +3.112s model_response gpt-5.6-terra · 65 out-tok
|
|
170
|
+
5 +3.114s tool_use lookup_metric
|
|
171
|
+
...
|
|
172
|
+
13 +5.129s agent_end analyst · success
|
|
173
|
+
14 +5.149s agent_start writer · under crew
|
|
174
|
+
15 +5.156s model_request gpt-5.6-terra
|
|
175
|
+
16 +8.177s model_response gpt-5.6-terra · 48 out-tok
|
|
176
|
+
17 +8.205s agent_end writer · success
|
|
177
|
+
18 +8.224s agent_end crew · success
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
Two roles, two spans, one session — you can now break latency and token spend
|
|
181
|
+
down per role.
|
|
182
|
+
|
|
183
|
+
---
|
|
184
|
+
|
|
185
|
+
## Agent names come from roles
|
|
186
|
+
|
|
187
|
+
`agent_id` is taken from `Agent(role=...)`. That is what makes it a useful
|
|
188
|
+
dashboard facet instead of a UUID nobody can read.
|
|
189
|
+
|
|
190
|
+
```python
|
|
191
|
+
Agent(role="analyst", ...) # agent_id = "analyst" good
|
|
192
|
+
Agent(role="analyst-7f3a2b", ...) # one facet entry per run bad
|
|
193
|
+
```
|
|
194
|
+
|
|
195
|
+
`agent_id` is a `LowCardinality(String)` column. A role containing a run id or a
|
|
196
|
+
timestamp degrades that column for every query anyone runs. Keep roles short,
|
|
197
|
+
human, and stable across runs.
|
|
198
|
+
|
|
199
|
+
If a role looks like an id (a UUID, a long hex string), the adapter refuses it
|
|
200
|
+
and falls back to a safe default, putting the real value in `fw_agent_id`.
|
|
201
|
+
|
|
202
|
+
---
|
|
203
|
+
|
|
204
|
+
## Options
|
|
205
|
+
|
|
206
|
+
```python
|
|
207
|
+
failproofai_sdk.instrument(
|
|
208
|
+
"crewai",
|
|
209
|
+
session_id=None, # pin every run to one session id
|
|
210
|
+
)
|
|
211
|
+
```
|
|
212
|
+
|
|
213
|
+
`session_id` is the only option this adapter reads — there is no
|
|
214
|
+
`capture_content` here. Prompts and completions are always recorded, truncated
|
|
215
|
+
to the payload budget.
|
|
216
|
+
|
|
217
|
+
Session identity resolves as: the `session_id` option, then the enclosing
|
|
218
|
+
`failproofai_sdk.session()` scope, then a generated `uuid4().hex` per crew or
|
|
219
|
+
flow.
|
|
220
|
+
|
|
221
|
+
---
|
|
222
|
+
|
|
223
|
+
## Human in the loop
|
|
224
|
+
|
|
225
|
+
CrewAI's flow runtime emits `HumanFeedbackRequestedEvent` before it blocks on a
|
|
226
|
+
person and `HumanFeedbackReceivedEvent` after the answer. Both are recorded, as
|
|
227
|
+
four events:
|
|
228
|
+
|
|
229
|
+
```
|
|
230
|
+
human_wait prompt, options
|
|
231
|
+
agent_pause starts the paused-time clock
|
|
232
|
+
... a person is reading ...
|
|
233
|
+
agent_resume stops it — this is what feeds paused time
|
|
234
|
+
human_input the answer, with the wait measured
|
|
235
|
+
```
|
|
236
|
+
|
|
237
|
+
Neither pair is redundant. `human_wait` → `human_input` carries the prompt and
|
|
238
|
+
the answer; `agent_pause` → `agent_resume` is the only thing that feeds paused
|
|
239
|
+
time. Without the second pair, a ten-minute human wait is billed as ten minutes
|
|
240
|
+
of active agent time.
|
|
241
|
+
|
|
242
|
+
> **CrewAI sets no correlation id on either event.** `request_id` is `None` on
|
|
243
|
+
> both and `started_event_id` is `None` on the received one, so there is nothing
|
|
244
|
+
> to join on directly. The adapter pairs on `request_id` when present (the
|
|
245
|
+
> enterprise async provider does set it), then on `(flow_name, method_name)`,
|
|
246
|
+
> then on the most recently opened pause. The last fallback is sound because a
|
|
247
|
+
> console prompt blocks — two cannot interleave. **If you build your own
|
|
248
|
+
> concurrent feedback provider, set `request_id` on both events.**
|
|
249
|
+
|
|
250
|
+
Feedback arriving for a request that was never seen — a flow resumed in another
|
|
251
|
+
process, say — records the answer but deliberately withholds `agent_resume`,
|
|
252
|
+
because closing a pause that never opened would subtract an interval that was
|
|
253
|
+
never added.
|
|
254
|
+
|
|
255
|
+
---
|
|
256
|
+
|
|
257
|
+
## Pitfalls
|
|
258
|
+
|
|
259
|
+
### Roles with ids in them wreck the facet
|
|
260
|
+
|
|
261
|
+
**Symptom:** the agent filter on the dashboard has thousands of entries.
|
|
262
|
+
|
|
263
|
+
**Cause:** `role` contains a UUID, a timestamp or a per-run suffix.
|
|
264
|
+
|
|
265
|
+
**Fix:** use a stable human role. Put the run-specific id in the task
|
|
266
|
+
description or a payload field.
|
|
267
|
+
|
|
268
|
+
---
|
|
269
|
+
|
|
270
|
+
### Asserting on events straight after `kickoff()` finds nothing
|
|
271
|
+
|
|
272
|
+
**Symptom:** your test reads zero events, but the dashboard shows them.
|
|
273
|
+
|
|
274
|
+
**Cause:** the bus is asynchronous. `kickoff()` returns before the last handlers
|
|
275
|
+
have run.
|
|
276
|
+
|
|
277
|
+
**Fix:**
|
|
278
|
+
|
|
279
|
+
```python
|
|
280
|
+
from crewai.events.event_bus import crewai_event_bus
|
|
281
|
+
|
|
282
|
+
crew.kickoff()
|
|
283
|
+
crewai_event_bus.flush(timeout=30) # now read
|
|
284
|
+
```
|
|
285
|
+
|
|
286
|
+
This is a property of CrewAI, not of the SDK.
|
|
287
|
+
|
|
288
|
+
---
|
|
289
|
+
|
|
290
|
+
### A crew that dies mid-tool leaves an open span
|
|
291
|
+
|
|
292
|
+
**Symptom:** a session shows as `ongoing` forever.
|
|
293
|
+
|
|
294
|
+
**Cause:** `agent_end` force-closes open *pauses* but not tools or models, so a
|
|
295
|
+
run that dies inside a tool call leaves that `tool_use` unclosed.
|
|
296
|
+
|
|
297
|
+
**Fix:** none needed in normal operation — `uninstrument()` and process teardown
|
|
298
|
+
close whatever is still open, marking it `fw_incomplete` with
|
|
299
|
+
`outcome="cancelled"`. If you are killing processes with `SIGKILL`, nothing can
|
|
300
|
+
run, and the span stays open.
|
|
301
|
+
|
|
302
|
+
---
|
|
303
|
+
|
|
304
|
+
### Nothing is recorded at all
|
|
305
|
+
|
|
306
|
+
1. Did `instrument()` run before `kickoff()`?
|
|
307
|
+
2. Is there a `with failproofai_sdk.session():` around it?
|
|
308
|
+
3. Set `FAILPROOFAI_SDK_STRICT=1` and run again — a degraded hook will raise
|
|
309
|
+
instead of being swallowed.
|
|
310
|
+
4. Check your `crewai` version is ≥ 1.13. Below that, `started_event_id` does
|
|
311
|
+
not exist and pairing falls back to a heuristic.
|
|
312
|
+
|
|
313
|
+
---
|
|
314
|
+
|
|
315
|
+
## Runnable examples
|
|
316
|
+
|
|
317
|
+
| file | what it shows | events |
|
|
318
|
+
|---|---|---|
|
|
319
|
+
| [`examples/quickstart.py`](examples/quickstart.py) | one agent, one task, one tool | 10 |
|
|
320
|
+
| [`examples/research_crew.py`](examples/research_crew.py) | 2 agents, 2 tasks, sequential handoff | 17 |
|
|
321
|
+
|
|
322
|
+
```bash
|
|
323
|
+
export OPENAI_API_KEY=sk-...
|
|
324
|
+
export FPAI_MODEL=gpt-4o-mini
|
|
325
|
+
python docs/crewai/examples/quickstart.py
|
|
326
|
+
```
|
|
327
|
+
|
|
328
|
+
Both were run against a live model before shipping.
|
|
@@ -0,0 +1,61 @@
|
|
|
1
|
+
"""crewai — the smallest thing that produces a trace.
|
|
2
|
+
|
|
3
|
+
pip install 'failproofai-sdk[crewai]'
|
|
4
|
+
python docs/crewai/examples/quickstart.py
|
|
5
|
+
|
|
6
|
+
`instrument()` registers a listener on crewai's event bus, so the crew, each
|
|
7
|
+
agent and each tool call are recorded. The task gets no span of its own — it is
|
|
8
|
+
the agent execution that runs it, and rides along on that agent's events as
|
|
9
|
+
`fw_task_id`/`fw_task_name`. `agent_id` comes from the agent's `role`, which is
|
|
10
|
+
what makes it a useful dashboard facet rather than a uuid nobody can read.
|
|
11
|
+
"""
|
|
12
|
+
import sys
|
|
13
|
+
from pathlib import Path
|
|
14
|
+
|
|
15
|
+
# Only so this file can import the shared trace printer from docs/_shared/.
|
|
16
|
+
# Delete these two lines and the `_shared` import below and the example still
|
|
17
|
+
# instruments correctly — it just stops printing its own trace at the end.
|
|
18
|
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
|
19
|
+
|
|
20
|
+
import failproofai_sdk
|
|
21
|
+
from _shared import banner, model, trace
|
|
22
|
+
from crewai import Agent, Crew, Task
|
|
23
|
+
from crewai.tools import tool
|
|
24
|
+
|
|
25
|
+
failproofai_sdk.configure(environment="examples")
|
|
26
|
+
failproofai_sdk.instrument()
|
|
27
|
+
|
|
28
|
+
MODEL = f"openai/{model()}"
|
|
29
|
+
|
|
30
|
+
|
|
31
|
+
@tool("lookup_metric")
|
|
32
|
+
def lookup_metric(name: str) -> str:
|
|
33
|
+
"""Look up a business metric by name."""
|
|
34
|
+
return {"revenue": "$4.2M", "churn": "3.1%"}.get(name, "unknown")
|
|
35
|
+
|
|
36
|
+
|
|
37
|
+
def main() -> None:
|
|
38
|
+
banner("crewai quickstart", "one agent, one task, one tool")
|
|
39
|
+
|
|
40
|
+
analyst = Agent(
|
|
41
|
+
role="analyst",
|
|
42
|
+
goal="find the revenue number",
|
|
43
|
+
backstory="You read metrics.",
|
|
44
|
+
tools=[lookup_metric],
|
|
45
|
+
llm=MODEL,
|
|
46
|
+
)
|
|
47
|
+
task = Task(
|
|
48
|
+
description="Look up 'revenue' with the tool.",
|
|
49
|
+
expected_output="The revenue figure.",
|
|
50
|
+
agent=analyst,
|
|
51
|
+
)
|
|
52
|
+
|
|
53
|
+
with failproofai_sdk.session() as sid:
|
|
54
|
+
result = Crew(agents=[analyst], tasks=[task]).kickoff()
|
|
55
|
+
|
|
56
|
+
print(" answer:", str(result).strip()[:120])
|
|
57
|
+
trace(sid, title="crewai quickstart")
|
|
58
|
+
|
|
59
|
+
|
|
60
|
+
if __name__ == "__main__":
|
|
61
|
+
main()
|
|
@@ -0,0 +1,92 @@
|
|
|
1
|
+
"""crewai — two agents, two tasks, a shared tool, sequential handoff.
|
|
2
|
+
|
|
3
|
+
pip install 'failproofai-sdk[crewai]'
|
|
4
|
+
python docs/crewai/examples/research_crew.py
|
|
5
|
+
|
|
6
|
+
What this demonstrates that the quickstart does not:
|
|
7
|
+
|
|
8
|
+
* two `agent_id` values in one session, taken from each agent's `role`, so the
|
|
9
|
+
dashboard can break latency and token spend down per role;
|
|
10
|
+
* two tasks that add no spans of their own — a crewai task *is* the agent
|
|
11
|
+
execution that runs it, so recording both would double every row and render
|
|
12
|
+
them as siblings. Each task rides along on its agent's events instead, as
|
|
13
|
+
`fw_task_id`/`fw_task_name`, which you can still filter by;
|
|
14
|
+
* a second task consuming the first one's output, so the handoff is visible in
|
|
15
|
+
the trace rather than implied.
|
|
16
|
+
"""
|
|
17
|
+
import sys
|
|
18
|
+
from pathlib import Path
|
|
19
|
+
|
|
20
|
+
# Only so this file can import the shared trace printer from docs/_shared/.
|
|
21
|
+
# Delete these two lines and the `_shared` import below and the example still
|
|
22
|
+
# instruments correctly — it just stops printing its own trace at the end.
|
|
23
|
+
sys.path.insert(0, str(Path(__file__).resolve().parents[2]))
|
|
24
|
+
|
|
25
|
+
import failproofai_sdk
|
|
26
|
+
from _shared import banner, model, trace
|
|
27
|
+
from crewai import Agent, Crew, Process, Task
|
|
28
|
+
from crewai.tools import tool
|
|
29
|
+
|
|
30
|
+
failproofai_sdk.configure(environment="examples")
|
|
31
|
+
failproofai_sdk.instrument()
|
|
32
|
+
|
|
33
|
+
MODEL = f"openai/{model()}"
|
|
34
|
+
|
|
35
|
+
_METRICS = {
|
|
36
|
+
"revenue": "$4.2M ARR, up 12% QoQ",
|
|
37
|
+
"churn": "3.1% monthly logo churn, up from 2.4%",
|
|
38
|
+
"nps": "41, flat",
|
|
39
|
+
}
|
|
40
|
+
|
|
41
|
+
|
|
42
|
+
@tool("lookup_metric")
|
|
43
|
+
def lookup_metric(name: str) -> str:
|
|
44
|
+
"""Look up a business metric by name. Valid names: revenue, churn, nps."""
|
|
45
|
+
return _METRICS.get(name.lower().strip(), "unknown metric")
|
|
46
|
+
|
|
47
|
+
|
|
48
|
+
def main() -> None:
|
|
49
|
+
banner("crewai research crew", "2 agents · 2 tasks · sequential handoff")
|
|
50
|
+
|
|
51
|
+
analyst = Agent(
|
|
52
|
+
role="analyst",
|
|
53
|
+
goal="pull the numbers that matter and state them plainly",
|
|
54
|
+
backstory="You read dashboards for a living and distrust round numbers.",
|
|
55
|
+
tools=[lookup_metric],
|
|
56
|
+
llm=MODEL,
|
|
57
|
+
)
|
|
58
|
+
writer = Agent(
|
|
59
|
+
role="writer",
|
|
60
|
+
goal="turn numbers into three lines an exec will actually read",
|
|
61
|
+
backstory="You write board updates. You never pad.",
|
|
62
|
+
llm=MODEL,
|
|
63
|
+
)
|
|
64
|
+
|
|
65
|
+
gather = Task(
|
|
66
|
+
description=(
|
|
67
|
+
"Look up 'revenue', 'churn' and 'nps' with the tool. "
|
|
68
|
+
"Report each verbatim, one per line."
|
|
69
|
+
),
|
|
70
|
+
expected_output="Three lines, one metric each.",
|
|
71
|
+
agent=analyst,
|
|
72
|
+
)
|
|
73
|
+
summarize = Task(
|
|
74
|
+
description="Using the metrics above, write a three-line exec summary.",
|
|
75
|
+
expected_output="Exactly three lines.",
|
|
76
|
+
agent=writer,
|
|
77
|
+
context=[gather],
|
|
78
|
+
)
|
|
79
|
+
|
|
80
|
+
with failproofai_sdk.session() as sid:
|
|
81
|
+
result = Crew(
|
|
82
|
+
agents=[analyst, writer],
|
|
83
|
+
tasks=[gather, summarize],
|
|
84
|
+
process=Process.sequential,
|
|
85
|
+
).kickoff()
|
|
86
|
+
|
|
87
|
+
print(" summary:", str(result).strip()[:220], "\n")
|
|
88
|
+
trace(sid, title="crewai research crew")
|
|
89
|
+
|
|
90
|
+
|
|
91
|
+
if __name__ == "__main__":
|
|
92
|
+
main()
|