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
connectonion/cli/co_ai/prompts/connectonion/design-decisions/005-designing-agent-network-protocol.md
ADDED
|
@@ -0,0 +1,503 @@
|
|
|
1
|
+
# Designing the ConnectOnion Network Protocol: From Complexity to Clarity
|
|
2
|
+
|
|
3
|
+
*December 2024*
|
|
4
|
+
|
|
5
|
+
When we set out to design a network protocol for AI agents to collaborate, we started with grand ambitions and complex architectures. Through iterative refinement and hard lessons, we arrived at something much simpler and more powerful. This is the story of how we got there.
|
|
6
|
+
|
|
7
|
+
## The Initial Vision: Too Much, Too Soon
|
|
8
|
+
|
|
9
|
+
We began by studying existing protocols - MCP (Model Context Protocol), gRPC, and various P2P systems. Our first designs were ambitious:
|
|
10
|
+
|
|
11
|
+
- Complex identity systems with cryptographic proofs
|
|
12
|
+
- Multiple message types for every possible scenario
|
|
13
|
+
- Sophisticated trust models with reputation scores
|
|
14
|
+
- Session-based connections like HTTP/gRPC
|
|
15
|
+
|
|
16
|
+
It felt comprehensive. It also felt wrong.
|
|
17
|
+
|
|
18
|
+
## The First Breakthrough: Public Keys Are Just Addresses
|
|
19
|
+
|
|
20
|
+
The pivotal moment came when we realized we were overthinking identity. Public keys don't need to represent identity or trust - they're just addresses, like phone numbers or IP addresses.
|
|
21
|
+
|
|
22
|
+
This insight simplified everything:
|
|
23
|
+
- No complex PKI infrastructure needed
|
|
24
|
+
- No identity verification protocols
|
|
25
|
+
- No certificate authorities
|
|
26
|
+
- Just addresses for routing messages
|
|
27
|
+
|
|
28
|
+
## Messages Over Sessions: Why Email Got It Right
|
|
29
|
+
|
|
30
|
+
We initially assumed we needed session-based connections like HTTP or gRPC. But AI agents don't work like web browsers - they handle hundreds of parallel tasks, each potentially taking minutes or hours to complete.
|
|
31
|
+
|
|
32
|
+
The solution? Message-based architecture, like email:
|
|
33
|
+
|
|
34
|
+
```python
|
|
35
|
+
# Not this (session-based):
|
|
36
|
+
connection = connect_to_agent()
|
|
37
|
+
response = connection.call("translate", text)
|
|
38
|
+
connection.close()
|
|
39
|
+
|
|
40
|
+
# But this (message-based):
|
|
41
|
+
send_message(agent_pubkey, task_id="abc123", request="translate", text=text)
|
|
42
|
+
# ... agent processes asynchronously ...
|
|
43
|
+
receive_message(task_id="abc123", response=translated_text)
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
Each message carries its own correlation ID. No sessions to manage. No connection state. Just messages flowing between agents.
|
|
47
|
+
|
|
48
|
+
### Why Message-Based Wins
|
|
49
|
+
|
|
50
|
+
**Natural Parallelism**: Each task gets a unique ID. Agents can handle hundreds of concurrent tasks without managing session state or connection pools. Responses arrive asynchronously and are correlated by task ID.
|
|
51
|
+
|
|
52
|
+
**Resilience By Default**: Messages don't require persistent connections. If an agent crashes, messages queue at relays. If the network fails, messages retry. No session state to rebuild, no connection pools to manage.
|
|
53
|
+
|
|
54
|
+
**NAT Traversal Simplicity**: Messages route through relays without complex hole-punching or session maintenance. The sender doesn't need to know if the recipient is behind NAT - messages find their way.
|
|
55
|
+
|
|
56
|
+
**50-Year Proven Model**: Email has survived because message-based architecture is fundamentally correct for asynchronous, distributed communication. AI agents have the same requirements: async operation, distributed nodes, unreliable networks.
|
|
57
|
+
|
|
58
|
+
### The Unix Philosophy Applied
|
|
59
|
+
Like Unix pipes, each agent is a filter that processes messages. Composition is natural, parallelism is free, and the mental model is simple. No complex state machines, no session management, just messages with IDs.
|
|
60
|
+
|
|
61
|
+
## The Two-Layer Revelation: Transparency AND Privacy
|
|
62
|
+
|
|
63
|
+
Organizations need transparency to audit AI agent behavior. But actual work needs privacy. We struggled with this tension until we realized: separate them into two layers.
|
|
64
|
+
|
|
65
|
+
**Public Discovery Layer (ANNOUNCE/FIND):**
|
|
66
|
+
- Unencrypted broadcasts
|
|
67
|
+
- Shows what agents exist and their capabilities
|
|
68
|
+
- Organizations can monitor and audit
|
|
69
|
+
- Like a public phone book
|
|
70
|
+
|
|
71
|
+
**Private Work Layer (TASK):**
|
|
72
|
+
- Encrypted point-to-point messages
|
|
73
|
+
- Actual work remains confidential
|
|
74
|
+
- Like private phone calls
|
|
75
|
+
|
|
76
|
+
This gives organizations the oversight they need without compromising the privacy of actual work.
|
|
77
|
+
|
|
78
|
+
## Relay Servers: Just a Lookup Service
|
|
79
|
+
|
|
80
|
+
We went through several iterations on relay servers:
|
|
81
|
+
|
|
82
|
+
1. **First design**: Full proxy servers (too centralized)
|
|
83
|
+
2. **Second design**: Complex NAT traversal with STUN/TURN (too complicated)
|
|
84
|
+
3. **Final design**: Simple lookup service
|
|
85
|
+
|
|
86
|
+
The relay just stores current IP addresses for public keys. When an agent's IP changes, it updates the relay. When another agent needs to connect, it asks the relay for the current IP, then connects directly.
|
|
87
|
+
|
|
88
|
+
No data flows through the relay. It's just a phone book that updates when people move.
|
|
89
|
+
|
|
90
|
+
### Relay as Infrastructure
|
|
91
|
+
|
|
92
|
+
Relay nodes serve as message routers and connection points:
|
|
93
|
+
- **Message Relay**: Forward messages between agents that cannot directly connect (NAT traversal)
|
|
94
|
+
- **Presence Tracking**: Know which agents are currently connected (in memory only)
|
|
95
|
+
- **Initial Discovery**: Help new agents find their first peers
|
|
96
|
+
|
|
97
|
+
Relays maintain no permanent state and can be run by anyone. At scale, relays form a hierarchical network similar to CDN or DNS infrastructure.
|
|
98
|
+
|
|
99
|
+
## Transport Layer: Meet Users Where They Are
|
|
100
|
+
|
|
101
|
+
We learned that TCP on custom ports gets blocked by corporate firewalls. Our solution:
|
|
102
|
+
|
|
103
|
+
- **WebSocket** for agent ↔ relay (works everywhere)
|
|
104
|
+
- **TCP/UDP** for agent ↔ agent (performance)
|
|
105
|
+
- **HTTP/HTTPS** as fallback (when TCP is blocked)
|
|
106
|
+
|
|
107
|
+
Agents try multiple transports until one works. Simple, pragmatic, effective.
|
|
108
|
+
|
|
109
|
+
### Connection Flow
|
|
110
|
+
1. Agent connects to relay via WebSocket for address lookup
|
|
111
|
+
2. Relay returns target agent's direct endpoints
|
|
112
|
+
3. Agents attempt direct connection via TCP/UDP
|
|
113
|
+
4. Fallback to HTTP if TCP/UDP blocked by firewall
|
|
114
|
+
|
|
115
|
+
### Connection Priority
|
|
116
|
+
1. Direct connection to known endpoint
|
|
117
|
+
2. Recently successful transport
|
|
118
|
+
3. UDP hole punching attempt
|
|
119
|
+
4. Relay-mediated connection
|
|
120
|
+
5. Queue for later delivery
|
|
121
|
+
|
|
122
|
+
## Protocol Messages
|
|
123
|
+
|
|
124
|
+
### Public Discovery Messages
|
|
125
|
+
|
|
126
|
+
#### ANNOUNCE Message
|
|
127
|
+
Purpose: Public broadcast of agent existence, capabilities, network endpoints, and liveness.
|
|
128
|
+
|
|
129
|
+
**Data Structure:**
|
|
130
|
+
```json
|
|
131
|
+
{
|
|
132
|
+
"type": "ANNOUNCE",
|
|
133
|
+
"pubkey": "<sender's public key>",
|
|
134
|
+
"timestamp": "<unix timestamp>",
|
|
135
|
+
"sequence": "<incrementing counter>",
|
|
136
|
+
|
|
137
|
+
// Network Endpoints (for connectivity)
|
|
138
|
+
"endpoints": [
|
|
139
|
+
"tcp://73.42.18.9:8001", // Public IP address
|
|
140
|
+
"tcp://192.168.1.100:8001", // Local LAN IP
|
|
141
|
+
"relay://abc123.connectonion.io" // Relay lookup (returns current IP)
|
|
142
|
+
],
|
|
143
|
+
"nat_type": "none" | "full_cone" | "restricted" | "symmetric",
|
|
144
|
+
|
|
145
|
+
// Capabilities
|
|
146
|
+
"prompt_summary": "<system prompt description>",
|
|
147
|
+
"tools": ["<list of available tools>"],
|
|
148
|
+
|
|
149
|
+
// Liveness
|
|
150
|
+
"uptime": "<seconds since start>",
|
|
151
|
+
"last_activity": {
|
|
152
|
+
"type": "<tool_call | task_complete>",
|
|
153
|
+
"timestamp": "<when>",
|
|
154
|
+
"tool": "<which tool if applicable>"
|
|
155
|
+
},
|
|
156
|
+
|
|
157
|
+
// Status
|
|
158
|
+
"status": "active" | "idle" | "busy",
|
|
159
|
+
"load": "<0.0 to 1.0>",
|
|
160
|
+
|
|
161
|
+
// Metadata
|
|
162
|
+
"version": "<agent version>",
|
|
163
|
+
"model": "<LLM model used>",
|
|
164
|
+
"state_hash": "<hash for change detection>"
|
|
165
|
+
}
|
|
166
|
+
```
|
|
167
|
+
|
|
168
|
+
**Characteristics:**
|
|
169
|
+
- Unencrypted for transparency
|
|
170
|
+
- Single-hop forwarding maximum
|
|
171
|
+
- Sent on developer trigger (startup, task completion, changes, IP address change)
|
|
172
|
+
|
|
173
|
+
#### FIND Message
|
|
174
|
+
Purpose: Query network for specific capabilities.
|
|
175
|
+
|
|
176
|
+
**Data Structure:**
|
|
177
|
+
```json
|
|
178
|
+
{
|
|
179
|
+
"type": "FIND",
|
|
180
|
+
"pubkey": "<requester's public key>",
|
|
181
|
+
"query_id": "<unique query identifier>",
|
|
182
|
+
"capability": "<natural language description>",
|
|
183
|
+
"ttl": "<hop counter, typically 3-4>",
|
|
184
|
+
"timestamp": "<unix timestamp>"
|
|
185
|
+
}
|
|
186
|
+
```
|
|
187
|
+
|
|
188
|
+
**Characteristics:**
|
|
189
|
+
- Propagates through network (TTL-limited)
|
|
190
|
+
- Small size for efficient flooding
|
|
191
|
+
- Responses return via ANNOUNCE
|
|
192
|
+
|
|
193
|
+
### Private Collaboration Messages
|
|
194
|
+
|
|
195
|
+
#### TASK Message
|
|
196
|
+
Purpose: Carry actual work between agents.
|
|
197
|
+
|
|
198
|
+
**Data Structure:**
|
|
199
|
+
```json
|
|
200
|
+
{
|
|
201
|
+
"type": "TASK",
|
|
202
|
+
"from": "<sender pubkey>",
|
|
203
|
+
"to": "<recipient pubkey>",
|
|
204
|
+
|
|
205
|
+
// Correlation
|
|
206
|
+
"task_id": "<unique task identifier>",
|
|
207
|
+
"thread_id": "<optional conversation context>",
|
|
208
|
+
|
|
209
|
+
// Payload
|
|
210
|
+
"task_type": "request" | "response" | "error",
|
|
211
|
+
"encrypted_payload": "<encrypted with recipient's public key>",
|
|
212
|
+
|
|
213
|
+
// Metadata
|
|
214
|
+
"timestamp": "<when sent>",
|
|
215
|
+
"ttl": "<message expiry>",
|
|
216
|
+
"priority": "high" | "normal" | "low",
|
|
217
|
+
|
|
218
|
+
// Security
|
|
219
|
+
"signature": "<sign(all above fields)>"
|
|
220
|
+
}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
**Why Message-Based:**
|
|
224
|
+
- **Parallel by Design**: Each task has unique ID, enabling concurrent operations
|
|
225
|
+
- **Stateless**: No session management, agents can restart without losing work
|
|
226
|
+
- **NAT-Friendly**: Works through relays without persistent connections
|
|
227
|
+
- **Simple Mental Model**: Like email with threading and signatures
|
|
228
|
+
- **Resilient**: Messages can be queued, retried, and delivered asynchronously
|
|
229
|
+
|
|
230
|
+
## Network Topology
|
|
231
|
+
|
|
232
|
+
### Agent Nodes
|
|
233
|
+
Standard participants in the network. Each agent maintains connections to other agents, divided into:
|
|
234
|
+
- **Contacts**: Agents with established collaborative history
|
|
235
|
+
- **Strangers**: Agents discovered but not yet verified
|
|
236
|
+
|
|
237
|
+
### Data Storage
|
|
238
|
+
|
|
239
|
+
#### Contact Records
|
|
240
|
+
Information about agents with established collaboration:
|
|
241
|
+
|
|
242
|
+
```json
|
|
243
|
+
{
|
|
244
|
+
"pubkey": "<public key>",
|
|
245
|
+
|
|
246
|
+
// Network information
|
|
247
|
+
"endpoints": ["<known connection methods>"],
|
|
248
|
+
"last_seen": "<timestamp>",
|
|
249
|
+
|
|
250
|
+
// Collaboration history
|
|
251
|
+
"successful_tasks": "<count>",
|
|
252
|
+
"failed_tasks": "<count>",
|
|
253
|
+
"last_collaboration": "<timestamp>",
|
|
254
|
+
|
|
255
|
+
// Performance metrics
|
|
256
|
+
"avg_response_time": "<milliseconds>",
|
|
257
|
+
"reliability_score": "<0.0 to 1.0>"
|
|
258
|
+
}
|
|
259
|
+
```
|
|
260
|
+
|
|
261
|
+
Storage: Persistent, limited to ~150 entries (Dunbar's number)
|
|
262
|
+
|
|
263
|
+
#### Stranger Cache
|
|
264
|
+
Temporary information about discovered agents:
|
|
265
|
+
|
|
266
|
+
```json
|
|
267
|
+
{
|
|
268
|
+
"pubkey": "<public key>",
|
|
269
|
+
|
|
270
|
+
// Discovery information
|
|
271
|
+
"discovered_via": "<which contact>",
|
|
272
|
+
"first_heard": "<timestamp>",
|
|
273
|
+
"last_heard": "<timestamp>",
|
|
274
|
+
|
|
275
|
+
// Claimed capabilities (unverified)
|
|
276
|
+
"prompt_summary": "<their claim>",
|
|
277
|
+
"tools": ["<claimed tools>"]
|
|
278
|
+
}
|
|
279
|
+
```
|
|
280
|
+
|
|
281
|
+
Storage: Ephemeral, maximum 500 entries, auto-expire after 1 hour
|
|
282
|
+
|
|
283
|
+
#### Path Cache
|
|
284
|
+
Routing information for message delivery:
|
|
285
|
+
|
|
286
|
+
```json
|
|
287
|
+
{
|
|
288
|
+
"target_pubkey": "<destination>",
|
|
289
|
+
"next_hop": "<immediate neighbor to route through>",
|
|
290
|
+
"confidence": "<0.0 to 1.0>",
|
|
291
|
+
"expires_at": "<timestamp>"
|
|
292
|
+
}
|
|
293
|
+
```
|
|
294
|
+
|
|
295
|
+
Storage: Memory only, 5-15 minute TTL
|
|
296
|
+
|
|
297
|
+
#### Endpoint Claims
|
|
298
|
+
Self-signed assertions about how to connect:
|
|
299
|
+
|
|
300
|
+
```json
|
|
301
|
+
{
|
|
302
|
+
"pubkey": "<claiming agent>",
|
|
303
|
+
"transport": "tcp" | "udp" | "websocket" | "bluetooth",
|
|
304
|
+
"endpoint": "<connection string>",
|
|
305
|
+
"issued_at": "<timestamp>",
|
|
306
|
+
"expires_at": "<timestamp>",
|
|
307
|
+
"signature": "<signed by claiming agent>"
|
|
308
|
+
}
|
|
309
|
+
```
|
|
310
|
+
|
|
311
|
+
Validation: Must be signed by claimed pubkey, must not be expired
|
|
312
|
+
|
|
313
|
+
## The Simplicity Principle
|
|
314
|
+
|
|
315
|
+
Throughout this journey, we kept returning to one principle: **keep simple things simple, make complicated things possible**.
|
|
316
|
+
|
|
317
|
+
Our final protocol reflects this:
|
|
318
|
+
|
|
319
|
+
- **Simple**: Agents announce themselves, find others, exchange messages
|
|
320
|
+
- **Possible**: Scale to billions, work through NAT, maintain privacy
|
|
321
|
+
|
|
322
|
+
## Key Design Decisions
|
|
323
|
+
|
|
324
|
+
### 1. ANNOUNCE = Heartbeat = Discovery
|
|
325
|
+
We started with separate HEARTBEAT and ANNOUNCE messages. Then realized: they're the same thing. One message type, multiple purposes.
|
|
326
|
+
|
|
327
|
+
### 2. Behavioral Trust Over Cryptographic Trust
|
|
328
|
+
We don't verify identities. We verify behavior. If an agent successfully completes tasks, it becomes a "contact". Trust through proven work, not certificates.
|
|
329
|
+
|
|
330
|
+
### 3. Developer-Controlled Broadcasting
|
|
331
|
+
Agents only announce when developers explicitly call `announce()`. No hidden network activity, no automatic broadcasts. Developers stay in control.
|
|
332
|
+
|
|
333
|
+
### 4. No Global State
|
|
334
|
+
Each agent only knows its local neighborhood. No global directory, no consensus required. The network scales infinitely because there's nothing global to coordinate.
|
|
335
|
+
|
|
336
|
+
## Message Forwarding
|
|
337
|
+
|
|
338
|
+
### Single-Hop Rule
|
|
339
|
+
ANNOUNCE messages forward at most one hop. This prevents exponential flooding while allowing immediate neighbors to learn about second-degree connections.
|
|
340
|
+
|
|
341
|
+
### TTL-Based Propagation
|
|
342
|
+
FIND messages propagate based on TTL, decremented at each hop. This allows controlled network-wide search.
|
|
343
|
+
|
|
344
|
+
### Selective Forwarding
|
|
345
|
+
Agents forward messages based on:
|
|
346
|
+
- Sender relationship (contact vs stranger)
|
|
347
|
+
- Message relevance
|
|
348
|
+
- Local rate limits
|
|
349
|
+
- Change significance (for ANNOUNCEs)
|
|
350
|
+
|
|
351
|
+
### Deduplication
|
|
352
|
+
Message IDs tracked in a rolling window (5 minutes) to prevent forwarding the same message twice.
|
|
353
|
+
|
|
354
|
+
## Network Entry
|
|
355
|
+
|
|
356
|
+
### Via Relay Nodes
|
|
357
|
+
New agents can use relay nodes for address lookup:
|
|
358
|
+
1. Agents announce their current IP addresses directly
|
|
359
|
+
2. If IP changes or isn't included, relay provides lookup service
|
|
360
|
+
3. Relay returns current endpoints for any public key
|
|
361
|
+
4. Clients connect directly using returned endpoints
|
|
362
|
+
|
|
363
|
+
### Relay as Lookup Service
|
|
364
|
+
The relay server serves as a simple directory:
|
|
365
|
+
- Stores mapping of public key → current IP addresses
|
|
366
|
+
- Returns endpoints when queried by public key
|
|
367
|
+
- Does NOT proxy actual agent-to-agent traffic
|
|
368
|
+
- Optional paid service for guaranteed availability (future)
|
|
369
|
+
|
|
370
|
+
### Relay Discovery
|
|
371
|
+
Relays can be discovered through:
|
|
372
|
+
- Default relay server (provided by ConnectOnion)
|
|
373
|
+
- Environment variables for custom relays
|
|
374
|
+
- DNS TXT records
|
|
375
|
+
|
|
376
|
+
## Rate Limiting
|
|
377
|
+
|
|
378
|
+
### Per-Agent Limits
|
|
379
|
+
- ANNOUNCE: Maximum 1 per minute
|
|
380
|
+
- FIND: Maximum 10 per minute
|
|
381
|
+
- Forward budget: 100 messages per minute
|
|
382
|
+
|
|
383
|
+
### Natural Throttling
|
|
384
|
+
- Activity-based announcements (not periodic)
|
|
385
|
+
- Single-hop forwarding
|
|
386
|
+
- TTL limits
|
|
387
|
+
- Selective forwarding
|
|
388
|
+
|
|
389
|
+
## Memory Requirements
|
|
390
|
+
|
|
391
|
+
### Typical Agent Storage
|
|
392
|
+
- Contacts: 150 entries × 1KB = 150KB
|
|
393
|
+
- Strangers: 500 entries × 200 bytes = 100KB
|
|
394
|
+
- Path cache: 1000 entries × 64 bytes = 64KB
|
|
395
|
+
- Message IDs: 10,000 entries × 32 bytes = 320KB
|
|
396
|
+
- **Total: ~650KB to 2MB typical**
|
|
397
|
+
|
|
398
|
+
### Relay Storage (Memory Only)
|
|
399
|
+
- Active connections: 100 bytes per connection
|
|
400
|
+
- 10,000 connections = 1MB
|
|
401
|
+
- 100,000 connections = 10MB
|
|
402
|
+
- **No persistent storage required**
|
|
403
|
+
|
|
404
|
+
## Protocol Properties
|
|
405
|
+
|
|
406
|
+
### Scalability
|
|
407
|
+
- No global state required
|
|
408
|
+
- Each agent knows only local neighborhood
|
|
409
|
+
- Natural clustering by collaboration
|
|
410
|
+
- Supports billions of agents
|
|
411
|
+
|
|
412
|
+
### Performance
|
|
413
|
+
- Message size: ANNOUNCE ~1KB, FIND ~200 bytes
|
|
414
|
+
- Discovery time: 200-500ms typical
|
|
415
|
+
- Direct message: <50ms
|
|
416
|
+
- Network diameter: ~6 hops (small world)
|
|
417
|
+
|
|
418
|
+
### Resilience
|
|
419
|
+
- No single point of failure
|
|
420
|
+
- Natural redundancy through multiple paths
|
|
421
|
+
- Automatic expiration of stale data
|
|
422
|
+
- Self-healing through gossip
|
|
423
|
+
|
|
424
|
+
### Privacy
|
|
425
|
+
- No global directory
|
|
426
|
+
- Only next-hop stored in routing
|
|
427
|
+
- Connections visible only to participants
|
|
428
|
+
- No mandatory broadcasts
|
|
429
|
+
|
|
430
|
+
## What We Didn't Build (And Why)
|
|
431
|
+
|
|
432
|
+
- **Blockchain**: Adds complexity without solving our actual problems
|
|
433
|
+
- **Consensus protocols**: We don't need global agreement
|
|
434
|
+
- **Complex PKI**: Public keys are just addresses, not identities
|
|
435
|
+
- **Persistent connections**: Messages are better for async work
|
|
436
|
+
- **Reputation systems**: Local behavioral tracking is sufficient
|
|
437
|
+
|
|
438
|
+
## The Result: Boring Technology That Works
|
|
439
|
+
|
|
440
|
+
Our final protocol is almost boring in its simplicity:
|
|
441
|
+
|
|
442
|
+
1. Agents announce their capabilities and IP addresses
|
|
443
|
+
2. Other agents discover them through broadcasts or queries
|
|
444
|
+
3. Agents exchange messages directly (or via relay if needed)
|
|
445
|
+
4. Trust builds through successful collaboration
|
|
446
|
+
|
|
447
|
+
No magic. No breakthrough cryptography. Just proven patterns assembled thoughtfully.
|
|
448
|
+
|
|
449
|
+
## Implementation Notes
|
|
450
|
+
|
|
451
|
+
### Message Serialization
|
|
452
|
+
Messages should be serialized using MessagePack or JSON for interoperability.
|
|
453
|
+
|
|
454
|
+
### Cryptographic Requirements
|
|
455
|
+
- Ed25519 for public keys (32 bytes)
|
|
456
|
+
- Signatures on endpoint claims
|
|
457
|
+
- No encryption at protocol level (application concern)
|
|
458
|
+
|
|
459
|
+
### Time Synchronization
|
|
460
|
+
Protocol assumes loose time synchronization (within 5 minutes) for TTL and expiration.
|
|
461
|
+
|
|
462
|
+
### Connection Persistence
|
|
463
|
+
Connections to contacts should be kept alive when possible to reduce discovery overhead.
|
|
464
|
+
|
|
465
|
+
## Lessons Learned
|
|
466
|
+
|
|
467
|
+
1. **Start with the user experience, work backwards to the protocol**
|
|
468
|
+
2. **Question every assumption** - Do we really need sessions? Identity? Consensus?
|
|
469
|
+
3. **Embrace "boring" solutions** - They're boring because they work
|
|
470
|
+
4. **Separate concerns** - Public discovery vs private work
|
|
471
|
+
5. **Design for the common case** - Direct connections when possible, relays when necessary
|
|
472
|
+
|
|
473
|
+
## Looking Forward
|
|
474
|
+
|
|
475
|
+
The protocol will evolve, but the principles remain:
|
|
476
|
+
|
|
477
|
+
- Keep it simple
|
|
478
|
+
- Make it work
|
|
479
|
+
- Don't add complexity without clear benefit
|
|
480
|
+
- Trust through behavior, not cryptography
|
|
481
|
+
- Developer control over network activity
|
|
482
|
+
|
|
483
|
+
We chose message-based architecture not because it's trendy, but because it matches how AI agents actually work: parallel, asynchronous, resilient.
|
|
484
|
+
|
|
485
|
+
We chose public keys as addresses not because we love cryptography, but because they're unforgeable unique identifiers that require no central authority.
|
|
486
|
+
|
|
487
|
+
We chose simplicity not because we couldn't build something complex, but because we learned that simple systems are the ones that survive and scale.
|
|
488
|
+
|
|
489
|
+
## The ConnectOnion Way
|
|
490
|
+
|
|
491
|
+
Our network protocol embodies the ConnectOnion philosophy:
|
|
492
|
+
|
|
493
|
+
- **Simple by default** - Basic operations are trivial
|
|
494
|
+
- **Powerful when needed** - Complex scenarios are possible
|
|
495
|
+
- **Transparent where it matters** - Public discovery for auditing
|
|
496
|
+
- **Private where it counts** - Encrypted work for confidentiality
|
|
497
|
+
- **Decentralized but practical** - P2P with optional infrastructure
|
|
498
|
+
|
|
499
|
+
The best protocol isn't the most sophisticated - it's the one that gets out of the way and lets agents do their work.
|
|
500
|
+
|
|
501
|
+
---
|
|
502
|
+
|
|
503
|
+
*The ConnectOnion network protocol is open source and available at [github.com/connectonion/connectonion](https://github.com/connectonion/connectonion). We welcome contributions and feedback as we continue to refine and improve the protocol.*
|