KQML as an agent communication language

Timothy W. FininR. FritzsonD. McKayR. McEntire

article1994CIKM2,645 citations

Presents the Knowledge Query and Manipulation Language (KQML), an extensible, speech-act-based communication protocol and facilitator architecture that enables autonomous, heterogeneous software agents to exchange knowledge and coordinate in distributed systems.

Listen

The article addresses the challenges of building large-scale, distributed information systems in environments like the National Information Infrastructure, where nodes are heterogeneous, dynamic, and autonomous. Traditional client-server models limit initiative and flexibility, while maturing technologies such as knowledge-based reasoning and information retrieval lack effective tools for agent-based integration.

The work set out to design and test KQML, a language and protocol that enables intelligent software agents to exchange information and knowledge at runtime, supporting cooperative problem solving across diverse systems.

The approach centered on defining an extensible set of performatives that represent speech acts, combined with a supporting architecture of communication facilitators that handle routing, matchmaking, and mediation. Prototypes were implemented in Lisp and C, then applied in testbeds for concurrent engineering, military logistics planning, and heterogeneous information integration, using content languages such as KIF, LOOM, and SQL.

The main findings are that KQML supports a range of interaction patterns including one-shot queries, streaming replies, subscriptions, and brokered requests; facilitator agents successfully locate and connect agents without requiring direct knowledge of each other; the separation of communication and content languages allows flexible integration of existing tools; and the language has been deployed successfully in multiple distributed demonstrations without mandating a single system architecture.

These results show that agent communication can be standardized at a pragmatic level that reduces integration costs and enables new forms of cooperation in large-scale information systems.

Next steps include evolving KQML alongside emerging standards such as CORBA and OLE2, developing hierarchical directory services for national-scale deployment, and continuing experimentation in additional application domains.

The findings rest on prototype implementations and selected testbeds rather than large-scale production use, so results should be interpreted as evidence of feasibility rather than proven scalability.

  • Paper: Intention = Choice + Commitment, Philip R. Cohen et al. (1987). This seminal paper formalizes agent intention and persistent commitment, providing the foundational theoretical framework for intentional states and speech-act-based communication upon which KQML performatives build.
  • Paper: A Roadmap of Agent Research and Development, NICHOLAS R. JENNINGS et al. (2004). It provides a broad retrospective roadmap of multi-agent systems and agent-based computing, contextualizing early communication protocols like KQML within modern negotiation, coordination, and architecture frameworks.
  • Paper: BDI Agents: From Theory to Practice, Anand S. Rao (1995). It operationalizes the Belief-Desire-Intention (BDI) architecture for executing autonomous reasoning agents that utilize communication languages like KQML to coordinate in dynamic environments.
  • Paper: AutoGen: Enabling Next-Gen LLM Applications via Multi-Agent Conversation, Qingyun Wu et al. (2023). It modernizes agent-to-agent communication paradigms introduced by KQML by implementing multi-agent conversation frameworks centered around large language models.
Cover for KQML as an agent communication language

Abstract

This paper describes the design of and experimentation with the Knowledge Query and Manipulation Language (KQML), a new language and protocol for exchanging information and knowledge. This work is part of a larger effort, the ARPA Knowledge Sharing Effort which is aimed at developing techniques and methodology for building large-scale knowledge bases which are sharable and reusable. KQML is both a message format and a message-handling protocol to support run-time knowledge sharing among agents. KQML focuses on an extensible set of performatives, which defines the permissiblespeech actsagents may use and comprise a substrate on which to develop higher-level models of interagent interaction such as contract nets and negotiation. In addition, KQML provides a basic architecture for knowledge sharing through a special class of agent called communication facilitators which coordinate the interactions of other agents The ideas which underlie the evolving design of KQML are currently being explored through experimental prototype systems which are being used to support several testbeds in such areas as concurrent engineering, intelligent design and intelligent planning and scheduling.

Table of Contents

  • 1 Introduction
  • The Knowledge Sharing Effort
  • 2 KQM L and Intelligent Information integration
  • Agent Communication Protocols
  • Facilitators and Mediators
  • The role of KQML
  • 3 The KQML Language
  • 4 KQML Software Architectures
  • KQM L Routers
  • KQ M L Facilitators
  • KQML KRILs
  • 5 Experience with KQML
  • 6 Conclusion
  • References

