An Open, Evolvable Agent Framework for Creative Intelligence System
Project description
EvoFabric: An Open, Evolvable Agent Framework for Creative Intelligence System
📢 News
- [2025-11] EvoFabric 0.1.3 is released now! Checkout our guidance documentation for detailed instructions and best practices.
✨Why EvoFabric?
-
Logical Visibility, Controllable Debugging: The graph structure visualizes agent logic, combined with Debug and visualization features, making the system’s operational paths and state changes clearly visible, bidding farewell to “black-box development”;
-
Highly Scalable: Modular registration mechanism and Pydantic specifications support rapid integration of custom nodes, tools, and memory modules, adapting to various business scenarios;
-
Natively Asynchronous, Excellent Performance: Built on Python asyncio, perfectly supports high concurrency and streaming responses, ensuring stable operation of large-scale multi-agent systems;
-
End-to-End Support: from graph construction, execution, debugging, to export, reload, deployment, providing an end-to-end toolchain to reduce development and operations costs;
-
Versatile Across Scenarios: Whether it’s the research scenario for rapid prototype validation or the engineering scenario for large-scale deployment, it can provide a solid foundation and flexible expansion points.
🚀 QuickStart
Installation
EvoFabric requires Python>=3.11
Using pip
pip install evofabric
Build you first application
import asyncio
from typing import Annotated
from pydantic import BaseModel
from evofabric.core.agent import AgentNode, UserNode
from evofabric.core.clients import OpenAIChatClient
from evofabric.core.graph import GraphBuilder
from evofabric.core.tool import ToolManager
from evofabric.core.typing import AssistantMessage, State, StateMessage, ToolMessage, UserMessage
class StateSchema(BaseModel):
messages: Annotated[list[StateMessage], "append_messages"]
def check_weather(city: str):
"""Check city weather"""
return f"Weather of {city} if good"
async def main():
llm_chat_client = OpenAIChatClient(
model="your-model-name",
client_kwargs={"api_key": "<your-api-key>"}
)
agent_node = AgentNode(
client=llm_chat_client,
system_prompt="You are a helpful assistant. You can make tool calls to solve user's query."
"If you need more information from user, output ::TO::user:"
"If you wish to end the conversation, output ::TO::end:",
tool_manager=ToolManager(tools=[check_weather]),
)
user_node = UserNode()
def fc_router(state: State):
last_message = state.messages[-1]
if isinstance(last_message, AssistantMessage):
reply = last_message.content
if "::TO::user:" in reply:
return "user"
elif "::TO::end:" in reply:
return "end"
elif isinstance(last_message, ToolMessage):
return "agent"
return "end"
graph_builder = GraphBuilder(state_schema=StateSchema)
graph_builder.add_node("agent", agent_node)
graph_builder.add_node("user", user_node)
graph_builder.set_entry_point("agent")
graph_builder.add_condition_edge(
"agent",
router=fc_router,
possible_targets={"user", "end", "agent"}
)
graph_builder.add_edge("user", "agent")
graph = graph_builder.build()
response = await graph.run({
"messages": [UserMessage(content="What's the weather of my city?")]
})
print(response)
if __name__ == "__main__":
asyncio.run(main())
⚖️ License
EvoFabric is released under MIT License.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file evofabric-0.1.3.tar.gz.
File metadata
- Download URL: evofabric-0.1.3.tar.gz
- Upload date:
- Size: 95.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
334a5f925cbdebfca00c6da3b7078a802bbb59dd86a8030e7e2bcbee36fe59e7
|
|
| MD5 |
d3312c127dad0e5fac72f06e40f04fdb
|
|
| BLAKE2b-256 |
6a2594952c481c54f48fa2a398fafb96e6a0b2a4308471ba5f34657ea539ba13
|
File details
Details for the file evofabric-0.1.3-py3-none-any.whl.
File metadata
- Download URL: evofabric-0.1.3-py3-none-any.whl
- Upload date:
- Size: 125.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.12
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
cf6aef596dbd5ea91971fc87447b6d2784547db818c92f76800c47a901e8397f
|
|
| MD5 |
798cb7be21e8f115dddbeee735ab6108
|
|
| BLAKE2b-256 |
94ef889f313f4f39b9ea02fc21107960ebe89c83e7ade7fc0259544f5cc3d4c4
|