fakzed 0.1.0__tar.gz

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 (89) hide show
  1. fakzed-0.1.0/.gitignore +43 -0
  2. fakzed-0.1.0/LICENSE +21 -0
  3. fakzed-0.1.0/PKG-INFO +64 -0
  4. fakzed-0.1.0/README.md +35 -0
  5. fakzed-0.1.0/pyproject.toml +36 -0
  6. fakzed-0.1.0/src/fakzed/__init__.py +113 -0
  7. fakzed-0.1.0/src/fakzed/agent/__init__.py +13 -0
  8. fakzed-0.1.0/src/fakzed/agent/agent.py +1008 -0
  9. fakzed-0.1.0/src/fakzed/agent/team.py +323 -0
  10. fakzed-0.1.0/src/fakzed/context/__init__.py +5 -0
  11. fakzed-0.1.0/src/fakzed/context/context.py +29 -0
  12. fakzed-0.1.0/src/fakzed/evals/__init__.py +19 -0
  13. fakzed-0.1.0/src/fakzed/evals/evals.py +82 -0
  14. fakzed-0.1.0/src/fakzed/guardrails/__init__.py +21 -0
  15. fakzed-0.1.0/src/fakzed/guardrails/guardrails.py +69 -0
  16. fakzed-0.1.0/src/fakzed/hooks/__init__.py +5 -0
  17. fakzed-0.1.0/src/fakzed/hooks/hooks.py +34 -0
  18. fakzed-0.1.0/src/fakzed/knowledge/__init__.py +15 -0
  19. fakzed-0.1.0/src/fakzed/knowledge/embedder.py +74 -0
  20. fakzed-0.1.0/src/fakzed/knowledge/knowledge.py +67 -0
  21. fakzed-0.1.0/src/fakzed/knowledge/vectordb.py +59 -0
  22. fakzed-0.1.0/src/fakzed/memory/__init__.py +5 -0
  23. fakzed-0.1.0/src/fakzed/memory/memory.py +93 -0
  24. fakzed-0.1.0/src/fakzed/model/__init__.py +35 -0
  25. fakzed-0.1.0/src/fakzed/model/base.py +140 -0
  26. fakzed-0.1.0/src/fakzed/model/factory.py +38 -0
  27. fakzed-0.1.0/src/fakzed/model/message.py +49 -0
  28. fakzed-0.1.0/src/fakzed/model/provider/__init__.py +17 -0
  29. fakzed-0.1.0/src/fakzed/model/provider/anthropic.py +368 -0
  30. fakzed-0.1.0/src/fakzed/model/provider/deepseek.py +33 -0
  31. fakzed-0.1.0/src/fakzed/model/provider/ollama.py +335 -0
  32. fakzed-0.1.0/src/fakzed/model/provider/openai.py +344 -0
  33. fakzed-0.1.0/src/fakzed/model/registry.py +25 -0
  34. fakzed-0.1.0/src/fakzed/model/response.py +33 -0
  35. fakzed-0.1.0/src/fakzed/model/tool.py +26 -0
  36. fakzed-0.1.0/src/fakzed/observability/__init__.py +24 -0
  37. fakzed-0.1.0/src/fakzed/observability/events.py +59 -0
  38. fakzed-0.1.0/src/fakzed/observability/metrics.py +102 -0
  39. fakzed-0.1.0/src/fakzed/observability/trace.py +65 -0
  40. fakzed-0.1.0/src/fakzed/platform/__init__.py +5 -0
  41. fakzed-0.1.0/src/fakzed/platform/remote.py +163 -0
  42. fakzed-0.1.0/src/fakzed/py.typed +0 -0
  43. fakzed-0.1.0/src/fakzed/runtime/__init__.py +12 -0
  44. fakzed-0.1.0/src/fakzed/runtime/background.py +94 -0
  45. fakzed-0.1.0/src/fakzed/runtime/scheduler.py +80 -0
  46. fakzed-0.1.0/src/fakzed/session/__init__.py +5 -0
  47. fakzed-0.1.0/src/fakzed/session/session.py +58 -0
  48. fakzed-0.1.0/src/fakzed/skills/__init__.py +5 -0
  49. fakzed-0.1.0/src/fakzed/skills/skill.py +19 -0
  50. fakzed-0.1.0/src/fakzed/storage/__init__.py +7 -0
  51. fakzed-0.1.0/src/fakzed/storage/base.py +87 -0
  52. fakzed-0.1.0/src/fakzed/storage/memory.py +52 -0
  53. fakzed-0.1.0/src/fakzed/storage/sqlite.py +238 -0
  54. fakzed-0.1.0/src/fakzed/team/__init__.py +1 -0
  55. fakzed-0.1.0/src/fakzed/tools/__init__.py +28 -0
  56. fakzed-0.1.0/src/fakzed/tools/builtin.py +199 -0
  57. fakzed-0.1.0/src/fakzed/tools/mcp.py +102 -0
  58. fakzed-0.1.0/src/fakzed/tools/tool.py +145 -0
  59. fakzed-0.1.0/src/fakzed/tools/toolkit.py +28 -0
  60. fakzed-0.1.0/src/fakzed/workflow/__init__.py +31 -0
  61. fakzed-0.1.0/src/fakzed/workflow/workflow.py +373 -0
  62. fakzed-0.1.0/tests/agent/test_agent.py +235 -0
  63. fakzed-0.1.0/tests/agent/test_control_and_safety.py +269 -0
  64. fakzed-0.1.0/tests/agent/test_m3_features.py +145 -0
  65. fakzed-0.1.0/tests/agent/test_permissions.py +74 -0
  66. fakzed-0.1.0/tests/agent/test_session_and_memory.py +125 -0
  67. fakzed-0.1.0/tests/agent/test_skills_and_team.py +139 -0
  68. fakzed-0.1.0/tests/agent/test_team.py +298 -0
  69. fakzed-0.1.0/tests/conftest.py +75 -0
  70. fakzed-0.1.0/tests/knowledge/test_knowledge.py +80 -0
  71. fakzed-0.1.0/tests/mcp/echo_server.py +23 -0
  72. fakzed-0.1.0/tests/mcp/test_mcp.py +50 -0
  73. fakzed-0.1.0/tests/memory/test_memory.py +79 -0
  74. fakzed-0.1.0/tests/model/test_factory.py +61 -0
  75. fakzed-0.1.0/tests/model/test_message.py +47 -0
  76. fakzed-0.1.0/tests/model/test_provider_anthropic.py +118 -0
  77. fakzed-0.1.0/tests/model/test_provider_deepseek.py +77 -0
  78. fakzed-0.1.0/tests/model/test_provider_network.py +283 -0
  79. fakzed-0.1.0/tests/model/test_provider_ollama.py +85 -0
  80. fakzed-0.1.0/tests/model/test_provider_openai.py +110 -0
  81. fakzed-0.1.0/tests/model/test_structured_output.py +100 -0
  82. fakzed-0.1.0/tests/observability/test_observability.py +288 -0
  83. fakzed-0.1.0/tests/platform/test_remote_agent.py +173 -0
  84. fakzed-0.1.0/tests/storage/test_storage.py +131 -0
  85. fakzed-0.1.0/tests/test_smoke.py +35 -0
  86. fakzed-0.1.0/tests/tools/test_builtin_tools.py +116 -0
  87. fakzed-0.1.0/tests/tools/test_tool.py +105 -0
  88. fakzed-0.1.0/tests/tools/test_toolkit.py +48 -0
  89. fakzed-0.1.0/tests/workflow/test_workflow.py +310 -0
