spade_bdi package

Submodules

spade_bdi.bdi module

class spade_bdi.bdi.BDIAgent(jid: str, password: str, asl: str, actions=None, *args, **kwargs)[source]

Bases: Agent

add_behaviour(behaviour, template=None)[source]

Adds and starts a behaviour to the agent. If template is not None it is used to match new messages and deliver them to the behaviour.

Args:

behaviour (Type[spade.behaviour.CyclicBehaviour]): the behaviour to be started template (spade.template.Template, optional): the template to match messages with (Default value = None)

add_custom_actions(actions)[source]
behaviours: list
client: XMPPClient | None
container
jid
loop
password
pause_bdi()[source]
presence: PresenceManager | None
resume_bdi()[source]
set_asl(asl_file: str)[source]
traces
verify_security
web
xmpp_port

spade_bdi.bdi_behaviour module

class spade_bdi.bdi_behaviour.BDIBehaviour[source]

Bases: CyclicBehaviour

add_actions()[source]
agent
get_belief(key: str, source=False)[source]

Get an agent’s existing belief. The first belief matching <key> is returned. Keep <source> False to strip source.

get_belief_value(key: str)[source]

Get an agent’s existing value or values of the <key> belief. The first belief matching <key> is returned

get_beliefs(source=False)[source]

Get agent’s beliefs.Keep <source> False to strip source.

is_running
on_end
on_start
presence
print_beliefs(source=False)[source]

Print agent’s beliefs.Keep <source> False to strip source.

queue
remove_belief(name: str, *args)[source]

Remove an existing agent’s belief.

async run()[source]

Run one reasoning cycle.

set_belief(name: str, *args)[source]

Set an agent’s belief. If it already exists, updates it.

template
web
exception spade_bdi.bdi_behaviour.BeliefNotInitiated[source]

Bases: Exception

spade_bdi.utils module

spade_bdi.utils.as_agentspeak_term(term)[source]

Convert Python lists to AgentSpeak lists for runtime unification.

spade_bdi.utils.parse_literal(msg)[source]

Parse a complete serialized literal into its functor and arguments.

Module contents