AgentLang is a very high-level, declarative, open-source programming language for solving complex tasks with the help of interacting AI agents. An AI agent can be enhanced with tools, knowledge bases and chat prompts. Agents can also form complex graphs of inter-relationships, which allows them to collaborate together in solving difficult problems.
While most AI programming frameworks limit themselves to LLM based text-processing and generation tasks, AgentLang is designed as a complete tool for real-world application development. As a language, AgentLang is data-oriented and declarative, with an abstraction that is closer to natural languages than traditional programming languages. This makes AgentLang a much better fit for LLM-powered code generation. Users can rapidly build business application in AgentLang from high-level specifications - typically more than 10x faster than traditional programming languages.
The AgentLang language specification, its compiler and runtime are open source.
The code you build in AgentLang can be run anywhere using the open source compiler and runtime, thereby avoiding the vendor lock-in of other AI programming platforms.
AgentLang introduces a number of innovative concepts to programming:
The following code snippet shows a simple agent that can interact with a human user:
(component :Chat)
{:Agentlang.Core/Agent
{:Name :Chat/ExampleAgent
:Input :Chat/Session
:UserInstruction "You are an AI bot who tell jokes"}}
Save this code to a file named chat.al
and it's ready to be run as a highly-scalable service with ready-to-use
HTTP APIs to interact with the agent. But before you can actually run it, you need to install AgentLang.
The next section will help you with that.
OPENAI_API_KEY
environment variable to a valid API key from OpenAINow you can run the chat-agent as,
agent /path/to/chat.al
Once the agent starts running, send it a message with an HTTP POST like,
curl --header "Content-Type: application/json" \
--request POST \
--data '{"Chat/Session": {"UserInstruction": "tell me a joke about AI agents"}}' \
http://localhost:8080/api/Chat/Session
If all goes well, the agent will reply with a joke about itself!
Copyright 2024 Fractl Inc.
Licensed under the Apache License, Version 2.0: http://www.apache.org/licenses/LICENSE-2.0
Can you improve this documentation? These fine people already did:
Pratik Karki, Vijay Mathew, Ranga Rao, vijayfractl, Puneet Pahuja, vmatv8, Muazzam Kazmi, muazzam0x48 & fractlraoEdit on GitHub
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close