Docassemble

A free, open-source expert system for guided interviews and document assembly, based on Python, YAML, and Markdown.

Learn more

What is docassemble?

docassemble is a free, open-source expert system for guided interviews and document assembly. It provides a web site that conducts interviews with users. Based on the information gathered, the interviews can present users with documents in PDF, RTF, or DOCX format, which users can download or e-mail.

docassemble was created by a lawyer/computer programmer for purposes of automating the practice of law, but it is a general-purpose platform that can find applications in a variety of fields.

Though the name emphasizes the document assembly feature, docassemble interviews do not need to assemble a document; they might submit an application, direct the user to other resources on the internet, store user input, or simply provide the user with information.

Features

WYSIWYG

Compose your templates in .docx or .pdf files.

Signatures

Gather touchscreen signatures and embed them in documents.

Live chat

Assist users in real time with live chat, screen sharing, and remote screen control.

AI

Use machine learning to process user input.

SMS

Communicate with end users through text messaging as an alternative to the web interface.

E-mail

Send and receive e-mails in your interviews.

OCR

Use optical character recogntion to process images uploaded by the user.

Multilingual

Offer interviews in multiple languages.

Multiuser

Develop application that involve more than one user, such as mediation or counseling interviews.

Extensible

Use the power of Python to extend the capabilities of your interviews.

Open

Package your interviews and use GitHub and PyPI to share your work with the docassemble user community.

Background Tasks

Do things behind the scenes of the interview, even when the user is not logged in.

Scalable

Deploy your interviews on multiple machines to handle high traffic.

Secure

Protect user information with server-side encryption and other security features.

APIs

Send your interviews input and extract output using code.

Responsive Design

Based on Bootstrap

Plain Text Authoring

Interviews are authored as YAML files. Within the YAML files, the text of the interview questions and documents is formatted with Markdown, and the logic of the interview flow is expressed with if/then/else statements in Python.

question: |
  What is your favorite number?
fields:
  Favorite number: best_number
  datatype: number
---
question: |
  % if best_number == 42:
  That's **my** favorite number!
  % else:
  What a _lousy_ favorite number.
  % endif
mandatory: true
yaml-markdown-python

YAML, Markdown, and Python? Sounds scary!

YAML is a text format for expressing information in a way that is both human-readable and machine readable.

food: bread
ingredients:
  - flour
  - yeast
  - water
  - salt

Markdown is a text format for expressing typographical formatting. For example, if you write this Markdown text:

It is *very* important that you obtain your
[free credit report](https://www.annualcreditreport.com) as soon
as possible.

then you get text that looks like this:

It is very important that you obtain your free credit report as soon as possible.

Python is a language designed to be readable and easy to learn. Authors do not need to have any prior experience with Python or computer programming in order to create docassemble interviews. The only Python statements authors may need to write are if/then/else statements that are very close to plain English. For example:

if user.is_citizen or user.is_legal_permanent_resident:
  user.is_eligible = True
else:
  user.is_eligible = False

No Flowcharts

Interview authors do not have to design the “flow” of the interview; docassemble will automatically determine what questions to ask, and the order in which to ask them, based on what information is necessary to gather. The system will refrain from asking unnecessary questions. For example, if the interview contains a conditional statement such as:

if user.is_disabled or user.age > 60:
  special_funding_exists = True
else:
  special_funding_exists = False

then the user will be asked if he is disabled, and will only be asked for his age if he says he is not disabled. Authors need to provide a question for every variable (e.g., there need to be questions that determine user.is_disabled and user.age) but docassemble will automatically figure out when and whether to ask those questions.

This allows authors to concentrate on the end result rather than worrying about how to construct the interview process. Authors who are lawyers can “practice at the top of their license” by spending their time thinking about the law (a lawyer function) rather than thinking about the interview process (a non-lawyer function).

Run the demo Read the documentation Deploy

Designed and built by Jonathan Pyle
Code licensed under MIT, documentation under CC BY 3.0.