Quickstart
This page shows a simple quick start guide on how to use Fastagent with your current project.
Installation
The first step is to install the FastAgent dependency. To install the project, use pip.
Currently the project is available only on github and will soon be available on pypi.
Create a simple LangChain application
Let's create an app.py
file with the simplest langchain runnable you can make, consisting of just a large language model.
Create a fastagent configuration
The first step is to create and initialize a fastagent using the cli tool or by hand. (You can also choose not to pass the argument, and you will be prompted instead.)
Currently only langchain is supported, but on the roadmap is support for langgraph (currently experimental) and dspy.
You will need to update the app field in the project section to match the path of your application in the form:
<module_path>:<module_attribute>
in you case it would be myapplication.app:chain
Launching you server in development mode
Now that everything is set up, you can simply start the server using
The development server is reloaded every time the code changes and provides some advanced logging. You should see:
To see the available endpoint, go to http://127.0.0.1:8000/docs and you should see the documentation.
Launching you server in production mode
When you decide to move your project into production, it can be nice to disable some features, such as reloading the server. You can simply use the
This command is very similar to the development command under the hood, it uses exactly the same interface but disables some features of development mode.
Last updated