The PersonaFlow platform aims to provide highly personalized user experiences fueled by Generative AI. With a focus on scalability and efficiency, AgentStack offers a suite of tools and APIs to create complex, database-backed configurable agents backed by an API.
Key features include:
- Context optimization: Intelligent partitioning of ingested data based on the semantic similarity of surrounding content (see: Document Processing).
- Enterprise feasibility: focus on scalability, cost efficiency, and privacy
- Agentic assistants: Quickly build and evaluate custom assistants from complex agent architectures (see: Assistants)
- Evaluation: Deep integration with evaluation tools to score and optimize agents and RAG configurations
- Build and deploy: Easily deploy agents and RAG configurations to production environments
- Multiple built-in auth options (see: Auth Guide)
Upcoming features:
- New agent-backed assistant architectures including adaptive RAG and multi-agent collaboration.
- New RAG performance optimization features: hybrid search support and knowledge graph generation based on GraphRAG
- Evaluation and scoring of assistants and RAG configurations with batch runs (Currently done through Arize Phoenix and LangFuse integrations.)
- Client SDKS: Easy integration of generative AI features into applications via the AgentStack client SDK
Much of the API and business language is modeled after the OpenAI Assistants API and uses LangGraph under the hood for complex agent architectures that can be accessed via the assistants API along with a modular RAG system, and a suite of agent-based retrieval and tool use features. It is currently being expanded with additional RAG optimization techniques and new agent architectures.
Note: This project is in the very early stages of development and testing. Breaking changes should therefore be expected until the first stable release.
OpenAPI spec can be found on SwaggerHub.
- Assistants API
- File management
- Advanced RAG with adaptive chunking and summarization
- Advanced RAG assistants integration
- More LLMs, embedding options
- Local LLMs and embeddings (Ollama, Huggingface)
- Auth
- Assistant builder UI
- More agent types (self-reflection, etc.)
- Evaluation and scoring of assistants and RAG configurations
- Python and TypeScript SDKs
- Programming Language
- Server and backend libraries: Python
- Admin UI: TypeScript/Next.js
- Relational Database: PostgreSQL
- Vector Database: Qdrant (more will be supported) - Easily add new database integrations by extending the base class
- Low-level Agentic Framework: LangGraph
- Document Processing: Semantic-Router, Unstructured, LlamaIndex, LangChain
- Mono-repo manager: Pants
- ORM: SQLAlchemy
- Database Migration Tool: Alembic
Follow these instructions if you are only running from Docker and do not need to set up the environment for development.
- Clone the repo and navigate to the root directory
- Create .env file using the .env.example template.
- Run
docker-compose up -d
from terminal.
Builds and dependencies are managed by Pantsbuild. Pants is a fast, scalable, user-friendly rust-based build system.
- install Pants on your system.
- Clone the repo and make sure you have Python 3.11.* installed and the interpreter selected in your IDE.
- Create .env file using the .env.example template.
- Open docker-compose.yaml and make sure the
stack
block underservices
is commented out. Optionally uncomment thelangfuse
andphoenix
blocks if you plan to run the evaluation services. - Open docker on your machine if it is not already running and run
docker-compose up -d
. This will download and start the images. - Install dependencies by running
poetry install --no-root
. - When that is fiinished, run
make migrate
. This will run the migrations and seed the database with initial data. - To run the backend with hot reload, use
make stack-dev
, otherwise you can usepants run stack:local
if you do not need the backend server to hot reload. - Navigate to
http://localhost:9000/docs
to see the API documentation.
- Lint:
pants lint ::
- Test:
pants test ::
- Run the stack server:
pants run stack:local
(use--ldebug
for debug logging) - Run the dev server with hot reload:
make stack-dev
Note: ::
means all files in project. For more information on targeting, see: Targets and BUILD files.
Pants uses a constraints.txt as the lock file for dependencies, which is exported from the from poetry.lock. If you add a new dependency, you will need to run
poetry lock
to update the poetry.lock, followed bypoetry export --format constraints.txt --output constraints.txt
to regenerate the constraints file which will lock the new dependency to the version in the poetry.lock file.
To run the APIs, you can use the Swagger UI at http://localhost:9000/docs
or via the Postman collection.
Dependencies are managed by NPM
- Install node or make sure you have it installed (
node -v
). - Navigate to
ui
folder. - Run
npm install
to install dependencies. - copy
.env.local.example
into.env.local
file (e.g.,cp .env.local.example .env.local
). - Update
.env.local
and uncomment the line whereNEXT_PUBLIC_BASE_API_URL
is defined. Make sure that the key value is correct and you have backend running under the same address. - Run
npm run dev
and open the link from the console in a browser.
- Assistants
- Document Processing and RAG
- Auth
- Evaluation and scoring: Coming soon
- Custom architectures and tools: Coming soon
- Admin Client: Coming soon
- SDKs: Coming soon
- Troubleshooting
Contributions are welcome! If you have a feature request, bug report, or a pull request, please feel free to open an issue or submit a PR.
This project is licensed under the MIT License - see the LICENSE file for details.