> For the complete documentation index, see [llms.txt](https://archai.gitbook.io/archai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://archai.gitbook.io/archai/chaingraph.md).

# Chaingraph

ChainGraph is a source-available, flow-based programming framework that empowers developers to visually design, execute, and manage complex computational graphs. Whether you're building custom AI agents, data processing pipelines, or collaborative automation systems, ChainGraph's modular architecture, strong type-safety guarantees, and real-time features help you build robust workflows efficiently.

***

### Tech Stack

* Frontend: TypeScript + React with XYFlow for the visual graph editor. Effector manages state with real-time synchronization via TRPC for end-to-end type safety.
* API Layer: GraphQL + WebSockets power our API, enabling efficient data retrieval and real-time updates.
* Backend: Go powers our core system operations with TypeScript handling the agent system. This hybrid approach balances performance with developer experience.
* Data Layer: PostgreSQL with pgvector extensions for vector operations, Redis for high-performance caching, and HNSW indexing for semantic search.
* Nodes: Implements a decorator-based TypeScript system with Zod validation and SuperJSON serialization for type-safe data flow between components.
* Deployment: Full Docker containerization with compose support for simplified setup, portability, and consistent environments across development and production.

### Key technical features

* Type-Safe Port System with Zod validation
* Visual Flow Editor built on React and XYFlow
* Real-time synchronization with TRPC and Effector
* Docker and cloud compatibility for enterprise deployment
* Growing node ecosystem thanks to open source contributors.


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://archai.gitbook.io/archai/chaingraph.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
