continuum-agent-sdk 1.0.0__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.
Files changed (41) hide show
  1. continuum/__init__.py +14 -0
  2. continuum/py.typed +2 -0
  3. continuum_agent_sdk-1.0.0.dist-info/METADATA +116 -0
  4. continuum_agent_sdk-1.0.0.dist-info/RECORD +41 -0
  5. continuum_agent_sdk-1.0.0.dist-info/WHEEL +4 -0
  6. continuum_sdk/__init__.py +83 -0
  7. continuum_sdk/agent/__init__.py +70 -0
  8. continuum_sdk/agent/intelligent.py +529 -0
  9. continuum_sdk/agent/planner.py +442 -0
  10. continuum_sdk/agent/progress.py +291 -0
  11. continuum_sdk/agent/runtime.py +689 -0
  12. continuum_sdk/agent/self_correction.py +425 -0
  13. continuum_sdk/agent/session.py +413 -0
  14. continuum_sdk/config/__init__.py +77 -0
  15. continuum_sdk/config/loader.py +516 -0
  16. continuum_sdk/config/providers.py +125 -0
  17. continuum_sdk/examples/README.md +27 -0
  18. continuum_sdk/examples/__init__.py +1 -0
  19. continuum_sdk/examples/advanced/__init__.py +1 -0
  20. continuum_sdk/examples/advanced/custom_tools.py +155 -0
  21. continuum_sdk/examples/advanced/workflow.py +161 -0
  22. continuum_sdk/examples/basic/__init__.py +1 -0
  23. continuum_sdk/examples/basic/hello_agent.py +36 -0
  24. continuum_sdk/examples/basic/hello_world.py +25 -0
  25. continuum_sdk/examples/basic/session_example.py +67 -0
  26. continuum_sdk/llm/__init__.py +65 -0
  27. continuum_sdk/llm/client.py +781 -0
  28. continuum_sdk/llm/errors.py +200 -0
  29. continuum_sdk/llm/types.py +223 -0
  30. continuum_sdk/memory/__init__.py +13 -0
  31. continuum_sdk/memory/layers.py +302 -0
  32. continuum_sdk/py.typed +2 -0
  33. continuum_sdk/tools/__init__.py +86 -0
  34. continuum_sdk/tools/bash.py +266 -0
  35. continuum_sdk/tools/builtin.py +291 -0
  36. continuum_sdk/tools/custom.py +275 -0
  37. continuum_sdk/tools/file_ops.py +476 -0
  38. continuum_sdk/tools/search.py +287 -0
  39. continuum_sdk/tools/types.py +85 -0
  40. continuum_sdk/workflow/__init__.py +14 -0
  41. continuum_sdk/workflow/dag.py +432 -0
