connectonion 0.6.2__py3-none-any.whl → 0.6.3__py3-none-any.whl
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.
- connectonion/__init__.py +46 -9
- connectonion/cli/__init__.py +11 -1
- connectonion/cli/browser_agent/__init__.py +11 -1
- connectonion/cli/browser_agent/browser.py +13 -3
- connectonion/cli/browser_agent/element_finder.py +8 -0
- connectonion/cli/browser_agent/highlight_screenshot.py +9 -1
- connectonion/cli/browser_agent/scroll.py +8 -0
- connectonion/cli/co_ai/__init__.py +6 -0
- connectonion/cli/co_ai/agent.py +87 -0
- connectonion/cli/co_ai/agents/__init__.py +5 -0
- connectonion/cli/co_ai/agents/registry.py +57 -0
- connectonion/cli/co_ai/commands/__init__.py +45 -0
- connectonion/cli/co_ai/commands/compact.py +173 -0
- connectonion/cli/co_ai/commands/cost.py +77 -0
- connectonion/cli/co_ai/commands/export.py +60 -0
- connectonion/cli/co_ai/commands/help.py +80 -0
- connectonion/cli/co_ai/commands/init.py +101 -0
- connectonion/cli/co_ai/commands/sessions.py +55 -0
- connectonion/cli/co_ai/commands/tasks.py +63 -0
- connectonion/cli/co_ai/commands/undo.py +103 -0
- connectonion/cli/co_ai/context.py +127 -0
- connectonion/cli/co_ai/main.py +52 -0
- connectonion/cli/co_ai/plugins/__init__.py +6 -0
- connectonion/cli/co_ai/plugins/reminder.py +76 -0
- connectonion/cli/co_ai/plugins/shell_approval.py +105 -0
- connectonion/cli/co_ai/prompts/agents/explore.md +79 -0
- connectonion/cli/co_ai/prompts/agents/plan.md +60 -0
- connectonion/cli/co_ai/prompts/assembler.py +303 -0
- connectonion/cli/{docs/co-vibecoding-principles-docs-contexts-all-in-one.md → co_ai/prompts/connectonion/README.md} +26 -0
- connectonion/cli/co_ai/prompts/connectonion/api.md +457 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/README.md +805 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/auth.md +46 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/browser.md +235 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/copy.md +184 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/create.md +335 -0
- connectonion/cli/co_ai/prompts/connectonion/cli/init.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/co-directory-structure.md +214 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/agent.md +1078 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/events.md +816 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/llm_do.md +256 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/max_iterations.md +362 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/models.md +641 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/plugins.md +100 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/prompts.md +122 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/tools.md +512 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/transcribe.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/concepts/trust.md +291 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/README.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/auto_debug.md +1026 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/console.md +129 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval-format.md +178 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/eval.md +230 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/exceptions.md +307 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/log.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/debug/xray.md +215 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/006-agent-address-format.md +305 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/009-why-connect-function.md +167 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/014-hook-system-design.md +510 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/018-event-api-naming.md +274 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/cli/co_ai/prompts/connectonion/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/agent_reasoning.md +62 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/atomic_tools.md +24 -0
- connectonion/cli/co_ai/prompts/connectonion/examples/load_guide.md +18 -0
- connectonion/cli/co_ai/prompts/connectonion/examples.md +0 -0
- connectonion/cli/co_ai/prompts/connectonion/hook-system-options.md +364 -0
- connectonion/cli/co_ai/prompts/connectonion/index.md +162 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/README.md +12 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/auth.md +450 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/google.md +431 -0
- connectonion/cli/co_ai/prompts/connectonion/integrations/microsoft.md +370 -0
- connectonion/cli/co_ai/prompts/connectonion/network/README.md +14 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connect.md +543 -0
- connectonion/cli/co_ai/prompts/connectonion/network/connection.md +538 -0
- connectonion/cli/co_ai/prompts/connectonion/network/deploy.md +123 -0
- connectonion/cli/co_ai/prompts/connectonion/network/host.md +1049 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/cli/co_ai/prompts/connectonion/network/protocol/announce-message.md +115 -0
- connectonion/cli/co_ai/prompts/connectonion/principles.md +124 -0
- connectonion/cli/co_ai/prompts/connectonion/quickstart.md +261 -0
- connectonion/cli/co_ai/prompts/connectonion/roadmap.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/README.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/meta-agent.md +152 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/minimal.md +105 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/playwright.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/templates/web-research.md +144 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/README.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/chat.md +181 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/divider.md +63 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/dropdown.md +83 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/footer.md +44 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/fuzzy.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/input.md +84 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/keys.md +77 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/pick.md +71 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/providers.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/tui/status_bar.md +67 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/README.md +156 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/calendar_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/eval.md +89 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/gmail_plugin.md +68 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/image_result_formatter.md +74 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/re_act.md +86 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_plugins/shell_approval.md +69 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/README.md +81 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/diff_writer.md +138 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/get_emails.md +499 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/gmail.md +135 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/google_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/memory.md +486 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/microsoft_calendar.md +106 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/outlook.md +120 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/send_email.md +403 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/shell.md +95 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/slash_command.md +96 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/terminal.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/todo_list.md +252 -0
- connectonion/cli/co_ai/prompts/connectonion/useful_tools/web_fetch.md +130 -0
- connectonion/cli/co_ai/prompts/connectonion/vibe-coding-guide.md +97 -0
- connectonion/cli/co_ai/prompts/connectonion/windows-support.md +258 -0
- connectonion/cli/co_ai/prompts/main.md +247 -0
- connectonion/cli/co_ai/prompts/reminders/plan_mode.md +34 -0
- connectonion/cli/co_ai/prompts/summarization.md +55 -0
- connectonion/cli/co_ai/prompts/tools/ask_user.md +61 -0
- connectonion/cli/co_ai/prompts/tools/background.md +57 -0
- connectonion/cli/co_ai/prompts/tools/edit.md +90 -0
- connectonion/cli/co_ai/prompts/tools/glob.md +52 -0
- connectonion/cli/co_ai/prompts/tools/grep.md +55 -0
- connectonion/cli/co_ai/prompts/tools/plan_mode.md +80 -0
- connectonion/cli/co_ai/prompts/tools/read.md +40 -0
- connectonion/cli/co_ai/prompts/tools/shell.md +67 -0
- connectonion/cli/co_ai/prompts/tools/task.md +51 -0
- connectonion/cli/co_ai/prompts/tools/todo.md +139 -0
- connectonion/cli/co_ai/prompts/tools/write.md +47 -0
- connectonion/cli/co_ai/prompts/workflow.md +89 -0
- connectonion/cli/co_ai/reminders.py +159 -0
- connectonion/cli/co_ai/sessions.py +110 -0
- connectonion/cli/co_ai/skills/__init__.py +37 -0
- connectonion/cli/co_ai/skills/builtin/commit/SKILL.md +63 -0
- connectonion/cli/co_ai/skills/builtin/review-pr/SKILL.md +76 -0
- connectonion/cli/co_ai/skills/loader.py +166 -0
- connectonion/cli/co_ai/skills/tool.py +46 -0
- connectonion/cli/co_ai/tools/__init__.py +92 -0
- connectonion/cli/co_ai/tools/ask_user.py +35 -0
- connectonion/cli/co_ai/tools/background.py +201 -0
- connectonion/cli/co_ai/tools/diff_writer.py +291 -0
- connectonion/cli/co_ai/tools/edit.py +89 -0
- connectonion/cli/co_ai/tools/glob.py +84 -0
- connectonion/cli/co_ai/tools/grep.py +158 -0
- connectonion/cli/co_ai/tools/load_guide.py +23 -0
- connectonion/cli/co_ai/tools/multi_edit.py +116 -0
- connectonion/cli/co_ai/tools/plan_mode.py +172 -0
- connectonion/cli/co_ai/tools/read.py +67 -0
- connectonion/cli/co_ai/tools/task.py +59 -0
- connectonion/cli/co_ai/tools/todo_list.py +159 -0
- connectonion/cli/co_ai/tools/write.py +126 -0
- connectonion/cli/commands/__init__.py +11 -1
- connectonion/cli/commands/ai_commands.py +34 -0
- connectonion/cli/commands/copy_commands.py +55 -6
- connectonion/cli/commands/create.py +20 -17
- connectonion/cli/commands/init.py +19 -22
- connectonion/cli/commands/project_cmd_lib.py +15 -0
- connectonion/cli/main.py +11 -0
- connectonion/console.py +15 -1
- connectonion/core/__init__.py +10 -1
- connectonion/core/agent.py +37 -16
- connectonion/core/exceptions.py +74 -0
- connectonion/core/llm.py +54 -6
- connectonion/core/tool_executor.py +32 -31
- connectonion/core/tool_factory.py +47 -10
- connectonion/debug/__init__.py +10 -1
- connectonion/debug/debug_explainer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/__init__.py +10 -1
- connectonion/debug/execution_analyzer/execution_analysis.py +5 -2
- connectonion/debug/runtime_inspector/__init__.py +10 -1
- connectonion/docs/.package-ignore +6 -0
- connectonion/docs/README.md +2036 -0
- connectonion/docs/api.md +457 -0
- connectonion/docs/archive/001-ai-agent-is-just-prompt-plus-function.md +249 -0
- connectonion/docs/archive/README.md +53 -0
- connectonion/docs/archive/archive/consolidation-plan.md +72 -0
- connectonion/docs/archive/archive/core-principles-extracted.md +239 -0
- connectonion/docs/archive/archive/master-principles.md +222 -0
- connectonion/docs/archive/archive/principles.md +293 -0
- connectonion/docs/archive/archive/simplicity-principles.md +221 -0
- connectonion/docs/archive/attack-defense-insights.md +410 -0
- connectonion/docs/archive/business-model.md +305 -0
- connectonion/docs/archive/core-principles-unified.md +190 -0
- connectonion/docs/archive/discussion-journey.md +178 -0
- connectonion/docs/archive/economic-analysis.md +323 -0
- connectonion/docs/archive/features/01-share-and-find.md +256 -0
- connectonion/docs/archive/features/02-agent-authentication.md +93 -0
- connectonion/docs/archive/features/03-test-before-trust.md +71 -0
- connectonion/docs/archive/features/06-reliability-and-offline.md +197 -0
- connectonion/docs/archive/features/README.md +46 -0
- connectonion/docs/archive/features-roadmap.md +247 -0
- connectonion/docs/archive/mcp-comparison-insights.md +215 -0
- connectonion/docs/archive/migration-strategy.md +571 -0
- connectonion/docs/archive/mini-whitepaper.md +293 -0
- connectonion/docs/archive/network-protocol.md +394 -0
- connectonion/docs/archive/semantic-revolution.md +367 -0
- connectonion/docs/archive/technical-architecture.md +453 -0
- connectonion/docs/archive/the-semantic-insight.md +207 -0
- connectonion/docs/archive/threat-model.md +164 -0
- connectonion/docs/cli/README.md +805 -0
- connectonion/docs/cli/auth.md +46 -0
- connectonion/docs/cli/browser.md +235 -0
- connectonion/docs/cli/copy.md +232 -0
- connectonion/docs/cli/create.md +335 -0
- connectonion/docs/cli/init.md +431 -0
- connectonion/docs/co-directory-structure.md +214 -0
- connectonion/docs/concepts/agent.md +1078 -0
- connectonion/docs/concepts/events.md +699 -0
- connectonion/docs/concepts/llm_do.md +256 -0
- connectonion/docs/concepts/max_iterations.md +362 -0
- connectonion/docs/concepts/models.md +641 -0
- connectonion/docs/concepts/plugins.md +100 -0
- connectonion/docs/concepts/prompts.md +122 -0
- connectonion/docs/concepts/session.md +428 -0
- connectonion/docs/concepts/tools.md +512 -0
- connectonion/docs/concepts/transcribe.md +156 -0
- connectonion/docs/concepts/trust.md +291 -0
- connectonion/docs/connectonion.md +1256 -0
- connectonion/docs/debug/README.md +18 -0
- connectonion/docs/debug/auto_debug.md +1026 -0
- connectonion/docs/debug/console.md +129 -0
- connectonion/docs/debug/eval-format.md +178 -0
- connectonion/docs/debug/eval.md +230 -0
- connectonion/docs/debug/exceptions.md +307 -0
- connectonion/docs/debug/log.md +117 -0
- connectonion/docs/debug/xray.md +215 -0
- connectonion/docs/design-decisions/001-choosing-input-method.md +202 -0
- connectonion/docs/design-decisions/002-choosing-llm-function-name.md +202 -0
- connectonion/docs/design-decisions/003-choosing-trust-keyword.md +141 -0
- connectonion/docs/design-decisions/004-cli-create-flow.md +117 -0
- connectonion/docs/design-decisions/005-designing-agent-network-protocol.md +503 -0
- connectonion/docs/design-decisions/006-agent-address-format.md +305 -0
- connectonion/docs/design-decisions/007-authentication-backend-design.md +240 -0
- connectonion/docs/design-decisions/008-naming-is-hard.md +228 -0
- connectonion/docs/design-decisions/009-why-connect-function.md +167 -0
- connectonion/docs/design-decisions/010-cli-ux-progressive-disclosure.md +176 -0
- connectonion/docs/design-decisions/011-global-config-identity-management.md +357 -0
- connectonion/docs/design-decisions/012-tool-execution-separation.md +259 -0
- connectonion/docs/design-decisions/013-debug-and-logging-design.md +253 -0
- connectonion/docs/design-decisions/014-hook-system-design.md +510 -0
- connectonion/docs/design-decisions/015-interactive-auto-debug-design.md +837 -0
- connectonion/docs/design-decisions/016-why-no-zero-knowledge-proofs.md +358 -0
- connectonion/docs/design-decisions/017-session-logging-and-eval-format.md +120 -0
- connectonion/docs/design-decisions/018-event-api-naming.md +274 -0
- connectonion/docs/design-decisions/019-agent-lifecycle-design.md +655 -0
- connectonion/docs/design-decisions/020-trust-system-and-network-architecture.md +503 -0
- connectonion/docs/design-decisions/021-task-storage-jsonl-design.md +496 -0
- connectonion/docs/design-decisions/022-raw-asgi-implementation.md +273 -0
- connectonion/docs/examples.md +0 -0
- connectonion/docs/hook-system-options.md +364 -0
- connectonion/docs/integrations/README.md +12 -0
- connectonion/docs/integrations/auth.md +450 -0
- connectonion/docs/integrations/google.md +431 -0
- connectonion/docs/integrations/microsoft.md +370 -0
- connectonion/docs/network/README.md +14 -0
- connectonion/docs/network/connect.md +629 -0
- connectonion/docs/network/deploy.md +124 -0
- connectonion/docs/network/host.md +1087 -0
- connectonion/docs/network/io.md +538 -0
- connectonion/docs/network/protocol/agent-relay-protocol.md +495 -0
- connectonion/docs/network/protocol/announce-message.md +115 -0
- connectonion/docs/principles.md +124 -0
- connectonion/docs/quickstart.md +261 -0
- connectonion/docs/roadmap.md +81 -0
- connectonion/docs/templates/README.md +77 -0
- connectonion/docs/templates/meta-agent.md +152 -0
- connectonion/docs/templates/minimal.md +105 -0
- connectonion/docs/templates/playwright.md +130 -0
- connectonion/docs/templates/web-research.md +144 -0
- connectonion/docs/tui/README.md +95 -0
- connectonion/docs/tui/chat.md +181 -0
- connectonion/docs/tui/divider.md +63 -0
- connectonion/docs/tui/dropdown.md +83 -0
- connectonion/docs/tui/footer.md +44 -0
- connectonion/docs/tui/fuzzy.md +68 -0
- connectonion/docs/tui/input.md +84 -0
- connectonion/docs/tui/keys.md +77 -0
- connectonion/docs/tui/pick.md +71 -0
- connectonion/docs/tui/providers.md +89 -0
- connectonion/docs/tui/status_bar.md +67 -0
- connectonion/docs/useful_plugins/README.md +160 -0
- connectonion/docs/useful_plugins/calendar_plugin.md +68 -0
- connectonion/docs/useful_plugins/eval.md +89 -0
- connectonion/docs/useful_plugins/gmail_plugin.md +68 -0
- connectonion/docs/useful_plugins/image_result_formatter.md +74 -0
- connectonion/docs/useful_plugins/re_act.md +86 -0
- connectonion/docs/useful_plugins/shell_approval.md +69 -0
- connectonion/docs/useful_plugins/system_reminder.md +210 -0
- connectonion/docs/useful_prompts/README.md +127 -0
- connectonion/docs/useful_prompts/coding_agent.md +214 -0
- connectonion/docs/useful_tools/README.md +81 -0
- connectonion/docs/useful_tools/ask_user.md +103 -0
- connectonion/docs/useful_tools/diff_writer.md +158 -0
- connectonion/docs/useful_tools/get_emails.md +519 -0
- connectonion/docs/useful_tools/gmail.md +155 -0
- connectonion/docs/useful_tools/google_calendar.md +126 -0
- connectonion/docs/useful_tools/memory.md +506 -0
- connectonion/docs/useful_tools/microsoft_calendar.md +126 -0
- connectonion/docs/useful_tools/outlook.md +140 -0
- connectonion/docs/useful_tools/send_email.md +423 -0
- connectonion/docs/useful_tools/shell.md +115 -0
- connectonion/docs/useful_tools/slash_command.md +116 -0
- connectonion/docs/useful_tools/terminal.md +115 -0
- connectonion/docs/useful_tools/todo_list.md +272 -0
- connectonion/docs/useful_tools/web_fetch.md +150 -0
- connectonion/docs/vibe-coding-guide.md +97 -0
- connectonion/docs/windows-support.md +258 -0
- connectonion/logger.py +3 -3
- connectonion/network/__init__.py +19 -6
- connectonion/network/asgi/__init__.py +81 -0
- connectonion/network/asgi/http.py +205 -0
- connectonion/network/asgi/websocket.py +217 -0
- connectonion/network/connect.py +232 -185
- connectonion/network/host/__init__.py +59 -0
- connectonion/network/host/auth.py +191 -0
- connectonion/network/host/routes.py +135 -0
- connectonion/network/host/server.py +289 -0
- connectonion/network/host/session.py +78 -0
- connectonion/network/io/__init__.py +21 -0
- connectonion/network/{connection.py → io/base.py} +17 -42
- connectonion/network/io/websocket.py +55 -0
- connectonion/network/relay.py +37 -16
- connectonion/network/trust/__init__.py +30 -0
- connectonion/network/trust/factory.py +138 -0
- connectonion/network/{trust_agents.py → trust/prompts.py} +3 -3
- connectonion/network/{trust_functions.py → trust/tools.py} +2 -2
- connectonion/prompt_files/__init__.py +11 -1
- connectonion/prompt_files/react_acknowledge.md +26 -0
- connectonion/prompts.py +10 -1
- connectonion/tui/chat.py +10 -1
- connectonion/tui/divider.py +10 -1
- connectonion/tui/dropdown.py +10 -1
- connectonion/tui/footer.py +8 -0
- connectonion/tui/fuzzy.py +11 -1
- connectonion/tui/input.py +118 -70
- connectonion/tui/keys.py +133 -6
- connectonion/tui/providers.py +11 -1
- connectonion/tui/status_bar.py +10 -1
- connectonion/useful_events_handlers/__init__.py +8 -0
- connectonion/useful_events_handlers/reflect.py +19 -4
- connectonion/useful_plugins/__init__.py +2 -1
- connectonion/useful_plugins/eval.py +2 -2
- connectonion/useful_plugins/gmail_plugin.py +3 -3
- connectonion/useful_plugins/image_result_formatter.py +3 -3
- connectonion/useful_plugins/re_act.py +114 -28
- connectonion/useful_plugins/shell_approval.py +2 -2
- connectonion/useful_plugins/system_reminder.py +103 -0
- connectonion/useful_plugins/ui_stream.py +18 -133
- connectonion/useful_prompts/README.md +61 -0
- connectonion/useful_prompts/__init__.py +45 -0
- connectonion/useful_prompts/coding_agent/README.md +106 -0
- connectonion/useful_prompts/coding_agent/assembler.py +123 -0
- connectonion/useful_prompts/coding_agent/prompts/main.md +227 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/ask_user.md +61 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/background.md +57 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/edit.md +90 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/glob.md +52 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/grep.md +55 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/plan_mode.md +80 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/read.md +40 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/shell.md +67 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/task.md +51 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/todo.md +139 -0
- connectonion/useful_prompts/coding_agent/prompts/tools/write.md +48 -0
- connectonion/useful_prompts/system-reminders/security-warning.md +14 -0
- connectonion/useful_prompts/system-reminders/test-reminder.md +11 -0
- connectonion/useful_tools/__init__.py +31 -4
- connectonion/useful_tools/ask_user.py +35 -0
- connectonion/useful_tools/bash.py +69 -0
- connectonion/useful_tools/diff_writer.py +186 -94
- connectonion/useful_tools/edit.py +102 -0
- connectonion/useful_tools/glob_files.py +97 -0
- connectonion/useful_tools/grep_files.py +171 -0
- connectonion/useful_tools/multi_edit.py +116 -0
- connectonion/useful_tools/read_file.py +73 -0
- connectonion/useful_tools/shell.py +50 -45
- connectonion/useful_tools/write_file.py +129 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/METADATA +10 -3
- connectonion-0.6.3.dist-info/RECORD +469 -0
- connectonion/network/asgi.py +0 -407
- connectonion/network/host.py +0 -616
- connectonion/network/trust.py +0 -166
- connectonion-0.6.2.dist-info/RECORD +0 -129
- /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/WHEEL +0 -0
- {connectonion-0.6.2.dist-info → connectonion-0.6.3.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,129 @@
|
|
|
1
|
+
# Console Output
|
|
2
|
+
|
|
3
|
+
ConnectOnion shows you what's happening by default - just like FastAPI, npm, and cargo.
|
|
4
|
+
|
|
5
|
+
## No Configuration Needed
|
|
6
|
+
|
|
7
|
+
```python
|
|
8
|
+
# Console output is always visible
|
|
9
|
+
agent = Agent("assistant", tools=[my_tool])
|
|
10
|
+
result = agent.input("Do something")
|
|
11
|
+
```
|
|
12
|
+
|
|
13
|
+
## What You See
|
|
14
|
+
|
|
15
|
+
When you run an agent, you'll see the onion stack banner and execution flow:
|
|
16
|
+
|
|
17
|
+
```
|
|
18
|
+
○
|
|
19
|
+
◎ my-assistant
|
|
20
|
+
● ────────────────────
|
|
21
|
+
connectonion v0.5.1
|
|
22
|
+
co/o4-mini · 3 tools
|
|
23
|
+
.co/logs/ · .co/evals/
|
|
24
|
+
────────────────────
|
|
25
|
+
|
|
26
|
+
[co] > "Generate a Python function"
|
|
27
|
+
|
|
28
|
+
[co] ○ o4-mini 1/10
|
|
29
|
+
[co] ● o4-mini · 1 tool · 150 tok · $0.0012 ⚡ 1.2s
|
|
30
|
+
[co] ▸ generate_code(language="python") ✓ 0.12s
|
|
31
|
+
|
|
32
|
+
[co] ═══════════════════════════════════════════════
|
|
33
|
+
[co] ✓ complete · 150 tokens · $0.0012 · 2.3s
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Console output helps you understand:
|
|
37
|
+
- What the agent is doing
|
|
38
|
+
- Which tools are being called
|
|
39
|
+
- How long operations take
|
|
40
|
+
- When errors occur
|
|
41
|
+
|
|
42
|
+
## Enhanced Output with @xray
|
|
43
|
+
|
|
44
|
+
Want more details? Use the `@xray` decorator:
|
|
45
|
+
|
|
46
|
+
```python
|
|
47
|
+
from connectonion import Agent, xray
|
|
48
|
+
|
|
49
|
+
@xray
|
|
50
|
+
def my_tool(query: str) -> str:
|
|
51
|
+
"""This tool shows a Rich table with detailed info."""
|
|
52
|
+
return process(query)
|
|
53
|
+
|
|
54
|
+
agent = Agent("assistant", tools=[my_tool])
|
|
55
|
+
result = agent.input("Search for python")
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
Output includes a beautiful table:
|
|
59
|
+
```
|
|
60
|
+
╭──────────────────── @xray: my_tool ────────────────────╮
|
|
61
|
+
│ agent assistant │
|
|
62
|
+
│ task Search for python │
|
|
63
|
+
│ iteration 1 │
|
|
64
|
+
│ ─────────────────────────────────────────────────── │
|
|
65
|
+
│ query python │
|
|
66
|
+
│ result Found 10 results... │
|
|
67
|
+
│ timing 340.2ms │
|
|
68
|
+
╰────────────────────────────────────────────────────────╯
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
## File Logging
|
|
72
|
+
|
|
73
|
+
ConnectOnion automatically logs to three places:
|
|
74
|
+
|
|
75
|
+
```python
|
|
76
|
+
# Default: console + plain text + session YAML
|
|
77
|
+
agent = Agent("assistant")
|
|
78
|
+
|
|
79
|
+
# Custom log file path
|
|
80
|
+
agent = Agent("assistant", log="agent.log")
|
|
81
|
+
|
|
82
|
+
# Or use environment variable (highest priority)
|
|
83
|
+
# CONNECTONION_LOG=agent.log python agent.py
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
Log locations:
|
|
87
|
+
- Plain text: `.co/logs/{name}.log`
|
|
88
|
+
- Session YAML: `.co/evals/{name}.yaml`
|
|
89
|
+
|
|
90
|
+
## Quiet Mode
|
|
91
|
+
|
|
92
|
+
For eval/testing, suppress console but keep session logging:
|
|
93
|
+
|
|
94
|
+
```python
|
|
95
|
+
# Quiet mode: no console, but sessions recorded for replay
|
|
96
|
+
agent = Agent("assistant", quiet=True)
|
|
97
|
+
```
|
|
98
|
+
|
|
99
|
+
| quiet | log | Console | Plain Text | Sessions | Use Case |
|
|
100
|
+
|-------|-----|---------|------------|----------|----------|
|
|
101
|
+
| False | True/None | ✓ | ✓ | ✓ | Development (default) |
|
|
102
|
+
| True | True/None | ✗ | ✗ | ✓ | Eval/testing |
|
|
103
|
+
| False | False | ✓ | ✗ | ✗ | Benchmarking |
|
|
104
|
+
|
|
105
|
+
## Why Console is On by Default
|
|
106
|
+
|
|
107
|
+
**Design Philosophy:** Good UX means showing what's happening by default.
|
|
108
|
+
|
|
109
|
+
When you run:
|
|
110
|
+
- `npm install` - you see packages being installed
|
|
111
|
+
- `cargo build` - you see compilation progress
|
|
112
|
+
- `fastapi dev` - you see server logs
|
|
113
|
+
|
|
114
|
+
Why should agents be silent? ConnectOnion follows the same principle - **visibility by default**.
|
|
115
|
+
|
|
116
|
+
## What Changed?
|
|
117
|
+
|
|
118
|
+
**Previous design (0.0.6 and earlier):**
|
|
119
|
+
- Console was off by default
|
|
120
|
+
- Required `debug=True` to see output
|
|
121
|
+
- Confusing - output wasn't "debugging", it was normal operation
|
|
122
|
+
|
|
123
|
+
**Current design (0.0.7+):**
|
|
124
|
+
- Console is on by default (use `quiet=True` to suppress)
|
|
125
|
+
- Shows what's happening (like FastAPI, npm, cargo)
|
|
126
|
+
- `@xray` decorator adds enhanced Rich tables for specific tools
|
|
127
|
+
- Session YAML logging for eval and replay
|
|
128
|
+
|
|
129
|
+
**Rationale:** The console output isn't "debug" information - it's useful operation visibility that users expect. Hiding it by default created confusion and poor developer experience.
|
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Eval YAML Format
|
|
2
|
+
|
|
3
|
+
Evals are stored in `.co/evals/{input_slug}.yaml`. File is named from the first user input (slugified). Same input sequence = same file with run tracking. Log = Eval (same format, add `expected` field for tests).
|
|
4
|
+
|
|
5
|
+
## File Structure
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
.co/evals/
|
|
9
|
+
├── say_hello_to_alice.yaml # Eval metadata + turns summary
|
|
10
|
+
├── say_hello_to_alice/
|
|
11
|
+
│ ├── run_1.yaml # Run 1: metadata + messages as JSON
|
|
12
|
+
│ └── run_2.yaml # Run 2: metadata + messages as JSON
|
|
13
|
+
├── open_hacker_news_and_summarize.yaml
|
|
14
|
+
└── open_hacker_news_and_summarize/
|
|
15
|
+
└── run_1.yaml
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Eval Summary YAML
|
|
19
|
+
|
|
20
|
+
```yaml
|
|
21
|
+
name: say_hello_to_alice
|
|
22
|
+
created: '2025-12-25 11:56:26'
|
|
23
|
+
updated: '2025-12-25 11:56:56'
|
|
24
|
+
runs: 2
|
|
25
|
+
model: gemini-2.5-flash
|
|
26
|
+
turns:
|
|
27
|
+
- input: Say hello to Alice
|
|
28
|
+
run: 2
|
|
29
|
+
output: Hello, Alice!
|
|
30
|
+
tools_called:
|
|
31
|
+
- greet(name='Alice')
|
|
32
|
+
expected: '' # For eval: expected output
|
|
33
|
+
evaluation: '' # For eval: pass/fail/notes
|
|
34
|
+
meta: '{"tokens": 155, "cost": 0.0, "duration_ms": 3595, "ts": "2025-12-25 11:56:56"}'
|
|
35
|
+
history:
|
|
36
|
+
- run: 1
|
|
37
|
+
output: Hello, Alice!
|
|
38
|
+
tools_called:
|
|
39
|
+
- greet(name='Alice')
|
|
40
|
+
expected: ''
|
|
41
|
+
evaluation: ''
|
|
42
|
+
meta: '{"tokens": 155, "cost": 0.0, "duration_ms": 4438, "ts": "2025-12-25 11:56:26"}'
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
The `meta` field is a compact JSON string containing tokens, cost, duration, and timestamp.
|
|
46
|
+
|
|
47
|
+
## Run YAML Format
|
|
48
|
+
|
|
49
|
+
Each run has its own YAML file with metadata and messages:
|
|
50
|
+
|
|
51
|
+
```yaml
|
|
52
|
+
system_prompt: "You are a helpful assistant..."
|
|
53
|
+
model: "claude-sonnet-4-5"
|
|
54
|
+
cwd: "/path/to/project"
|
|
55
|
+
tokens: 1314
|
|
56
|
+
cost: 0.0015
|
|
57
|
+
duration_ms: 6162
|
|
58
|
+
timestamp: "2025-12-25 12:50:44"
|
|
59
|
+
messages: |
|
|
60
|
+
[
|
|
61
|
+
{"role": "system", "content": "You are a helpful assistant..."},
|
|
62
|
+
{"role": "user", "content": "Say hello to Alice"},
|
|
63
|
+
{"role": "assistant", "tool_calls": [{"id": "...", "function": {"name": "greet", "arguments": "{\"name\": \"Alice\"}"}}]},
|
|
64
|
+
{"role": "tool", "content": "Hello, Alice!", "tool_call_id": "..."}
|
|
65
|
+
]
|
|
66
|
+
```
|
|
67
|
+
|
|
68
|
+
**Key fields:**
|
|
69
|
+
- `system_prompt`: The agent's system prompt (easy to access)
|
|
70
|
+
- `model`: Which model was used
|
|
71
|
+
- `cwd`: Working directory (for re-execution)
|
|
72
|
+
- `tokens`, `cost`, `duration_ms`: Performance metrics
|
|
73
|
+
- `messages`: Full message history as multi-line JSON (API format)
|
|
74
|
+
|
|
75
|
+
## Design Rationale
|
|
76
|
+
|
|
77
|
+
### Why file naming from input (not agent name)?
|
|
78
|
+
|
|
79
|
+
Same input = same eval file. This enables:
|
|
80
|
+
- **Run comparison**: See how outputs change across runs
|
|
81
|
+
- **Regression testing**: Same input should produce consistent results
|
|
82
|
+
- **History tracking**: Previous runs preserved in `history` array
|
|
83
|
+
|
|
84
|
+
### Why YAML with embedded JSON for messages?
|
|
85
|
+
|
|
86
|
+
1. **Clean separation**: YAML for readable metadata, JSON for API-compatible messages
|
|
87
|
+
2. **Easy to navigate**: Multi-line JSON is scannable
|
|
88
|
+
3. **Reproducibility**: `cwd` and `system_prompt` stored for re-execution
|
|
89
|
+
4. **Single file per run**: No need to manage multiple files
|
|
90
|
+
|
|
91
|
+
### Why runs and history?
|
|
92
|
+
|
|
93
|
+
```yaml
|
|
94
|
+
turns:
|
|
95
|
+
- input: Say hello to Alice
|
|
96
|
+
run: 2 # Latest run is the main entry
|
|
97
|
+
output: Hello, Alice!
|
|
98
|
+
history: # Previous runs for comparison
|
|
99
|
+
- run: 1
|
|
100
|
+
output: Hello, Alice!
|
|
101
|
+
```
|
|
102
|
+
|
|
103
|
+
- Latest run is always at top level (easy to see current state)
|
|
104
|
+
- History preserves all previous runs for regression analysis
|
|
105
|
+
- Compare outputs across model versions or code changes
|
|
106
|
+
|
|
107
|
+
## Usage
|
|
108
|
+
|
|
109
|
+
### Quick check latest run
|
|
110
|
+
```bash
|
|
111
|
+
head -30 .co/evals/say_hello_to_alice.yaml
|
|
112
|
+
```
|
|
113
|
+
|
|
114
|
+
### Load messages for replay
|
|
115
|
+
```python
|
|
116
|
+
import json
|
|
117
|
+
import yaml
|
|
118
|
+
|
|
119
|
+
def load_messages(eval_dir: str, run: int = 1) -> list:
|
|
120
|
+
"""Load messages from run YAML file."""
|
|
121
|
+
with open(f"{eval_dir}/run_{run}.yaml") as f:
|
|
122
|
+
data = yaml.safe_load(f)
|
|
123
|
+
return json.loads(data['messages'])
|
|
124
|
+
|
|
125
|
+
# Load run 1 messages
|
|
126
|
+
messages = load_messages(".co/evals/say_hello_to_alice", run=1)
|
|
127
|
+
```
|
|
128
|
+
|
|
129
|
+
### Load run metadata
|
|
130
|
+
```python
|
|
131
|
+
import yaml
|
|
132
|
+
|
|
133
|
+
with open('.co/evals/say_hello_to_alice/run_1.yaml') as f:
|
|
134
|
+
run_data = yaml.safe_load(f)
|
|
135
|
+
|
|
136
|
+
print(f"Model: {run_data['model']}")
|
|
137
|
+
print(f"System prompt: {run_data['system_prompt']}")
|
|
138
|
+
print(f"CWD: {run_data['cwd']}")
|
|
139
|
+
print(f"Tokens: {run_data['tokens']}, Cost: ${run_data['cost']}")
|
|
140
|
+
```
|
|
141
|
+
|
|
142
|
+
### Compare runs
|
|
143
|
+
```python
|
|
144
|
+
import yaml
|
|
145
|
+
|
|
146
|
+
with open('.co/evals/say_hello_to_alice.yaml') as f:
|
|
147
|
+
data = yaml.safe_load(f)
|
|
148
|
+
|
|
149
|
+
turn = data['turns'][0]
|
|
150
|
+
print(f"Run {turn['run']}: {turn['output']}")
|
|
151
|
+
|
|
152
|
+
for hist in turn.get('history', []):
|
|
153
|
+
print(f"Run {hist['run']}: {hist['output']}")
|
|
154
|
+
```
|
|
155
|
+
|
|
156
|
+
### Add expected results for eval
|
|
157
|
+
```yaml
|
|
158
|
+
turns:
|
|
159
|
+
- input: Say hello to Alice
|
|
160
|
+
run: 2
|
|
161
|
+
output: Hello, Alice!
|
|
162
|
+
expected: "Hello, Alice!" # What we expect
|
|
163
|
+
evaluation: "pass" # Did it pass?
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Parse metadata
|
|
167
|
+
```python
|
|
168
|
+
import json
|
|
169
|
+
|
|
170
|
+
turn = data['turns'][0]
|
|
171
|
+
meta = json.loads(turn['meta'])
|
|
172
|
+
print(f"Tokens: {meta['tokens']}, Cost: ${meta['cost']}, Duration: {meta['duration_ms']}ms")
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
### Get total runs
|
|
176
|
+
```bash
|
|
177
|
+
yq '.runs' .co/evals/say_hello_to_alice.yaml
|
|
178
|
+
```
|
|
@@ -0,0 +1,230 @@
|
|
|
1
|
+
# Evals
|
|
2
|
+
|
|
3
|
+
Run and manage agent evals with `co eval`. Test agent behavior, track results over time, use LLM-as-judge for semantic evaluation.
|
|
4
|
+
|
|
5
|
+
## Quick Start
|
|
6
|
+
|
|
7
|
+
```bash
|
|
8
|
+
# Run all evals in .co/evals/
|
|
9
|
+
co eval
|
|
10
|
+
|
|
11
|
+
# Run specific eval
|
|
12
|
+
co eval wikipedia_lookup
|
|
13
|
+
|
|
14
|
+
# Run with specific agent file
|
|
15
|
+
co eval --agent my_agent.py
|
|
16
|
+
```
|
|
17
|
+
|
|
18
|
+
## Creating Evals
|
|
19
|
+
|
|
20
|
+
Create YAML files in `.co/evals/`:
|
|
21
|
+
|
|
22
|
+
```yaml
|
|
23
|
+
# .co/evals/wikipedia_lookup.yaml
|
|
24
|
+
name: wikipedia_lookup
|
|
25
|
+
agent: agent.py
|
|
26
|
+
turns:
|
|
27
|
+
- input: Go to Wikipedia and find when the Eiffel Tower was built.
|
|
28
|
+
expected: Contains 1889 or late 1880s
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
### Minimal Eval
|
|
32
|
+
|
|
33
|
+
```yaml
|
|
34
|
+
name: simple_greeting
|
|
35
|
+
agent: agent.py
|
|
36
|
+
turns:
|
|
37
|
+
- input: Say hello to Alice
|
|
38
|
+
expected: Greeting includes Alice's name
|
|
39
|
+
```
|
|
40
|
+
|
|
41
|
+
### Multi-Turn Conversation
|
|
42
|
+
|
|
43
|
+
Turns run sequentially within the same agent session, simulating a conversation:
|
|
44
|
+
|
|
45
|
+
```yaml
|
|
46
|
+
name: multi_turn_chat
|
|
47
|
+
agent: agent.py
|
|
48
|
+
turns:
|
|
49
|
+
- input: My name is Bob
|
|
50
|
+
expected: Acknowledges the name Bob
|
|
51
|
+
- input: What's my name?
|
|
52
|
+
expected: Remembers and says Bob
|
|
53
|
+
```
|
|
54
|
+
|
|
55
|
+
## YAML Format
|
|
56
|
+
|
|
57
|
+
```yaml
|
|
58
|
+
name: eval_name # Eval identifier
|
|
59
|
+
agent: agent.py # Path to agent file (required)
|
|
60
|
+
created: '2025-12-25 14:30:00' # Auto-generated
|
|
61
|
+
updated: '2025-12-25 18:35:58' # Auto-updated on each run
|
|
62
|
+
runs: 8 # Total run count
|
|
63
|
+
|
|
64
|
+
turns:
|
|
65
|
+
- input: User input text # What to send to agent
|
|
66
|
+
output: Agent response # Captured from agent
|
|
67
|
+
expected: What we expect # For LLM judge evaluation
|
|
68
|
+
pass: true # Judge result (true/false)
|
|
69
|
+
analysis: Output contains... # Judge explanation
|
|
70
|
+
tools_called: # Tools the agent used
|
|
71
|
+
- open_browser(headless=False)
|
|
72
|
+
- go_to(url='https://...')
|
|
73
|
+
tokens: 62533 # Total tokens used
|
|
74
|
+
cost: 0.0491 # Total cost in USD
|
|
75
|
+
ts: '2025-12-25 18:35:58' # Timestamp
|
|
76
|
+
run: 8 # Run number
|
|
77
|
+
history: '[...]' # Previous runs (JSON array)
|
|
78
|
+
```
|
|
79
|
+
|
|
80
|
+
## LLM-as-Judge
|
|
81
|
+
|
|
82
|
+
When `expected` is set, an LLM judges if the output satisfies the criteria:
|
|
83
|
+
|
|
84
|
+
```yaml
|
|
85
|
+
turns:
|
|
86
|
+
- input: What's 2+2?
|
|
87
|
+
expected: Answer is 4
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
The judge considers:
|
|
91
|
+
- Semantic similarity (not exact match)
|
|
92
|
+
- Key information presence
|
|
93
|
+
- Intent fulfillment
|
|
94
|
+
|
|
95
|
+
Results stored as:
|
|
96
|
+
- `pass: true/false` - Did it pass?
|
|
97
|
+
- `analysis: "..."` - Why it passed/failed
|
|
98
|
+
|
|
99
|
+
## History Tracking
|
|
100
|
+
|
|
101
|
+
Each run is preserved in `history` as a JSON array:
|
|
102
|
+
|
|
103
|
+
```yaml
|
|
104
|
+
history: |
|
|
105
|
+
[
|
|
106
|
+
{"ts": "2025-12-25 18:35:58", "pass": true, "tokens": 62584, "cost": 0.05},
|
|
107
|
+
{"ts": "2025-12-25 18:25:06", "pass": true, "tokens": 54879, "cost": 0.04},
|
|
108
|
+
{"ts": "2025-12-25 18:20:25", "pass": false, "tokens": 40147, "cost": 0.03}]
|
|
109
|
+
```
|
|
110
|
+
|
|
111
|
+
Use history to:
|
|
112
|
+
- Track stability across runs
|
|
113
|
+
- Compare token usage and costs
|
|
114
|
+
- Identify regressions
|
|
115
|
+
|
|
116
|
+
## Agent File Structure
|
|
117
|
+
|
|
118
|
+
Your agent file must export an `agent` variable:
|
|
119
|
+
|
|
120
|
+
```python
|
|
121
|
+
# agent.py
|
|
122
|
+
from connectonion import Agent
|
|
123
|
+
|
|
124
|
+
agent = Agent(
|
|
125
|
+
name="my_agent",
|
|
126
|
+
tools=[...],
|
|
127
|
+
model="co/gemini-2.5-pro"
|
|
128
|
+
)
|
|
129
|
+
|
|
130
|
+
if __name__ == "__main__":
|
|
131
|
+
agent.input("Interactive mode...")
|
|
132
|
+
```
|
|
133
|
+
|
|
134
|
+
## CLI Options
|
|
135
|
+
|
|
136
|
+
```bash
|
|
137
|
+
# Run all evals
|
|
138
|
+
co eval
|
|
139
|
+
|
|
140
|
+
# Run specific eval by name
|
|
141
|
+
co eval my_eval_name
|
|
142
|
+
|
|
143
|
+
# Override agent file (ignores YAML agent field)
|
|
144
|
+
co eval --agent custom_agent.py
|
|
145
|
+
co eval -a custom_agent.py
|
|
146
|
+
```
|
|
147
|
+
|
|
148
|
+
## Output
|
|
149
|
+
|
|
150
|
+
```
|
|
151
|
+
Loading: agent.py
|
|
152
|
+
Running: wikipedia_lookup
|
|
153
|
+
input: Go to Wikipedia and find when the Eiffel Tower...
|
|
154
|
+
✓ Output contains 1889 and height information...
|
|
155
|
+
✓ wikipedia_lookup completed
|
|
156
|
+
|
|
157
|
+
Eval Results
|
|
158
|
+
┌──────────────────┬────────┬────────────┬────────────┐
|
|
159
|
+
│ Eval │ Status │ Expected │ Output │
|
|
160
|
+
├──────────────────┼────────┼────────────┼────────────┤
|
|
161
|
+
│ wikipedia_lookup │ ✓ pass │ Contains...│ The Eiff...│
|
|
162
|
+
└──────────────────┴────────┴────────────┴────────────┘
|
|
163
|
+
|
|
164
|
+
✓ 1 passed
|
|
165
|
+
```
|
|
166
|
+
|
|
167
|
+
## Best Practices
|
|
168
|
+
|
|
169
|
+
### Write Good Expected Criteria
|
|
170
|
+
|
|
171
|
+
```yaml
|
|
172
|
+
# Bad - too specific
|
|
173
|
+
expected: "The Eiffel Tower was built in 1889"
|
|
174
|
+
|
|
175
|
+
# Good - semantic criteria
|
|
176
|
+
expected: Contains the year 1889 and mentions Paris or France
|
|
177
|
+
```
|
|
178
|
+
|
|
179
|
+
### Keep Evals Focused
|
|
180
|
+
|
|
181
|
+
```yaml
|
|
182
|
+
# Bad - testing too many things
|
|
183
|
+
- input: Go to Wikipedia, find the Eiffel Tower, take a screenshot, and summarize
|
|
184
|
+
|
|
185
|
+
# Good - one thing at a time
|
|
186
|
+
- input: Go to Wikipedia and find the Eiffel Tower height
|
|
187
|
+
expected: Height around 300-330 meters
|
|
188
|
+
```
|
|
189
|
+
|
|
190
|
+
### Use Multi-Turn for Conversations
|
|
191
|
+
|
|
192
|
+
```yaml
|
|
193
|
+
turns:
|
|
194
|
+
- input: Remember that my favorite color is blue
|
|
195
|
+
expected: Acknowledges the color preference
|
|
196
|
+
- input: What's my favorite color?
|
|
197
|
+
expected: Says blue
|
|
198
|
+
```
|
|
199
|
+
|
|
200
|
+
## File Organization
|
|
201
|
+
|
|
202
|
+
```
|
|
203
|
+
.co/evals/
|
|
204
|
+
├── 1_basic_greeting.yaml # Number prefix for ordering
|
|
205
|
+
├── 2_wikipedia_lookup.yaml
|
|
206
|
+
├── 3_multi_turn_chat.yaml
|
|
207
|
+
└── 4_complex_workflow.yaml
|
|
208
|
+
```
|
|
209
|
+
|
|
210
|
+
## Troubleshooting
|
|
211
|
+
|
|
212
|
+
### "No agent specified"
|
|
213
|
+
|
|
214
|
+
Add `agent: agent.py` to YAML or use `--agent` flag:
|
|
215
|
+
|
|
216
|
+
```bash
|
|
217
|
+
co eval --agent my_agent.py
|
|
218
|
+
```
|
|
219
|
+
|
|
220
|
+
### "No 'agent' instance found"
|
|
221
|
+
|
|
222
|
+
Ensure your agent file exports `agent`:
|
|
223
|
+
|
|
224
|
+
```python
|
|
225
|
+
agent = Agent("name", ...) # Must be named 'agent'
|
|
226
|
+
```
|
|
227
|
+
|
|
228
|
+
### Eval passes but shouldn't (or vice versa)
|
|
229
|
+
|
|
230
|
+
Check the `analysis` field to understand the judge's reasoning. Adjust `expected` to be more specific.
|