Knowls

  1. Knowl 1 — Knowledge Query and Manipulation Language Architecture and Layering

    definition

    The Knowledge Query and Manipulation Language (KQML) is an agent communication language and message-handling protocol developed within the ARPA Knowledge Sharing Effort (KSE) to support run-time knowledge sharing, communication, and coordination among autonomous, heterogeneous software agents.

    KQML separates the communication and pragmatic layer from the content representation layer:

    • Speech Act Layer: The core of KQML consists of an extensible set of performatives based on speech act theory (such as querying, asserting, subscribing, and commanding) that dictate the interaction protocol and the pragmatic intent of the message.
    • Content Layer: The actual message payload is encapsulated in a representation-neutral wrapper. The content can be expressed in any arbitrary knowledge representation or query language (such as Knowledge Interchange Format (KIF), standard Prolog, or SQL).
    • Transport Layer: KQML operates over diverse transport mechanisms, including TCP/IP streams, email (SMTP), HTTP, CORBA, and Linda.
  2. Knowl 2 — KQML Message Format and Envelope Syntax

    model/method

    A KQML message is structured as a balanced parenthesis list where the initial element is the performative name and the remaining elements are keyword/value argument pairs preceded by colons. The envelope supplies the metadata required for message routing and interpretation while treating the payload as an unparsed block.

    A canonical KQML message has the following format:

    (performative-name
      :content <expression>
      :receiver <agent-id>
      :sender <agent-id>
      :language <content-language-id>
      :ontology <ontology-id>
      :reply-with <query-id>
      :in-reply-to <query-id>)
    

    Core message parameters include:

    • :content: The domain expression or query payload.
    • :receiver and :sender: Identifiers of the target and source software agents.
    • :language: The name of the representation language used to encode the content (e.g., LPROLOG, KIF, SQL).
    • :ontology: The identifier of the shared conceptual framework and domain vocabulary used by the content (e.g., NYSE-TICKS).
    • Transport and routing tags allow communication infrastructure (such as message routers) to inspect, route, and deliver messages based on topic, language, and ontology without requiring access to the internal semantics of the content payload.
  3. Knowl 3 — Taxonomy of Reserved KQML Performatives

    model/method

    KQML defines a standard set of approximately two dozen reserved performatives partitioned into seven functional categories:

    1. Basic query performatives: Used by a client to query the beliefs of another agent (e.g., evaluate, ask-if, ask-in, ask-one, ask-all).
    2. Multi-response query performatives: Solicit multiple answers delivered as an unpacked stream of discrete response messages (e.g., stream-in, stream-all).
    3. Response performatives: Return results, data instantiations, or explicit refusals to previous queries (e.g., reply, sorry).
    4. Generic informational performatives: Transmit state assertions, commands, or deletions regarding virtual knowledge bases (e.g., tell, achieve, cancel, untell, unachieve).
    5. Generator performatives: Regulate stepped, flow-controlled delivery of items from a multi-response message stream (e.g., standby, ready, next, rest, discard, generator).
    6. Capability-definition performatives: Allow agents to publish service capabilities, subscribe to updates, or establish monitoring hooks (e.g., advertise, subscribe, monitor, import, export).
    7. Networking performatives: Coordinate agent registration, forwarding, point-to-multipoint dissemination, and message path routing (e.g., register, unregister, forward, broadcast, route).

    The set is extensible: an agent community may define custom performatives if their semantics and protocols are mutually agreed upon. However, any implementation utilizing a reserved performative must adhere to the standardized protocol definition.

  4. Knowl 4 — Facilitator-Mediated Interaction Protocols: Brokering, Recruiting, and Recommending

    model/method

    KQML introduces specialized intermediary agents termed communication facilitators to manage service matchmaking, directory registry, and content-based routing. When a client agent AA needs information matching pattern XX from an unknown provider, and provider agent BB has announced its capability via an advertise(ask(X)) performative, the facilitator FF coordinates the exchange using one of three primary interaction protocols:

    1. Brokering (broker): Agent AA sends broker(ask(X)) to FF. Facilitator FF routes the query ask(X) to provider BB, receives the reply tell(X) from BB, and delivers the result back to AA.
    2. Recruiting (recruit): Agent AA sends recruit(tell(X)) containing an embedded query/command to facilitator FF. FF identifies advertising provider BB and forwards the embedded performative to BB. Provider BB processes the request and replies directly to AA via tell(X), bypassing FF for the return trip.
    3. Recommending (recommend): Agent AA sends recommend(ask(X)) to FF. FF inspects its registry and returns the identity of matching agent BB to AA via reply(B). Agent AA then establishes a direct point-to-point dialog with BB.
  5. Knowl 5 — Stream and Generator Query Protocols in KQML

    model/method

    When a query produces a large or indefinite sequence of answers, KQML supports demand-driven flow control using generator performatives:

    • An agent sends a nested request wrapping a stream-all query inside a standby performative:
    (standby
      :content (stream-all
        :content <query-pattern>))
    
    • The receiving server generates the response set, holds the stream in an internal buffer, and awaits instructions.
    • The client fetches answers one at a time by sending successive next performatives, receiving a single reply for each.
    • The client terminates the stream by transmitting either discard (ordering the server to drop all remaining buffered answers) or rest (instructing the server to send all remaining buffered answers immediately).
    • The combination of standby and stream-all can be abbreviated using the compound performative generate.
  6. Knowl 6 — Asynchronous Subscription and Monitoring Protocols in KQML

    model/method

    KQML enables asynchronous notification of knowledge base updates over time:

    • Subscription (subscribe): A client registers an ongoing monitor for updates to a query by sending a subscribe performative wrapping a stream query:
    (subscribe
      :content (stream-all
        :content <query-pattern>))
    

    The target server registers the subscription and emits an asynchronous message to the subscriber whenever changes occur in its internal knowledge state that affect the query evaluation.

    • Monitoring (monitor): The shorthand performative monitor serves as an abbreviation for the subscribe and stream-all combination.
    • Advertising (advertise): An agent announces its willingness to accept asynchronous monitoring queries by issuing an advertise performative containing the supported query pattern (e.g., advertising the capability to handle monitor requests for specific variables).
  7. Knowl 7 — KQML Agent Implementation Architecture: Routers and KRILs

    model/method

    To integrate existing and heterogeneous software systems without modifying their core architectures, the KQML execution environment decouples message routing from agent logic using two components:

    1. KQML Router: A content-independent background process paired with each agent instance. All routers execute the same generic codebase. A router manages multiple asynchronous network connections (such as TCP/IP sockets), handles incoming and outgoing message queues, automatically registers and unregisters with local facilitators on startup and shutdown, and routes messages based on performative headers and metadata without parsing content payloads.
    2. KQML Router Interface Library (KRIL): An application-embedded programming library (API) specific to the host application's implementation language (e.g., C, Common Lisp, Prolog). The KRIL provides:
      • Programmatic dispatch functions (such as send-kqml-message for synchronous or asynchronous requests and declare-message-handler for incoming message callbacks).
      • Content analysis and domain-tagging utilities.
      • Language-level integration hooks, such as intercepting internal search failures in a Prolog interpreter and translating them into remote KQML queries for predicates declared as remote.
  8. Knowl 8 — Virtual Knowledge-Base Abstraction of Software Agents

    model/method

    KQML models any software component (including relational databases, mail demons, simulators, and rule-based expert systems) as an intelligent Knowledge-Based System (KBS) characterized by two virtual stores:

    1. Virtual Belief Base: Represents the agent's information store (its assertions, data, and current beliefs about its domain). Performatives such as tell, untell, ask-one, and ask-all query or update this virtual belief store.
    2. Virtual Goal Base: Represents the agent's intentions, objectives, and requested actions. Performatives such as achieve and unachieve request modifications to or fulfillment of an agent's goals.

    This abstraction allows heterogeneous and non-AI legacy systems to participate as peers alongside fully autonomous reasoning agents by mapping their inputs and outputs to belief or goal manipulations.

  9. Knowl 9 — Demonstrated Interoperability of Preexisting Systems Using KQML Mediators

    empirical result

    KQML was experimentally validated by integrating preexisting software tools across multiple distributed testbeds without modifying the internal codebases of the integrated applications:

    • Transportation Logistics: In the ARPA Rome Lab Planning Initiative, KQML linked a generative planning agent (implemented in SIPE), a temporal scheduler (in Common Lisp), a Loom knowledge base, and a case-based reasoning engine into a cooperative planning architecture.
    • Distributed Multidatabase Mediation: Across three geographically dispersed Internet sites, KQML interconnected COBASE (a cooperative query relaxation interface), SIMS (an information mediator that planned, partitioned, and optimized multi-source queries), and LIM (a mediator translating relational tuples into knowledge objects) to execute federated database queries.
    • Concurrent Engineering: In the PACT and SHADE projects, KQML-based facilitators mediated interaction and design constraint propagation across distributed CAD/CAM engineering tools and expert systems.