continuum/__init__.py ADDED
@@ -0,0 +1,14 @@
1
+ """
2
+ Continuum - Terminal Agent Framework
3
+
4
+ Quick Start (3 steps):
5
+ >>> from continuum import Agent
6
+ >>> agent = Agent()
7
+ >>> agent.run("hello")
8
+ """
9
+
10
+ # Re-export from continuum_sdk
11
+ from continuum_sdk import Agent, Session, Config, ConfigLoader
12
+
13
+ __version__ = "0.1.0"
14
+ __all__ = ["Agent", "Session", "Config", "ConfigLoader"]
continuum/py.typed ADDED
@@ -0,0 +1,2 @@
1
+ # Marker file for PEP 561.
2
+ # This indicates that the package supports type checking.
@@ -0,0 +1,116 @@
1
+ Metadata-Version: 2.4
2
+ Name: continuum-agent-sdk
3
+ Version: 1.0.0
4
+ Summary: Production-Grade Agent Framework with Crash Safety Guarantees
5
+ Project-URL: Homepage, https://github.com/continuum-ai/continuum
6
+ Project-URL: Documentation, https://continuum-agent-sdk.readthedocs.io
7
+ Project-URL: Repository, https://github.com/continuum-ai/continuum
8
+ Project-URL: Issues, https://github.com/continuum-ai/continuum/issues
9
+ Author: Continuum Team
10
+ License: MIT
11
+ Classifier: Development Status :: 4 - Beta
12
+ Classifier: Intended Audience :: Developers
13
+ Classifier: License :: OSI Approved :: MIT License
14
+ Classifier: Programming Language :: Python :: 3
15
+ Classifier: Programming Language :: Python :: 3.10
16
+ Classifier: Programming Language :: Python :: 3.11
17
+ Classifier: Programming Language :: Python :: 3.12
18
+ Classifier: Programming Language :: Python :: 3.13
19
+ Classifier: Topic :: Scientific/Engineering :: Artificial Intelligence
20
+ Classifier: Topic :: Software Development :: Libraries :: Python Modules
21
+ Requires-Python: >=3.10
22
+ Requires-Dist: httpx>=0.25.0
23
+ Requires-Dist: pydantic>=2.0.0
24
+ Requires-Dist: toml>=0.10.0
25
+ Provides-Extra: dev
26
+ Requires-Dist: pytest-asyncio>=0.21.0; extra == 'dev'
27
+ Requires-Dist: pytest-cov>=4.0.0; extra == 'dev'
28
+ Requires-Dist: pytest>=7.0.0; extra == 'dev'
29
+ Description-Content-Type: text/markdown
30
+
31
+ # Continuum Python SDK
32
+
33
+ A production-grade agent framework with crash safety guarantees.
34
+
35
+ ## Quick Start (3 steps)
36
+
37
+ ```python
38
+ from continuum import Agent
39
+
40
+ agent = Agent() # Auto-loads config from environment
41
+ result = agent.run("your task")
42
+ ```
43
+
44
+ ## Installation
45
+
46
+ ```bash
47
+ pip install continuum
48
+ ```
49
+
50
+ ## Configuration
51
+
52
+ ### Environment Variables
53
+
54
+ Priority: `CONTINUUM_*` > `CONTINUUM_*` > `ANTHROPIC_*`
55
+
56
+ ```bash
57
+ export CONTINUUM_API_KEY=your_api_key
58
+ export CONTINUUM_PROVIDER=anthropic # or openai, google
59
+ export CONTINUUM_MODEL=claude-sonnet-4-6
60
+ ```
61
+
62
+ ### Config File
63
+
64
+ Create `~/.continuum/config.toml`:
65
+
66
+ ```toml
67
+ [providers.anthropic]
68
+ api_key = "${ANTHROPIC_API_KEY}"
69
+ base_url = "https://api.anthropic.com/v1"
70
+ model = "claude-sonnet-4-6"
71
+
72
+ [providers.openai]
73
+ api_key = "${OPENAI_API_KEY}"
74
+ base_url = "https://api.openai.com/v1"
75
+ model = "gpt-4"
76
+
77
+ [settings]
78
+ session_auto_save = true
79
+ checkpoint_enabled = true
80
+ audit_enabled = true
81
+ ```
82
+
83
+ ## Features
84
+
85
+ - **Agent**: One-line agent creation with automatic configuration
86
+ - **Session**: Conversation history management with checkpoint support
87
+ - **Tools**: Built-in and custom tool registration
88
+ - **Memory**: Multi-layer memory system (episodic, semantic, procedural)
89
+ - **Config**: Multi-provider configuration with environment variable support
90
+
91
+ ## API Reference
92
+
93
+ ```python
94
+ from continuum import Agent, Session, Config
95
+
96
+ # Agent
97
+ agent = Agent(name="my-agent", model="claude-sonnet-4-6")
98
+ agent.run("task description") # One-shot task execution
99
+ agent.chat("message") # Interactive chat
100
+ agent.start() # Start agent runtime
101
+
102
+ # Session
103
+ session = agent.create_session()
104
+ session.add_message("user", "Hello")
105
+ session.save() # Persist to storage
106
+ session.load(session_id) # Resume session
107
+
108
+ # Config
109
+ config = Config.from_env() # Load from environment
110
+ config = Config.from_file("~/.continuum/config.toml") # Load from file
111
+ config.use("openai") # Switch provider
112
+ ```
113
+
114
+ ## License
115
+
116
+ MIT License
@@ -0,0 +1,41 @@
1
+ continuum/__init__.py,sha256=m73GAWqniS9Q7HgZ8o6bd-J7Cj-doyfu7Y60TEImzFI,331
2
+ continuum/py.typed,sha256=K_WkxwlHP-x-yksjUd1vqx0E0Z-fPeaaWQGbTUDurIY,84
3
+ continuum_sdk/__init__.py,sha256=fti8zlLK5sxXmly887pZMUVES-Ip-usgbCW31DfFkGY,1742
4
+ continuum_sdk/py.typed,sha256=K_WkxwlHP-x-yksjUd1vqx0E0Z-fPeaaWQGbTUDurIY,84
5
+ continuum_sdk/agent/__init__.py,sha256=LoTmwM0P1xXG8C2djZFm-9Gl782zcYUHMxAH5OiZ4oI,1418
6
+ continuum_sdk/agent/intelligent.py,sha256=HeIMQy80HnqRHpgDSTRc2KaBAKGzatDKNpIO4RMfoqg,17947
7
+ continuum_sdk/agent/planner.py,sha256=JHs94NxAjdV2Lla7RmsPftpuNZD0to1pke_B-knJmWg,14133
8
+ continuum_sdk/agent/progress.py,sha256=J-ezF8EE3vsfOgNnPAeO3ZE90_UomrH5f2Xrj7xmHpg,8859
9
+ continuum_sdk/agent/runtime.py,sha256=TDiRFUm8r9b7SI9vF60m3Cgp4zdyMWT3tnIDM9O7MWQ,21803
10
+ continuum_sdk/agent/self_correction.py,sha256=0Y71FzL_4J9hQEW-mMZy8zpYcztjSfC_cvjHfbhtxdg,13721
11
+ continuum_sdk/agent/session.py,sha256=5MsTS4fDeQH-oJpK07aDfV58EoB4pgwRaOpQxHOHNR8,11913
12
+ continuum_sdk/config/__init__.py,sha256=4RtLwcccPqodhLQLovw5fDClWgzAPk80Ur2dJ0Vq_4o,1924
13
+ continuum_sdk/config/loader.py,sha256=RvzL0W27Ota6RUO-gJCRFQb4llKR-tef-SbmLaW8PdQ,15724
14
+ continuum_sdk/config/providers.py,sha256=SEdkjqzIKKbUZ_Yh9xrY-Lm_CDtVtuFIlwOw_rCu6fk,3155
15
+ continuum_sdk/examples/README.md,sha256=JDuqyG8ELS7f0E4Mb7QKyW7he4lnTsltMnpjQSz30PU,458
16
+ continuum_sdk/examples/__init__.py,sha256=YpdJ4C1H9VExzq5KgqWf2rXTPCQKVomAA_0yT9e6ymQ,33
17
+ continuum_sdk/examples/advanced/__init__.py,sha256=O0PatRaxuUDzXfiZfZabBCA7cEX2xKoEIC3tBTW7sDI,19
18
+ continuum_sdk/examples/advanced/custom_tools.py,sha256=wALSz1zpabTrydjCByLp2HdNrAWz0AAIg9993E9Nmh0,4289
19
+ continuum_sdk/examples/advanced/workflow.py,sha256=KQrAQerqQeRp1cBphlqGjF99Cr7gOjljn5lJaec90Hc,4940
20
+ continuum_sdk/examples/basic/__init__.py,sha256=R62-z_ouytRvA1cOhlJBrKr-m2HKh1RUsCD9flJ8ZIQ,19
21
+ continuum_sdk/examples/basic/hello_agent.py,sha256=SLMYw5lFX69nli8__DzV-m07V9GZvS7ORWIWAKjbbZk,742
22
+ continuum_sdk/examples/basic/hello_world.py,sha256=VAvCH3Me1w7orQXxwmBGD83jONvRhZ1IUsP7jv7arOE,560
23
+ continuum_sdk/examples/basic/session_example.py,sha256=dH2Aiw9y_J0-J7hE4rroFI4emkl97MT-oF5Fao8APTA,1903
24
+ continuum_sdk/llm/__init__.py,sha256=iM6JvYXvpZeInugOO33BdHdZniD_15iB47e-X8Sew7g,1214
25
+ continuum_sdk/llm/client.py,sha256=o27xeGArevi1N-fgXIbPvj1DgdYFhyhyFl4GBUfx2iw,23767
26
+ continuum_sdk/llm/errors.py,sha256=eNBLR-wx0gaPmLvX-5MJ6ezfVwIlZEPXUoh-qgtpUyg,4556
27
+ continuum_sdk/llm/types.py,sha256=2ChlPdRlv9kNrVywVcowQXlMzswEuAxx5YUI8x8iV6A,6799
28
+ continuum_sdk/memory/__init__.py,sha256=Yf_wXnpwwCnppST9RwTVJgM4q0qVcSy9vqTrzj6lEDs,215
29
+ continuum_sdk/memory/layers.py,sha256=KzvNAIolaIk4rz24vZIQps6ibOCU0G_TB-7LOFewunU,8199
30
+ continuum_sdk/tools/__init__.py,sha256=ZSmWG6w9g3LMIR3Q7nuSu40jpwHjO0ydvTx063Wkc3Q,1843
31
+ continuum_sdk/tools/bash.py,sha256=LZVtmfJduFse020Y9DNtaGdBP1PBtBozZDaBAeASE7c,7324
32
+ continuum_sdk/tools/builtin.py,sha256=MX6nmVdeWuvYWQBKw_e9ImV3W1CXVRcQFII_JgSYDQI,7852
33
+ continuum_sdk/tools/custom.py,sha256=acIpF9kUZm5GiihPeiNSl1c0wKmt3p0qU6bllLHB6qo,7236
34
+ continuum_sdk/tools/file_ops.py,sha256=OB2cQ5LRxfMuaFiPry_pCb3Jz04DUXt2iwr7KIF3adU,12342
35
+ continuum_sdk/tools/search.py,sha256=WuRbM4q9qSQro3nHkgJs5ytpwlKN7Al4srDSlN7diKM,8008
36
+ continuum_sdk/tools/types.py,sha256=kM9qjPRjFEqpToM6YtFugYXombhK1GMlyIhtJZqATyI,2038
37
+ continuum_sdk/workflow/__init__.py,sha256=374CoMru4jLoMgdoNB-QdqlRSKss34p_Jh83G86eZPk,220
38
+ continuum_sdk/workflow/dag.py,sha256=4xvAfQW9jzjk5NDGRyhkIrgUbd3Wp17kj3dNmfrwXLQ,11776
39
+ continuum_agent_sdk-1.0.0.dist-info/METADATA,sha256=Et-AkuT7QNG-lZDTmnElFjlYrMgNzOAiOxeaB1qP0BE,3219
40
+ continuum_agent_sdk-1.0.0.dist-info/WHEEL,sha256=QccIxa26bgl1E6uMy58deGWi-0aeIkkangHcxk2kWfw,87
41
+ continuum_agent_sdk-1.0.0.dist-info/RECORD,,
@@ -0,0 +1,4 @@
1
+ Wheel-Version: 1.0
2
+ Generator: hatchling 1.29.0
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
@@ -0,0 +1,83 @@
1
+ """
2
+ Continuum SDK
3
+
4
+ Python SDK for Continuum - A terminal agent framework with real LLM calls.
5
+
6
+ Features:
7
+ - Real LLM API calls (Anthropic, OpenAI, Gemini)
8
+ - Streaming response support
9
+ - Tool registration and function calling
10
+ - Session persistence and recovery
11
+ - Multi-provider configuration
12
+
13
+ Quick Start (3 steps):
14
+ >>> from continuum import Agent
15
+ >>> agent = Agent() # Auto-configures from environment
16
+ >>> result = agent.run("hello")
17
+
18
+ With explicit configuration:
19
+ >>> from continuum import Agent, Config
20
+ >>> config = Config.from_env()
21
+ >>> agent = Agent(config=config)
22
+
23
+ Streaming:
24
+ >>> async for chunk in agent.run_stream("hello"):
25
+ ... print(chunk.content)
26
+
27
+ Tools:
28
+ >>> agent.register_tool(
29
+ ... "calc",
30
+ ... lambda x: eval(x),
31
+ ... description="Evaluate math expressions",
32
+ ... parameters={"type": "object", "properties": {"expression": {"type": "string"}}}
33
+ ... )
34
+ """
35
+
36
+ __version__ = "1.0.0"
37
+
38
+ # Core classes
39
+ from .agent import Agent, Session
40
+ from .config import (
41
+ Config,
42
+ ConfigLoader,
43
+ load_config,
44
+ list_providers,
45
+ get_default_model,
46
+ )
47
+
48
+ # LLM module (for advanced usage)
49
+ from .llm import (
50
+ LlmClient,
51
+ AnthropicClient,
52
+ OpenAIClient,
53
+ GeminiClient,
54
+ Message,
55
+ MessageRole,
56
+ ChatResponse,
57
+ StreamChunk,
58
+ TokenUsage,
59
+ LlmError,
60
+ )
61
+
62
+ __all__ = [
63
+ # Core
64
+ "Agent",
65
+ "Session",
66
+ # Config
67
+ "Config",
68
+ "ConfigLoader",
69
+ "load_config",
70
+ "list_providers",
71
+ "get_default_model",
72
+ # LLM (advanced)
73
+ "LlmClient",
74
+ "AnthropicClient",
75
+ "OpenAIClient",
76
+ "GeminiClient",
77
+ "Message",
78
+ "MessageRole",
79
+ "ChatResponse",
80
+ "StreamChunk",
81
+ "TokenUsage",
82
+ "LlmError",
83
+ ]
@@ -0,0 +1,70 @@
1
+ """
2
+ Agent Module
3
+
4
+ Provides Agent classes for interacting with Continuum.
5
+
6
+ Classes:
7
+ - Agent: Basic agent with LLM integration
8
+ - IntelligentAgent: Agent with planning and self-correction
9
+ - Session: Conversation session management
10
+
11
+ Components:
12
+ - Planner: Task decomposition and planning
13
+ - SelfCorrection: Error analysis and recovery
14
+ - ProgressTracker: Real-time progress tracking
15
+ """
16
+
17
+ from .runtime import Agent, AgentConfig, AgentState
18
+ from .session import Session, Message, MessageRole
19
+ from .planner import (
20
+ Planner,
21
+ Plan,
22
+ Step,
23
+ StepType,
24
+ StepStatus,
25
+ )
26
+ from .self_correction import (
27
+ SelfCorrection,
28
+ ErrorContext,
29
+ ErrorType,
30
+ Correction,
31
+ RecoveryStrategy,
32
+ )
33
+ from .progress import (
34
+ ProgressTracker,
35
+ ProgressEvent,
36
+ ProgressState,
37
+ StepLogger,
38
+ )
39
+ from .intelligent import IntelligentAgent, AgentMode, ExecutionResult
40
+
41
+ __all__ = [
42
+ # Core Agent
43
+ "Agent",
44
+ "AgentConfig",
45
+ "AgentState",
46
+ "Session",
47
+ "Message",
48
+ "MessageRole",
49
+ # Intelligent Agent
50
+ "IntelligentAgent",
51
+ "AgentMode",
52
+ "ExecutionResult",
53
+ # Planner
54
+ "Planner",
55
+ "Plan",
56
+ "Step",
57
+ "StepType",
58
+ "StepStatus",
59
+ # Self-Correction
60
+ "SelfCorrection",
61
+ "ErrorContext",
62
+ "ErrorType",
63
+ "Correction",
64
+ "RecoveryStrategy",
65
+ # Progress
66
+ "ProgressTracker",
67
+ "ProgressEvent",
68
+ "ProgressState",
69
+ "StepLogger",
70
+ ]