SOFIA: Simple Orchestrated Flow Intelligence Agent
Project description
👩💼 SOFIA: Simple Orchestrated Flow Intelligence Agent
SOFIA is an open-source, configurable multi-step agent framework for building advanced LLM-powered assistants. Define your agent's persona, tools, and step-by-step flows in Python or YAML—perfect for conversational, workflow, and automation use cases.
Features
- Step-based agent flows: Define agent behavior as a sequence of steps, each with its own tools and transitions.
- Persona-driven: Easily set the agent's persona for consistent, branded responses.
- Tool integration: Register Python functions as tools for the agent to call.
- YAML or Python config: Configure agents via code or declarative YAML.
- OpenAI and custom LLM support
- Session management: Save and resume conversations.
- Extensible: Build your own tools, steps, and integrations.
- Interactive CLI: Bootstrap new agents with
sofia init(install with[cli]extra).
Installation
From PyPI (coming soon)
pip install sofia-agent
With CLI support
pip install sofia-agent[cli]
From Source
git clone https://github.com/chandralegend/sofia.git
cd sofia
poetry install
Usage
CLI: Bootstrap a New Agent
sofia init
This will interactively guide you to create a config YAML and starter Python file for your agent.
Python API Example
from sofia_agent import *
from sofia_agent.llms import OpenAIChatLLM
def get_time():
from datetime import datetime
return f"Current time: {datetime.now()}"
steps = [
Step(
step_id="start",
description="Greet and offer to tell the time.",
available_tools=["get_time"],
routes=[Route(target="end", condition="User is done")],
),
Step(
step_id="end",
description="Say goodbye.",
),
]
llm = OpenAIChatLLM()
agent = Sofia(
name="clockbot",
llm=llm,
steps=steps,
start_step_id="start",
tools=[get_time],
persona="You are a friendly clock assistant.",
)
sess = agent.create_session()
# ... interact with sess.next(user_input)
YAML Config Example
See examples/config.barista.yaml for a full-featured barista agent.
Configuration
- Persona: Set in YAML or Python for consistent agent style.
- Steps: Each step defines available tools, description, and routes to other steps.
- Tools: Python functions registered with the agent.
Example: Barista Agent
A full example is provided in examples/barista.py and examples/config.barista.yaml.
Contributing
Contributions are welcome! Please open issues or pull requests on GitHub.
License
MIT License. See LICENSE.
Acknowledgements
- Inspired by the open-source LLM community.
- Built with ❤️ by contributors.
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 sofia_agent-0.1.5.tar.gz.
File metadata
- Download URL: sofia_agent-0.1.5.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fe50bf175890dce040411c30c5fb1a34c23e56bf4572a8f6f66df294e25a4bc1
|
|
| MD5 |
f8bb921b7cf6feabe2001932776b6318
|
|
| BLAKE2b-256 |
b71a083346a7954c45ad9523098fbfa341b8e772f1f4bf4161d4ffdbfb9f8887
|
Provenance
The following attestation bundles were made for sofia_agent-0.1.5.tar.gz:
Publisher:
publish.yml on chandralegend/sofia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sofia_agent-0.1.5.tar.gz -
Subject digest:
fe50bf175890dce040411c30c5fb1a34c23e56bf4572a8f6f66df294e25a4bc1 - Sigstore transparency entry: 204076713
- Sigstore integration time:
-
Permalink:
chandralegend/sofia@7e6db004032180b35d02f9cf440d80f5700e0648 -
Branch / Tag:
refs/tags/0.1.5 - Owner: https://github.com/chandralegend
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7e6db004032180b35d02f9cf440d80f5700e0648 -
Trigger Event:
push
-
Statement type:
File details
Details for the file sofia_agent-0.1.5-py3-none-any.whl.
File metadata
- Download URL: sofia_agent-0.1.5-py3-none-any.whl
- Upload date:
- Size: 15.0 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
98b024f2491cedf41f8b81d4069217dec494f74f973e0795942e233f843383a1
|
|
| MD5 |
1500e9a2c7a4a40cf335c85fb9d3cc51
|
|
| BLAKE2b-256 |
d17ad6ca0cf4bfe8179fa5d769c428977333078dc8cfc7bba74eb765c85a6501
|
Provenance
The following attestation bundles were made for sofia_agent-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on chandralegend/sofia
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
sofia_agent-0.1.5-py3-none-any.whl -
Subject digest:
98b024f2491cedf41f8b81d4069217dec494f74f973e0795942e233f843383a1 - Sigstore transparency entry: 204076715
- Sigstore integration time:
-
Permalink:
chandralegend/sofia@7e6db004032180b35d02f9cf440d80f5700e0648 -
Branch / Tag:
refs/tags/0.1.5 - Owner: https://github.com/chandralegend
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@7e6db004032180b35d02f9cf440d80f5700e0648 -
Trigger Event:
push
-
Statement type: