Forge implementation specifications
Most application developers should start with the Forge developer guides. These documents preserve the implementation decisions, trade-offs, and acceptance criteria behind the platform.
Status: proposed
First consumer: ShareFlow
Implementation language: TypeScript
This directory defines the extraction and migration of a reusable AI platform inspired by the architecture currently used in Twenty. The resulting packages must have no runtime dependency on Twenty or ShareFlow. ShareFlow-specific social tools and workflows remain in an integration package.
Goals
- Provider-neutral model execution using the Vercel AI SDK.
- Durable conversations, runs, typed content parts, checkpoints, cancellation and recovery.
- Threads that carry cross-run session state and compact their own long history.
- User-level memory that follows a principal across their conversations, under their control.
- Permission-filtered tools with lazy discovery and consistent result envelopes.
- Skills, explicit context providers and token-aware context pruning.
- Durable questions and approval gates for external actions.
- Replaceable persistence, vector, blob, queue, lock and realtime adapters.
- Adapters that provision their own schema on startup, like Agno's zero-config setup.
- Tenant-registered outbound MCP servers as first-class, authorization-filtered tools.
- A first-class authorization model filtering tools, retrieval and every store call.
- RAG, attachments, OCR, vision, PDF, document and artifact support.
- GraphQL APIs/subscriptions, headless React hooks and optional UI components.
- Full localization: the backend emits stable codes, the frontend renders them per user locale.
- Token counting, usage/cost accounting with quotas, telemetry and versioned evaluations.
Non-goals
- Recreating Twenty CRM.
- Putting social-media behavior in generic packages.
- Supporting every database or vector store in the first release.
- Allowing a model to write binary files or execute external mutations directly.
- Removing the current Agno runtime before replacement workflows pass parity gates.
Specifications
- Architecture and package boundaries
- Core domain and persistence
- Models, agents, tools, skills and context
- Durable execution, streaming and HITL
- RAG, attachments, vision and documents
- GraphQL and frontend packages
- ShareFlow integration — moved. The specification is Chorus's product design, not the platform's, and this repository's
docs/tree is published. It lives in thesocial-integrationrepository asdocs/forge-integration-spec.md. - Migration and delivery plan
- Testing, security and release criteria
- Outbound MCP integration
- Authorization
- Usage, token counting and accounting
- Sessions, threads and session state
- Localization (i18n)
- User-level memory
- Load, soak and failure injection
- Security review
- Data retention
- Versioning, API surface and deprecation
- CI, and Jenkins on our own server
- The platform
- Glossary
- Tool catalogue
- Tool selection at scale
- The integration page template
- Retrieval quality, measured
- The Open Knowledge Format, read against our document model
- Prompt caching
- GraphRAG quality, measured
- Browser isolation
Extraction
Governing principles
- Every tenant-sensitive operation receives an explicit tenant context.
- Tools are authorization-filtered before discovery and re-authorized during execution.
- External writes require deterministic validation, idempotency and the configured approval policy.
- Conversations are owned by the platform, never by a model provider.
- Infrastructure capabilities are ports with adapter implementations.
- Large files and tool results are referenced, not injected wholesale into model context.
- Runtime releases are evaluated against versioned representative cases.