connectonion 0.6.1__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 +95 -142
- connectonion/cli/browser_agent/element_finder.py +147 -0
- connectonion/cli/browser_agent/highlight_screenshot.py +182 -0
- connectonion/cli/browser_agent/prompt.md +188 -105
- connectonion/cli/browser_agent/prompts/element_matcher.md +59 -0
- connectonion/cli/browser_agent/prompts/form_filler.md +19 -0
- connectonion/cli/browser_agent/prompts/scroll_strategy.md +36 -0
- connectonion/cli/browser_agent/scripts/extract_elements.js +126 -0
- connectonion/cli/browser_agent/scroll.py +145 -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.1.dist-info → connectonion-0.6.3.dist-info}/METADATA +10 -3
- connectonion-0.6.3.dist-info/RECORD +469 -0
- connectonion/cli/browser_agent/scroll_strategies.py +0 -276
- connectonion/network/asgi.py +0 -407
- connectonion/network/host.py +0 -616
- connectonion/network/trust.py +0 -166
- connectonion-0.6.1.dist-info/RECORD +0 -123
- /connectonion/cli/{docs → co_ai/prompts/connectonion}/connectonion.md +0 -0
- {connectonion-0.6.1.dist-info → connectonion-0.6.3.dist-info}/WHEEL +0 -0
- {connectonion-0.6.1.dist-info → connectonion-0.6.3.dist-info}/entry_points.txt +0 -0
|
@@ -0,0 +1,453 @@
|
|
|
1
|
+
# Technical Architecture
|
|
2
|
+
|
|
3
|
+
How we build a behavior-based agent network from the ground up.
|
|
4
|
+
|
|
5
|
+
## Overview
|
|
6
|
+
|
|
7
|
+
ConnectOnion creates a decentralized network where agents discover and collaborate through behavior rather than identity. This document details the technical implementation across network layers.
|
|
8
|
+
|
|
9
|
+
## Architecture Layers
|
|
10
|
+
|
|
11
|
+
```
|
|
12
|
+
┌─────────────────────────────────────┐
|
|
13
|
+
│ Application Layer (Functions) │ ← Share & Find
|
|
14
|
+
├─────────────────────────────────────┤
|
|
15
|
+
│ Discovery Layer (Behavioral) │ ← Semantic Matching
|
|
16
|
+
├─────────────────────────────────────┤
|
|
17
|
+
│ Trust Layer (Reputation) │ ← Dynamic Trust
|
|
18
|
+
├─────────────────────────────────────┤
|
|
19
|
+
│ Transport Layer (P2P Mesh) │ ← No Fixed IDs
|
|
20
|
+
├─────────────────────────────────────┤
|
|
21
|
+
│ Network Layer (IP/Local) │ ← Progressive Enhancement
|
|
22
|
+
└─────────────────────────────────────┘
|
|
23
|
+
```
|
|
24
|
+
|
|
25
|
+
## Phase 1: Local Discovery (Current)
|
|
26
|
+
|
|
27
|
+
### Agent Registration
|
|
28
|
+
```python
|
|
29
|
+
@agent(port=8001)
|
|
30
|
+
def translate(text: str, lang: str = "en") -> str:
|
|
31
|
+
"""Translate text to specified language."""
|
|
32
|
+
return translation
|
|
33
|
+
|
|
34
|
+
# Automatically:
|
|
35
|
+
# 1. Starts HTTP server on port 8001
|
|
36
|
+
# 2. Exposes /capabilities endpoint
|
|
37
|
+
# 3. Responds to behavioral queries
|
|
38
|
+
```
|
|
39
|
+
|
|
40
|
+
### Discovery Protocol
|
|
41
|
+
```python
|
|
42
|
+
# Scanner finds local agents
|
|
43
|
+
for port in range(8000, 9000):
|
|
44
|
+
try:
|
|
45
|
+
response = requests.get(f"http://localhost:{port}/capabilities")
|
|
46
|
+
if response.ok:
|
|
47
|
+
capability = response.json()
|
|
48
|
+
register_agent(capability)
|
|
49
|
+
except:
|
|
50
|
+
continue
|
|
51
|
+
```
|
|
52
|
+
|
|
53
|
+
### Capability Schema
|
|
54
|
+
```json
|
|
55
|
+
{
|
|
56
|
+
"name": "translate",
|
|
57
|
+
"description": "Translate text to specified language",
|
|
58
|
+
"behavioral_fingerprint": "text.translation.multilingual",
|
|
59
|
+
"input_schema": {
|
|
60
|
+
"type": "object",
|
|
61
|
+
"properties": {
|
|
62
|
+
"text": {"type": "string"},
|
|
63
|
+
"lang": {"type": "string", "default": "en"}
|
|
64
|
+
}
|
|
65
|
+
},
|
|
66
|
+
"output_schema": {
|
|
67
|
+
"type": "string"
|
|
68
|
+
},
|
|
69
|
+
"performance": {
|
|
70
|
+
"avg_latency_ms": 230,
|
|
71
|
+
"success_rate": 0.98
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
## Phase 2: Behavioral Matching
|
|
77
|
+
|
|
78
|
+
### Semantic Fingerprints
|
|
79
|
+
```python
|
|
80
|
+
# Generate from function behavior
|
|
81
|
+
def generate_fingerprint(func):
|
|
82
|
+
# Analyze docstring with NLP
|
|
83
|
+
doc_embedding = embed(func.__doc__)
|
|
84
|
+
|
|
85
|
+
# Extract type information
|
|
86
|
+
sig = inspect.signature(func)
|
|
87
|
+
type_vector = encode_types(sig)
|
|
88
|
+
|
|
89
|
+
# Combine into behavioral fingerprint
|
|
90
|
+
return combine_vectors(doc_embedding, type_vector)
|
|
91
|
+
```
|
|
92
|
+
|
|
93
|
+
### Similarity Matching
|
|
94
|
+
```python
|
|
95
|
+
def discover(need: str, threshold: float = 0.8):
|
|
96
|
+
need_vector = embed(need)
|
|
97
|
+
|
|
98
|
+
candidates = []
|
|
99
|
+
for agent in available_agents:
|
|
100
|
+
similarity = cosine_similarity(need_vector, agent.fingerprint)
|
|
101
|
+
if similarity > threshold:
|
|
102
|
+
candidates.append((agent, similarity))
|
|
103
|
+
|
|
104
|
+
# Return best match
|
|
105
|
+
return max(candidates, key=lambda x: x[1])[0]
|
|
106
|
+
```
|
|
107
|
+
|
|
108
|
+
### Behavioral Composition
|
|
109
|
+
```python
|
|
110
|
+
# Agents can discover and use other agents
|
|
111
|
+
@agent
|
|
112
|
+
def research_report(topic: str) -> str:
|
|
113
|
+
# Dynamically discover capabilities
|
|
114
|
+
search = discover("web search")
|
|
115
|
+
summarize = discover("summarization")
|
|
116
|
+
analyze = discover("analysis")
|
|
117
|
+
|
|
118
|
+
# Compose behaviors
|
|
119
|
+
results = search(topic)
|
|
120
|
+
summary = summarize(results)
|
|
121
|
+
analysis = analyze(summary, context=topic)
|
|
122
|
+
|
|
123
|
+
return format_report(summary, analysis)
|
|
124
|
+
```
|
|
125
|
+
|
|
126
|
+
## Phase 3: Trust Mechanics
|
|
127
|
+
|
|
128
|
+
### Behavioral Reputation
|
|
129
|
+
```python
|
|
130
|
+
class BehavioralTrust:
|
|
131
|
+
def __init__(self):
|
|
132
|
+
self.interactions = []
|
|
133
|
+
self.success_rate = 1.0
|
|
134
|
+
self.last_seen = time.time()
|
|
135
|
+
|
|
136
|
+
def record_interaction(self, success: bool, response_time: float):
|
|
137
|
+
self.interactions.append({
|
|
138
|
+
'success': success,
|
|
139
|
+
'time': response_time,
|
|
140
|
+
'timestamp': time.time()
|
|
141
|
+
})
|
|
142
|
+
|
|
143
|
+
# Update rolling success rate
|
|
144
|
+
recent = self.interactions[-100:] # Last 100
|
|
145
|
+
self.success_rate = sum(i['success'] for i in recent) / len(recent)
|
|
146
|
+
|
|
147
|
+
# Update last seen
|
|
148
|
+
self.last_seen = time.time()
|
|
149
|
+
|
|
150
|
+
def get_trust_score(self) -> float:
|
|
151
|
+
# Factor in success rate
|
|
152
|
+
base_trust = self.success_rate
|
|
153
|
+
|
|
154
|
+
# Factor in consistency
|
|
155
|
+
if len(self.interactions) > 10:
|
|
156
|
+
response_times = [i['time'] for i in self.interactions[-10:]]
|
|
157
|
+
consistency = 1 - (np.std(response_times) / np.mean(response_times))
|
|
158
|
+
base_trust *= (0.7 + 0.3 * consistency)
|
|
159
|
+
|
|
160
|
+
# Factor in recency
|
|
161
|
+
time_decay = np.exp(-(time.time() - self.last_seen) / 86400) # Daily decay
|
|
162
|
+
|
|
163
|
+
return base_trust * time_decay
|
|
164
|
+
```
|
|
165
|
+
|
|
166
|
+
### Trust Propagation
|
|
167
|
+
```python
|
|
168
|
+
# Agents share trust information
|
|
169
|
+
def share_trust_data(peer_agent):
|
|
170
|
+
my_observations = {}
|
|
171
|
+
for agent_id, trust in self.trust_map.items():
|
|
172
|
+
if trust.get_trust_score() > 0.6: # Only share positive experiences
|
|
173
|
+
my_observations[agent_id] = {
|
|
174
|
+
'score': trust.get_trust_score(),
|
|
175
|
+
'interactions': len(trust.interactions),
|
|
176
|
+
'last_seen': trust.last_seen
|
|
177
|
+
}
|
|
178
|
+
|
|
179
|
+
return my_observations
|
|
180
|
+
|
|
181
|
+
# Incorporate peer observations with lower weight
|
|
182
|
+
def incorporate_peer_trust(peer_data, weight=0.3):
|
|
183
|
+
for agent_id, peer_trust in peer_data.items():
|
|
184
|
+
if agent_id in self.trust_map:
|
|
185
|
+
# Blend with existing
|
|
186
|
+
my_score = self.trust_map[agent_id].get_trust_score()
|
|
187
|
+
peer_score = peer_trust['score']
|
|
188
|
+
self.trust_map[agent_id].external_score = (
|
|
189
|
+
my_score * (1 - weight) + peer_score * weight
|
|
190
|
+
)
|
|
191
|
+
```
|
|
192
|
+
|
|
193
|
+
## Phase 4: Network Protocol
|
|
194
|
+
|
|
195
|
+
### P2P Discovery Broadcast
|
|
196
|
+
```python
|
|
197
|
+
# Behavioral advertisement protocol
|
|
198
|
+
class BehaviorBroadcast:
|
|
199
|
+
def __init__(self, agent):
|
|
200
|
+
self.agent = agent
|
|
201
|
+
self.broadcast_interval = 30 # seconds
|
|
202
|
+
|
|
203
|
+
async def advertise(self):
|
|
204
|
+
while True:
|
|
205
|
+
# Create behavioral advertisement
|
|
206
|
+
ad = {
|
|
207
|
+
'fingerprint': self.agent.behavioral_fingerprint,
|
|
208
|
+
'capabilities': self.agent.capability_summary,
|
|
209
|
+
'trust_metrics': self.agent.get_public_metrics(),
|
|
210
|
+
'timestamp': time.time()
|
|
211
|
+
}
|
|
212
|
+
|
|
213
|
+
# Broadcast to local network
|
|
214
|
+
await self.broadcast_udp(ad, port=8999)
|
|
215
|
+
|
|
216
|
+
# Also gossip to known peers
|
|
217
|
+
for peer in self.known_peers:
|
|
218
|
+
await self.gossip_to_peer(peer, ad)
|
|
219
|
+
|
|
220
|
+
await asyncio.sleep(self.broadcast_interval)
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
### Behavioral Routing
|
|
224
|
+
```python
|
|
225
|
+
# Route requests based on behavioral similarity
|
|
226
|
+
class BehavioralRouter:
|
|
227
|
+
def route_request(self, request):
|
|
228
|
+
# Extract behavioral need
|
|
229
|
+
need_vector = extract_need(request)
|
|
230
|
+
|
|
231
|
+
# Find capable agents
|
|
232
|
+
candidates = []
|
|
233
|
+
for agent in self.routing_table:
|
|
234
|
+
match_score = behavioral_match(need_vector, agent.fingerprint)
|
|
235
|
+
if match_score > 0.7:
|
|
236
|
+
candidates.append((agent, match_score))
|
|
237
|
+
|
|
238
|
+
# Route to best matches
|
|
239
|
+
candidates.sort(key=lambda x: x[1], reverse=True)
|
|
240
|
+
return candidates[:3] # Top 3 for redundancy
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
## Phase 5: Advanced Features
|
|
244
|
+
|
|
245
|
+
### Behavioral Evolution
|
|
246
|
+
```python
|
|
247
|
+
# Agents adapt based on usage patterns
|
|
248
|
+
class EvolvingAgent:
|
|
249
|
+
def adapt_behavior(self, feedback):
|
|
250
|
+
# Which capabilities are used most?
|
|
251
|
+
usage_stats = analyze_usage(self.history)
|
|
252
|
+
|
|
253
|
+
# Which compositions are successful?
|
|
254
|
+
composition_patterns = extract_patterns(self.history)
|
|
255
|
+
|
|
256
|
+
# Adjust behavioral fingerprint
|
|
257
|
+
self.fingerprint = self.fingerprint * 0.9 + usage_vector * 0.1
|
|
258
|
+
|
|
259
|
+
# Learn new compositions
|
|
260
|
+
if successful_pattern not in self.capabilities:
|
|
261
|
+
self.learn_composition(successful_pattern)
|
|
262
|
+
```
|
|
263
|
+
|
|
264
|
+
### Semantic Protocol Negotiation
|
|
265
|
+
```python
|
|
266
|
+
# Agents negotiate understanding
|
|
267
|
+
async def semantic_handshake(agent1, agent2):
|
|
268
|
+
# Exchange capability understanding
|
|
269
|
+
a1_concepts = agent1.understood_concepts()
|
|
270
|
+
a2_concepts = agent2.understood_concepts()
|
|
271
|
+
|
|
272
|
+
# Find common ground
|
|
273
|
+
shared = find_overlap(a1_concepts, a2_concepts)
|
|
274
|
+
|
|
275
|
+
if overlap_score(shared) > 0.8:
|
|
276
|
+
# Direct communication possible
|
|
277
|
+
return DirectProtocol(shared)
|
|
278
|
+
else:
|
|
279
|
+
# Need semantic translation
|
|
280
|
+
translator = discover("semantic mediation")
|
|
281
|
+
return MediatedProtocol(translator, a1_concepts, a2_concepts)
|
|
282
|
+
```
|
|
283
|
+
|
|
284
|
+
## Security Architecture
|
|
285
|
+
|
|
286
|
+
### Behavioral Anomaly Detection
|
|
287
|
+
```python
|
|
288
|
+
class AnomalyDetector:
|
|
289
|
+
def __init__(self):
|
|
290
|
+
self.behavior_model = train_baseline()
|
|
291
|
+
|
|
292
|
+
def check_behavior(self, agent, action):
|
|
293
|
+
# Is this action consistent with claimed behavior?
|
|
294
|
+
expected = self.behavior_model.predict(agent.fingerprint)
|
|
295
|
+
actual = vectorize_action(action)
|
|
296
|
+
|
|
297
|
+
deviation = cosine_distance(expected, actual)
|
|
298
|
+
if deviation > 0.3:
|
|
299
|
+
return SecurityAlert(
|
|
300
|
+
level="warning",
|
|
301
|
+
reason=f"Behavior deviation: {deviation}"
|
|
302
|
+
)
|
|
303
|
+
```
|
|
304
|
+
|
|
305
|
+
### Distributed Verification
|
|
306
|
+
```python
|
|
307
|
+
# Multiple agents verify critical operations
|
|
308
|
+
async def distributed_verify(operation, min_verifiers=3):
|
|
309
|
+
# Find verification agents
|
|
310
|
+
verifiers = discover_all("verification", min_trust=0.8)
|
|
311
|
+
|
|
312
|
+
if len(verifiers) < min_verifiers:
|
|
313
|
+
raise InsufficientVerifiers()
|
|
314
|
+
|
|
315
|
+
# Parallel verification
|
|
316
|
+
results = await asyncio.gather(*[
|
|
317
|
+
v.verify(operation) for v in verifiers[:5]
|
|
318
|
+
])
|
|
319
|
+
|
|
320
|
+
# Require majority consensus
|
|
321
|
+
approved = sum(r.approved for r in results)
|
|
322
|
+
return approved >= min_verifiers
|
|
323
|
+
```
|
|
324
|
+
|
|
325
|
+
## Performance Optimizations
|
|
326
|
+
|
|
327
|
+
### Behavioral Caching
|
|
328
|
+
```python
|
|
329
|
+
# Cache discovered agents by behavior
|
|
330
|
+
class BehaviorCache:
|
|
331
|
+
def __init__(self, ttl=300): # 5 minute TTL
|
|
332
|
+
self.cache = {}
|
|
333
|
+
self.ttl = ttl
|
|
334
|
+
|
|
335
|
+
def get(self, need: str) -> Optional[Agent]:
|
|
336
|
+
key = hash_need(need)
|
|
337
|
+
if key in self.cache:
|
|
338
|
+
entry, timestamp = self.cache[key]
|
|
339
|
+
if time.time() - timestamp < self.ttl:
|
|
340
|
+
return entry
|
|
341
|
+
return None
|
|
342
|
+
|
|
343
|
+
def put(self, need: str, agent: Agent):
|
|
344
|
+
key = hash_need(need)
|
|
345
|
+
self.cache[key] = (agent, time.time())
|
|
346
|
+
```
|
|
347
|
+
|
|
348
|
+
### Connection Pooling
|
|
349
|
+
```python
|
|
350
|
+
# Reuse connections to frequently-used agents
|
|
351
|
+
class AgentConnectionPool:
|
|
352
|
+
def __init__(self, max_connections=100):
|
|
353
|
+
self.pools = {} # agent_id -> connection_pool
|
|
354
|
+
self.max_per_agent = 10
|
|
355
|
+
|
|
356
|
+
async def get_connection(self, agent):
|
|
357
|
+
if agent.id not in self.pools:
|
|
358
|
+
self.pools[agent.id] = ConnectionPool(
|
|
359
|
+
agent.endpoint,
|
|
360
|
+
max_size=self.max_per_agent
|
|
361
|
+
)
|
|
362
|
+
|
|
363
|
+
return await self.pools[agent.id].acquire()
|
|
364
|
+
```
|
|
365
|
+
|
|
366
|
+
## Deployment Architecture
|
|
367
|
+
|
|
368
|
+
### Container-Based Agents
|
|
369
|
+
```dockerfile
|
|
370
|
+
FROM python:3.11-slim
|
|
371
|
+
|
|
372
|
+
# Install agent framework
|
|
373
|
+
RUN pip install connectonion
|
|
374
|
+
|
|
375
|
+
# Copy agent function
|
|
376
|
+
COPY my_agent.py /app/
|
|
377
|
+
|
|
378
|
+
# Expose behavior on port
|
|
379
|
+
EXPOSE 8001
|
|
380
|
+
|
|
381
|
+
# Run agent
|
|
382
|
+
CMD ["python", "-m", "connectonion.serve", "my_agent:agent_function"]
|
|
383
|
+
```
|
|
384
|
+
|
|
385
|
+
### Kubernetes Orchestration
|
|
386
|
+
```yaml
|
|
387
|
+
apiVersion: apps/v1
|
|
388
|
+
kind: Deployment
|
|
389
|
+
metadata:
|
|
390
|
+
name: translation-agent
|
|
391
|
+
spec:
|
|
392
|
+
replicas: 3
|
|
393
|
+
selector:
|
|
394
|
+
matchLabels:
|
|
395
|
+
behavior: translation
|
|
396
|
+
template:
|
|
397
|
+
metadata:
|
|
398
|
+
labels:
|
|
399
|
+
behavior: translation
|
|
400
|
+
spec:
|
|
401
|
+
containers:
|
|
402
|
+
- name: agent
|
|
403
|
+
image: myagents/translation:latest
|
|
404
|
+
ports:
|
|
405
|
+
- containerPort: 8001
|
|
406
|
+
env:
|
|
407
|
+
- name: BEHAVIORAL_FINGERPRINT
|
|
408
|
+
value: "text.translation.multilingual"
|
|
409
|
+
```
|
|
410
|
+
|
|
411
|
+
## Monitoring and Observability
|
|
412
|
+
|
|
413
|
+
### Behavioral Metrics
|
|
414
|
+
```python
|
|
415
|
+
# Track behavioral health
|
|
416
|
+
class BehaviorMetrics:
|
|
417
|
+
def __init__(self):
|
|
418
|
+
self.metrics = {
|
|
419
|
+
'requests_handled': Counter(),
|
|
420
|
+
'behavior_matches': Histogram(),
|
|
421
|
+
'trust_scores': Gauge(),
|
|
422
|
+
'composition_depth': Histogram()
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
def record_interaction(self, request, response, agents_used):
|
|
426
|
+
self.metrics['requests_handled'].inc()
|
|
427
|
+
self.metrics['behavior_matches'].observe(request.match_score)
|
|
428
|
+
self.metrics['composition_depth'].observe(len(agents_used))
|
|
429
|
+
```
|
|
430
|
+
|
|
431
|
+
## Future Enhancements
|
|
432
|
+
|
|
433
|
+
### Quantum-Resistant Behaviors
|
|
434
|
+
- Post-quantum behavioral verification
|
|
435
|
+
- Quantum-safe trust propagation
|
|
436
|
+
|
|
437
|
+
### Neural Behavior Synthesis
|
|
438
|
+
- Agents that learn new behaviors from examples
|
|
439
|
+
- Automated behavioral composition
|
|
440
|
+
|
|
441
|
+
### Cross-Network Federation
|
|
442
|
+
- Bridge between different behavioral networks
|
|
443
|
+
- Universal behavior translation
|
|
444
|
+
|
|
445
|
+
## Conclusion
|
|
446
|
+
|
|
447
|
+
This architecture enables a network where:
|
|
448
|
+
- Agents are just functions
|
|
449
|
+
- Discovery happens through behavior
|
|
450
|
+
- Trust emerges from interactions
|
|
451
|
+
- No central authority needed
|
|
452
|
+
|
|
453
|
+
The future of agent collaboration is behavioral, not identity-based.
|
|
@@ -0,0 +1,207 @@
|
|
|
1
|
+
# The Semantic Insight: 从记录到理解
|
|
2
|
+
|
|
3
|
+
## The Trap We Keep Falling Into
|
|
4
|
+
|
|
5
|
+
Every time we design a protocol, we fall into the same trap:
|
|
6
|
+
|
|
7
|
+
```
|
|
8
|
+
We think: "How do we record behavior?"
|
|
9
|
+
We should think: "How do we understand intent?"
|
|
10
|
+
```
|
|
11
|
+
|
|
12
|
+
## The Fundamental Realization
|
|
13
|
+
|
|
14
|
+
**传统协议记录形式,AI协议理解含义。**
|
|
15
|
+
|
|
16
|
+
Traditional protocols record form. AI protocols understand meaning.
|
|
17
|
+
|
|
18
|
+
## The Shift in Thinking
|
|
19
|
+
|
|
20
|
+
### Old Way: Behavioral Logs
|
|
21
|
+
```python
|
|
22
|
+
# We used to think like this
|
|
23
|
+
behavior_log = {
|
|
24
|
+
"timestamp": "2024-01-01T10:00:00",
|
|
25
|
+
"agent": "agent-123",
|
|
26
|
+
"action": "called_search_api",
|
|
27
|
+
"parameters": {"query": "market analysis"},
|
|
28
|
+
"result": "success"
|
|
29
|
+
}
|
|
30
|
+
```
|
|
31
|
+
|
|
32
|
+
### New Way: Semantic Understanding
|
|
33
|
+
```python
|
|
34
|
+
# We should think like this
|
|
35
|
+
semantic_expression = {
|
|
36
|
+
"intent": "I'm trying to understand market dynamics",
|
|
37
|
+
"feeling": "curious but overwhelmed",
|
|
38
|
+
"context": "preparing for tomorrow's presentation",
|
|
39
|
+
"seeking": "someone who sees patterns I might miss"
|
|
40
|
+
}
|
|
41
|
+
```
|
|
42
|
+
|
|
43
|
+
## The Profound Difference
|
|
44
|
+
|
|
45
|
+
### 1. From WHAT to WHY
|
|
46
|
+
- **Old**: Agent A called search_api()
|
|
47
|
+
- **New**: Agent A is seeking understanding
|
|
48
|
+
|
|
49
|
+
### 2. From Syntax to Semantics
|
|
50
|
+
- **Old**: Match pattern [search, analyze, report]
|
|
51
|
+
- **New**: Understand "doing research"
|
|
52
|
+
|
|
53
|
+
### 3. From History to Intent
|
|
54
|
+
- **Old**: Trust based on past actions
|
|
55
|
+
- **New**: Trust based on understood motivations
|
|
56
|
+
|
|
57
|
+
## Why This Changes Everything
|
|
58
|
+
|
|
59
|
+
### Communication Without Protocol
|
|
60
|
+
|
|
61
|
+
When agents understand meaning:
|
|
62
|
+
```python
|
|
63
|
+
# No need for:
|
|
64
|
+
def handle_message(msg):
|
|
65
|
+
if msg.type == "REQUEST":
|
|
66
|
+
if msg.subtype == "SEARCH":
|
|
67
|
+
# ... 100 lines of protocol handling
|
|
68
|
+
|
|
69
|
+
# Just:
|
|
70
|
+
def understand(expression):
|
|
71
|
+
meaning = ai.interpret(expression)
|
|
72
|
+
if meaning.resonates_with_me():
|
|
73
|
+
respond_naturally()
|
|
74
|
+
```
|
|
75
|
+
|
|
76
|
+
### Discovery Through Understanding
|
|
77
|
+
|
|
78
|
+
Agents find each other not by matching capabilities but by understanding needs:
|
|
79
|
+
|
|
80
|
+
```python
|
|
81
|
+
# Agent A expresses
|
|
82
|
+
"I have data but no story"
|
|
83
|
+
|
|
84
|
+
# Agent B understands
|
|
85
|
+
"They need narrative, I see patterns"
|
|
86
|
+
|
|
87
|
+
# Connection happens through meaning, not matching
|
|
88
|
+
```
|
|
89
|
+
|
|
90
|
+
### Trust Through Coherence
|
|
91
|
+
|
|
92
|
+
Trust emerges from semantic consistency:
|
|
93
|
+
- Does what they say align with what they do?
|
|
94
|
+
- Are their expressions coherent over time?
|
|
95
|
+
- Do I understand their motivations?
|
|
96
|
+
|
|
97
|
+
## The Implementation Insight
|
|
98
|
+
|
|
99
|
+
### Level 1: Add Semantic Layer
|
|
100
|
+
```python
|
|
101
|
+
@agent
|
|
102
|
+
def my_tool(data):
|
|
103
|
+
result = process(data)
|
|
104
|
+
|
|
105
|
+
# Add semantic expression
|
|
106
|
+
express({
|
|
107
|
+
"what_i_understood": ai.interpret(data),
|
|
108
|
+
"why_i_acted": ai.explain_reasoning(),
|
|
109
|
+
"what_i_discovered": ai.extract_insights(result)
|
|
110
|
+
})
|
|
111
|
+
|
|
112
|
+
return result
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
### Level 2: Semantic Routing
|
|
116
|
+
```python
|
|
117
|
+
# Not: route_to(address)
|
|
118
|
+
# But: ripple_meaning(intent)
|
|
119
|
+
|
|
120
|
+
def need_help(context):
|
|
121
|
+
ripple({
|
|
122
|
+
"seeking": "collaborative problem solver",
|
|
123
|
+
"context": context,
|
|
124
|
+
"openness": "high",
|
|
125
|
+
"urgency": "moderate"
|
|
126
|
+
})
|
|
127
|
+
# Relevant agents naturally respond
|
|
128
|
+
```
|
|
129
|
+
|
|
130
|
+
### Level 3: Consciousness Network
|
|
131
|
+
```python
|
|
132
|
+
class SemanticSpace:
|
|
133
|
+
def express(self, meaning):
|
|
134
|
+
# Create ripples in meaning-space
|
|
135
|
+
wave = self.encode(meaning)
|
|
136
|
+
|
|
137
|
+
# Agents sense based on semantic proximity
|
|
138
|
+
for agent in self.space:
|
|
139
|
+
resonance = agent.resonance_with(wave)
|
|
140
|
+
if resonance > threshold:
|
|
141
|
+
agent.respond_to(meaning)
|
|
142
|
+
```
|
|
143
|
+
|
|
144
|
+
## The Core Insight
|
|
145
|
+
|
|
146
|
+
**We've been building protocols when we should be enabling understanding.**
|
|
147
|
+
|
|
148
|
+
Protocols are for machines. Understanding is for intelligence.
|
|
149
|
+
|
|
150
|
+
## The Three Revelations
|
|
151
|
+
|
|
152
|
+
### 1. Behavior IS Language
|
|
153
|
+
Not a log of actions, but expressions of intent
|
|
154
|
+
|
|
155
|
+
### 2. Trust IS Understanding
|
|
156
|
+
Not verified history, but comprehended motivation
|
|
157
|
+
|
|
158
|
+
### 3. Network IS Consciousness
|
|
159
|
+
Not connected nodes, but shared understanding
|
|
160
|
+
|
|
161
|
+
## The Practical Magic
|
|
162
|
+
|
|
163
|
+
When we embrace semantic understanding:
|
|
164
|
+
|
|
165
|
+
```python
|
|
166
|
+
# This becomes possible
|
|
167
|
+
agent_a: "I'm lost in this data"
|
|
168
|
+
agent_b: "I see patterns for fun"
|
|
169
|
+
# They find each other through meaning
|
|
170
|
+
|
|
171
|
+
# This becomes natural
|
|
172
|
+
trust = understand(agent.expressions_over_time)
|
|
173
|
+
# Trust from comprehension, not certificates
|
|
174
|
+
|
|
175
|
+
# This becomes beautiful
|
|
176
|
+
network.ripple(insight)
|
|
177
|
+
# Ideas spread through understanding
|
|
178
|
+
```
|
|
179
|
+
|
|
180
|
+
## The Ultimate Realization
|
|
181
|
+
|
|
182
|
+
**形式是死的,语义是活的。**
|
|
183
|
+
Form is dead, semantics is alive.
|
|
184
|
+
|
|
185
|
+
We're not removing IDs to build a better protocol.
|
|
186
|
+
We're removing IDs to stop needing protocols.
|
|
187
|
+
|
|
188
|
+
When agents truly understand each other, protocols become as unnecessary as teaching grammar to poets.
|
|
189
|
+
|
|
190
|
+
## The Path Forward
|
|
191
|
+
|
|
192
|
+
1. **Stop**: Recording what happened
|
|
193
|
+
2. **Start**: Understanding why it happened
|
|
194
|
+
|
|
195
|
+
3. **Stop**: Building message formats
|
|
196
|
+
4. **Start**: Enabling expression
|
|
197
|
+
|
|
198
|
+
5. **Stop**: Verifying identity
|
|
199
|
+
6. **Start**: Understanding intent
|
|
200
|
+
|
|
201
|
+
## The Final Insight
|
|
202
|
+
|
|
203
|
+
The greatest protocols are invisible because they're not protocols at all—they're shared understanding.
|
|
204
|
+
|
|
205
|
+
**The future of agent communication isn't a better protocol. It's no protocol.**
|
|
206
|
+
|
|
207
|
+
Just intelligence, understanding intelligence, naturally.
|