@@ -0,0 +1,43 @@
1
+ # Python
2
+ __pycache__/
3
+ *.py[cod]
4
+ *.egg-info/
5
+ .eggs/
6
+ build/
7
+ dist/
8
+
9
+ # uv / virtualenv
10
+ .venv/
11
+
12
+ # Testing
13
+ .pytest_cache/
14
+ .mypy_cache/
15
+ .ruff_cache/
16
+ .coverage
17
+ htmlcov/
18
+
19
+ # IDE
20
+ .idea/
21
+ .vscode/
22
+ *.swp
23
+
24
+ # OS
25
+ .DS_Store
26
+ Thumbs.db
27
+
28
+ # Env
29
+ .env
30
+ .env.*
31
+
32
+ # Node / web UI
33
+ node_modules/
34
+ .next/
35
+ apps/ui/out/
36
+
37
+ # fakzed runtime data (API-key hashes, sessions, runs)
38
+ fakzed_server.json
39
+ *.db
40
+ *.sqlite3
41
+
42
+ # Local dev notes (contain secrets / working log)
43
+ note.md
fakzed-0.1.0/LICENSE ADDED
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 fakzed contributors
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
fakzed-0.1.0/PKG-INFO ADDED
@@ -0,0 +1,64 @@
1
+ Metadata-Version: 2.5
2
+ Name: fakzed
3
+ Version: 0.1.0
4
+ Summary: Fakzed: a lightweight Python framework for building agent platforms. Three primitives (Agent, Team, Workflow) with pluggable capabilities.
5
+ Author: fakzed contributors
6
+ License-Expression: MIT
7
+ License-File: LICENSE
8
+ Keywords: agent,ai,framework,llm,multi-agent,workflow
9
+ Classifier: Development Status :: 3 - Alpha
10
+ Classifier: Intended Audience :: Developers
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Software Development :: Libraries
14
+ Requires-Python: >=3.10
15
+ Requires-Dist: mcp>=2.3.0
16
+ Requires-Dist: pydantic>=2.7
17
+ Requires-Dist: rich>=15.0.0
18
+ Provides-Extra: anthropic
19
+ Requires-Dist: anthropic>=0.34; extra == 'anthropic'
20
+ Provides-Extra: deepseek
21
+ Requires-Dist: openai>=1.50; extra == 'deepseek'
22
+ Provides-Extra: ollama
23
+ Requires-Dist: ollama>=0.3; extra == 'ollama'
24
+ Provides-Extra: openai
25
+ Requires-Dist: openai>=1.50; extra == 'openai'
26
+ Provides-Extra: sqlite
27
+ Requires-Dist: sqlalchemy>=2.0; extra == 'sqlite'
28
+ Description-Content-Type: text/markdown
29
+
30
+ # fakzed
31
+
32
+ A lightweight Python framework for building agent platforms.
33
+
34
+ - **Three primitives**: `Agent` (tool loop + multi-turn), `Team` (coordinate /
35
+ route / collaborate), `Workflow` (sequential / conditional / loop / parallel)
36
+ - **Own model layer**: OpenAI / DeepSeek / Anthropic / Ollama adapters with a
37
+ registry factory (`"deepseek:deepseek-chat"`), streaming, tool calls,
38
+ reasoning content, structured output
39
+ - **Pluggable capabilities**: `@tool` + built-ins + MCP client, AgenticMemory,
40
+ Knowledge RAG, Skills, ContextProvider, Guardrails, Hooks, observability
41
+ - **Runtime**: BackgroundRunner, Scheduler, Evals
42
+
43
+ ```bash
44
+ uv add fakzed # or: pip install fakzed
45
+ uv add fakzed[deepseek] # provider extras: openai / anthropic / ollama / deepseek / sqlite
46
+ ```
47
+
48
+ ```python
49
+ from fakzed import Agent, tool
50
+
51
+
52
+ @tool
53
+ def add(a: int, b: int) -> int:
54
+ """Add two numbers."""
55
+ return a + b
56
+
57
+
58
+ agent = Agent(name="calc", model="deepseek:deepseek-chat", tools=[add])
59
+ resp = agent.run("1 + 1 = ?")
60
+ print(resp.content)
61
+ ```
62
+
63
+ See the monorepo [README](../../README.md), [docs](../../docs/quickstart.md)
64
+ and [cookbook](../../cookbook/README.md) for the full guide.
fakzed-0.1.0/README.md ADDED
@@ -0,0 +1,35 @@
1
+ # fakzed
2
+
3
+ A lightweight Python framework for building agent platforms.
4
+
5
+ - **Three primitives**: `Agent` (tool loop + multi-turn), `Team` (coordinate /
6
+ route / collaborate), `Workflow` (sequential / conditional / loop / parallel)
7
+ - **Own model layer**: OpenAI / DeepSeek / Anthropic / Ollama adapters with a
8
+ registry factory (`"deepseek:deepseek-chat"`), streaming, tool calls,
9
+ reasoning content, structured output
10
+ - **Pluggable capabilities**: `@tool` + built-ins + MCP client, AgenticMemory,
11
+ Knowledge RAG, Skills, ContextProvider, Guardrails, Hooks, observability
12
+ - **Runtime**: BackgroundRunner, Scheduler, Evals
13
+
14
+ ```bash
15
+ uv add fakzed # or: pip install fakzed
16
+ uv add fakzed[deepseek] # provider extras: openai / anthropic / ollama / deepseek / sqlite
17
+ ```
18
+
19
+ ```python
20
+ from fakzed import Agent, tool
21
+
22
+
23
+ @tool
24
+ def add(a: int, b: int) -> int:
25
+ """Add two numbers."""
26
+ return a + b
27
+
28
+
29
+ agent = Agent(name="calc", model="deepseek:deepseek-chat", tools=[add])
30
+ resp = agent.run("1 + 1 = ?")
31
+ print(resp.content)
32
+ ```
33
+
34
+ See the monorepo [README](../../README.md), [docs](../../docs/quickstart.md)
35
+ and [cookbook](../../cookbook/README.md) for the full guide.
@@ -0,0 +1,36 @@
1
+ [project]
2
+ name = "fakzed"
3
+ version = "0.1.0"
4
+ description = "Fakzed: a lightweight Python framework for building agent platforms. Three primitives (Agent, Team, Workflow) with pluggable capabilities."
5
+ readme = "README.md"
6
+ requires-python = ">=3.10"
7
+ license = "MIT"
8
+ authors = [{ name = "fakzed contributors" }]
9
+ keywords = ["agent", "ai", "llm", "multi-agent", "workflow", "framework"]
10
+ classifiers = [
11
+ "Development Status :: 3 - Alpha",
12
+ "Intended Audience :: Developers",
13
+ "License :: OSI Approved :: MIT License",
14
+ "Programming Language :: Python :: 3",
15
+ "Topic :: Software Development :: Libraries",
16
+ ]
17
+
18
+ dependencies = [
19
+ "mcp>=2.3.0",
20
+ "pydantic>=2.7",
21
+ "rich>=15.0.0",
22
+ ]
23
+
24
+ [project.optional-dependencies]
25
+ openai = ["openai>=1.50"]
26
+ anthropic = ["anthropic>=0.34"]
27
+ ollama = ["ollama>=0.3"]
28
+ deepseek = ["openai>=1.50"]
29
+ sqlite = ["sqlalchemy>=2.0"]
30
+
31
+ [build-system]
32
+ requires = ["hatchling"]
33
+ build-backend = "hatchling.build"
34
+
35
+ [tool.hatch.build.targets.wheel]
36
+ packages = ["src/fakzed"]
@@ -0,0 +1,113 @@
1
+ """Fakzed: a lightweight framework for building agent platforms.
2
+
3
+ Named after Faker's legendary Zed outplay. Three primitives — Agent, Team,
4
+ Workflow — with pluggable capabilities (models, tools, memory, knowledge,
5
+ guardrails), sharing one registration mechanism between SDK and platform.
6
+ """
7
+
8
+ from importlib.metadata import version as _version
9
+
10
+ from fakzed.agent import Agent, MemberInteraction, RunResponse, Team, TeamRoute
11
+ from fakzed.context import ContextProvider, TimeProvider
12
+ from fakzed.evals import EvalCase, EvalReport, eval_agent
13
+ from fakzed.guardrails import (
14
+ GuardrailError,
15
+ GuardrailResult,
16
+ Guardrails,
17
+ InputGuardrail,
18
+ OutputGuardrail,
19
+ )
20
+ from fakzed.hooks import Hooks
21
+ from fakzed.knowledge import (
22
+ Embedder,
23
+ HashEmbedder,
24
+ InMemoryVectorDb,
25
+ KnowledgeBase,
26
+ OpenAIEmbedder,
27
+ SearchResult,
28
+ VectorDb,
29
+ )
30
+ from fakzed.memory import AgenticMemory
31
+ from fakzed.model import Message, Model, create_model
32
+ from fakzed.observability import (
33
+ EventBus,
34
+ MetricsCollector,
35
+ RunEvent,
36
+ RunMetrics,
37
+ RunObserver,
38
+ Trace,
39
+ Tracer,
40
+ )
41
+ from fakzed.platform import RemoteAgent, RemoteAgentError
42
+ from fakzed.runtime import BackgroundRun, BackgroundRunner, Scheduler
43
+ from fakzed.session import Session
44
+ from fakzed.skills import Skill
45
+ from fakzed.storage import InMemoryStorage, SqliteStorage, Storage
46
+ from fakzed.tools import Tool, tool
47
+ from fakzed.workflow import (
48
+ IfBlock,
49
+ LoopBlock,
50
+ ParallelBlock,
51
+ Step,
52
+ Workflow,
53
+ WorkflowContext,
54
+ WorkflowResult,
55
+ )
56
+
57
+ __version__ = _version("fakzed")
58
+
59
+ __all__ = [
60
+ "Agent",
61
+ "RunResponse",
62
+ "Team",
63
+ "MemberInteraction",
64
+ "TeamRoute",
65
+ "AgenticMemory",
66
+ "ContextProvider",
67
+ "TimeProvider",
68
+ "KnowledgeBase",
69
+ "Embedder",
70
+ "HashEmbedder",
71
+ "OpenAIEmbedder",
72
+ "VectorDb",
73
+ "InMemoryVectorDb",
74
+ "SearchResult",
75
+ "Message",
76
+ "Model",
77
+ "create_model",
78
+ "Session",
79
+ "Skill",
80
+ "Storage",
81
+ "InMemoryStorage",
82
+ "SqliteStorage",
83
+ "Tool",
84
+ "tool",
85
+ "Workflow",
86
+ "Step",
87
+ "IfBlock",
88
+ "LoopBlock",
89
+ "ParallelBlock",
90
+ "WorkflowContext",
91
+ "WorkflowResult",
92
+ "Hooks",
93
+ "Guardrails",
94
+ "InputGuardrail",
95
+ "OutputGuardrail",
96
+ "GuardrailResult",
97
+ "GuardrailError",
98
+ "EventBus",
99
+ "RunEvent",
100
+ "RunMetrics",
101
+ "RunObserver",
102
+ "MetricsCollector",
103
+ "Tracer",
104
+ "Trace",
105
+ "RemoteAgent",
106
+ "RemoteAgentError",
107
+ "BackgroundRunner",
108
+ "BackgroundRun",
109
+ "Scheduler",
110
+ "eval_agent",
111
+ "EvalCase",
112
+ "EvalReport",
113
+ ]
@@ -0,0 +1,13 @@
1
+ """Agent primitive: a single model-driven program."""
2
+
3
+ from fakzed.agent.agent import Agent, AgentMaxIterationsError, RunResponse
4
+ from fakzed.agent.team import MemberInteraction, Team, TeamRoute
5
+
6
+ __all__ = [
7
+ "Agent",
8
+ "AgentMaxIterationsError",
9
+ "RunResponse",
10
+ "MemberInteraction",
11
+ "Team",
12
+ "TeamRoute",
13
+ ]