Installation

AgentML is implemented in Go. Follow these steps to install the core library.

Prerequisites

Go 1.20+

Required for module support and context usage

Working internet connection

For pulling dependencies

CGO and SQLite (Optional)

Only required if using the memory namespace extension. You'll need CGO enabled and SQLite development headers available.

Installation Steps

1. Install the Core Library

go get github.com/agentflare-ai/agentml

This will fetch the AgentML module and its packages.

2. Import in Your Code

import "github.com/agentflare-ai/agentml"

There is no separate build step needed for pure AgentML usage – the Go module is ready to use.

Memory Extension (Optional)

This is only required if using the memory features; basic AgentML state machines and LLM integration do not require any C libraries.

Requirements:

  • C compiler (e.g. GCC)
  • SQLite development headers
  • CGO enabled

See Contributing or memory/README.md for instructions on compiling the SQLite extensions.

Verifying the Installation

You can test that AgentML is installed correctly by running Go's build or test on the module:

go test github.com/agentflare-ai/agentml/...

This should compile the library (and run its unit tests) to confirm everything is in order. If you encounter errors related to SQLite or CGO and you intend to use the memory extension, ensure you have a C compiler installed and run the extension build.

Next Steps

Now that you have AgentML installed, you're ready to build your first agent!