Coverage note — None was omitted; all key language primitives, message syntax structures, interaction protocols, implementation architecture components (routers/KRILs/facilitators), and experimental validation testbeds described in the paper are covered.

References

  1. 1.Yigal Arens. Planning and reformulating queries for semantically-modeled mult id at abase syst ems. In First International Conference ofi Information and I{nowledge Jfanagernent, October 1992.
  2. 2.Yigal Arens, Chin Chee, Chun-Nan Hsu, Hoh In, and Craig A. Knoblock. Query processing in an information mediator. In Proceedings of the ARPA/Rome Lab 1994 Knowledge-Based Planning and Scheduling Initiative Workshop, February 1994.
  3. 3.External Interfaces Working Group ARPA Knowledge Sharing Initiative. Specification of the KQML agentcommunication language. Working paper. Available as http: //uuu. cs .umbc. edu/kqml/papers/kqml-spec. ps, December 1992.
  4. 4.Marie Bienkowski, Marie desJardins, and Roberto Desimone. SO CAP: system for operations crisis action planning. In Proceedings of the ARPA/Rome Lab 1994 Knowledge-Based Planning and Scheduling Initiative Workshop, February 1994.
  5. 5.Mark Burstein, editor. Proceedings o,f the ARPA/Rome Lab 199.4 Know{edge-Based Planning and Scheduling Initiative Workshop. Morgan Kuafmann Publishers, Inc., February 1994.
  6. 6.Wes Chu and Hua Yang. Cobase: A cooperative query answering system for database systems. In Proceedings of the ARPA/Rome Lab 199.4 Knowledge-Based Planning and Scheduling Initiative Workshop, February 1994.
  7. 7.M. Cutkosky, E. Engelmore, R. Fikes, T. Gruber, M. Genesereth, and W. Mark. PACT: An experiment in integrating concurrent engineering systems. IEEE Computer, pages 28–38, January 1993.
  8. 8.D. Kuokka et. al. Shade: Technology for knowledgebased collaborative. In AAAI Workshop on AI in COLlaborative Design, 1993.
  9. 9.J. McGuire et. al. Shade: Technology for knowledgebased collaborative engineering. Journal of Concurrent Engineering: Applications and Research (CERA), 1(2), September 1993.
  10. 10.William Mark et. al, Cosmos: A system for supporting design negotiation. Journal of Concurrent Engineering: Applications and Research (CERA), 2(3), 1994.
  11. 11.Tim Finin, Rich Fritzson, and Don McKay. A highlevel language and protocol to support intelligent agent interoperability. In Workshop on Enabling Technologies for Concurrent Engineering, April 1992.
  12. 12.Tim Finin, Rich Fritzson, and Don McKay. A knowledge query and manipulation language for intelligent agent interoperability. In Fourth National Symposium on Concurrent Engineering, CE & CALS Conference, June 1–4 1992. Available as http: //wnJ. cs .umbc. edu/kqml/papers/cecals. ps.
  13. 13.Tim Finin, Don McKay, Rich Fritzson, and Robin McEntire. KQML: an information and knowledge exchange protocol. In International Conference on Building and Sharing of Very Large-Scale Knowledge Bases, December 1993. A version of this paper will appear in Kazuhiro Fuchi and Toshio Yokoi (Ed.), "Knowledge Building and Knowledge Sharing", Ohmsha and 10S Press, 1994. Available as http: //uuv. cs. umbc. edu/kqml/papers/kbks .ps.
  14. 14.Tim Finin, Charles Nicholas, and Yelena Yesha, editors. Information and Knowledge Management, Expanding the Definition of Database. Lecture Notes in Computer Science 752. Springer-Verlag, 1993. (ISBN 3-540-57419-0).
  15. 15.M. Genesereth and R. Fikes et. al. Knowledge interchange format, version 3.0 reference manual. TechnicaJ report, Computer Science Department, Stanford Universit y, 1992.
  16. 16.Michael R. Genesereth and Steven P. Katchpel. Software agents. Communications of the ACM, 37(7):48–53, 147, 1994.
  17. 17.Mike Genesereth. Designworld. In Proceedings of the IEEE Conference on Robotics and Automation, pages 2,785–2,788. IEEE CS Press.
  18. 18.Mike Genesereth. An agent-based approach to software interoperability. Technical Report Logic-91-6, Logic Group, CSD, Stanford University, February 1993.
  19. 19.Matt Ginsberg. Knowledge interchange format: The KIF of death. AI Magazine, 1991.
  20. 20.Yannis Labrou and Tim Finin. A semantics approach for KQML - a general purpose communication language for software agents. In Third International Conference on Information and Knowledge Management, November 1994. Available as http: //www. cs. umbc. edu/kqml/papers/kqml-semant ics, pa.
  21. 21.Nancy Lehrer. The knowledge representation specification language manual. Technical report, ISX Corporation, Thousand Oaks, California, 1994.
  22. 22.Robert MacGregor and Raymond Bates. The LOOM knowledge representation language. Technical Report ISI/RS-87-188, USC/ISI, 1987. Also appears in Proceedings of the Knowledge-Based Systems Workshop held in St. Louiej Missouri, April 21–23, 1987.
  23. 23.M. Tenenbaum, J. Weber, and T. Gruber. Enterprise integration: Lessons from shade and pact. In C. Pet rie, editor, Enterprise Integration Modeling. MIT Press, 1993.
  24. 24.R. Neches, R. Fikes, T. Finin, T. Gruber, R. Patil, T. Senator, and W. Swartout. Enabling technology for knowledge sharing. AI Magazine, 12(3):36–56, Fall 1991.
  25. 25.Jeff Y-C Pan and Jay M. Tenenbaum. An intelligent agent framework for enterprise integration. IEEE Transactions on Systems, Man and Cybernetics, 21(6), December 1991. (Special Issue on Distributed AI).
  26. 26.Jon Pastor, Don McKay, and Tim Finin. Viewconcepts: Knowledge-baaed access to databases. In First International Conference on Information and Knowledge Management, October 1992.
  27. 27.R. Patil, R. Fikes, P. Patel-Schneider, D. McKay, T. Finin, T. Gruber, and R. Neches. The DARPA knowledge sharing effort: Progress report. In Principles of Knowledge Representation and Reasoning: Proceedings of the Third International Conference, November 1992. Available as http: //wuu. c.. umbc. edu/kqml/papers/kr92. pe.
  28. 28.R. Patil, R. Fikes, P. Patel-Schneider, D. McKay, T. Finin, T. Gruber, and R. Neches. The DARPA knowledge sharing effort: Progress report. In B. Nebel, C. Rich, and W. Swartout, editors, Principles of Knowledge Representation and Reasoning: Proc. of the Third International Conference (KR ‘92), San Mateo, CA, November 1992. Morgan Kaufmann.
  29. 29.Gio Wiederhold, Peter Wegner, and Stefano Ceri. Toward megaprogramming. Communications of the A CM, 33(11):89–99, November 1992.
  30. 30.David Wilkins. Practical Planning: Extending the Classical AI Planning Paradigm. Morgan Kaufmann Publishers, Inc., San Mateo, CA., 1988.

Citation

MLA
Finin, T., et al. “KQML as an Agent Communication Language”. Proceedings of the Third International Conference on Information and Knowledge Management - CIKM '94, 1994, pp. 456–63, https://doi.org/10.1145/191246.191322.
APA
Finin, T., Fritzson, R., McKay, D., & McEntire, R. (1994). KQML as an agent communication language. Proceedings of the Third International Conference on Information and Knowledge Management - CIKM '94, 456–463. https://doi.org/10.1145/191246.191322
Chicago
Finin, T., R. Fritzson, D. McKay, and R. McEntire. 1994. “KQML as an Agent Communication Language”. Proceedings of the Third International Conference on Information and Knowledge Management - CIKM '94, 456–63. https://doi.org/10.1145/191246.191322.
Harvard
Finin, T. et al. (1994) “KQML as an agent communication language”, Proceedings of the third international conference on Information and knowledge management - CIKM '94. ACM Press, pp. 456–463. Available at: https://doi.org/10.1145/191246.191322.
Vancouver
1. Finin T, Fritzson R, McKay D, McEntire R (1994) KQML as an agent communication language. In: Proceedings of the third international conference on Information and knowledge management - CIKM '94. ACM Press, pp 456–463

BibTeX

@inproceedings{Finin_1994, series={CIKM ’94}, title={KQML as an agent communication language}, url={http://dx.doi.org/10.1145/191246.191322}, DOI={10.1145/191246.191322}, booktitle={Proceedings of the third international conference on Information and knowledge management  - CIKM ’94}, publisher={ACM Press}, author={Finin, Tim and Fritzson, Richard and McKay, Don and McEntire, Robin}, year={1994}, pages={456–463}, collection={CIKM ’94} }
Metadata:Crossref

Access the Paper

This paper is available from its original source. Click below to access the PDF.

Open PDF